Tag: ELKStack

Standard Logstash Template for Event Processing (Gold Template)
Standard Logstash Template for Event Processing (Gold Template)

This standard template for configuring Logstash pipelines, commonly referred to as a “gold template,” ensures consistent metadata enrichment for events processed through Logstash, making it particularly useful in environments where data comes from diverse sources. Configuration Template Below is the template with an explanation of its key components: Key Features Ruby Block for Metadata Enrichment […]

Read More
Configuring Disk Allocation Thresholds in Elasticsearch and OpenSearch
Configuring Disk Allocation Thresholds in Elasticsearch and OpenSearch

When running an Elasticsearch or OpenSearch cluster, efficient disk space management is essential for ensuring stability and performance. These platforms provide configurable settings to manage how shards are allocated based on available disk space. Here, we discuss three key settings related to disk allocation thresholds: 1. cluster.routing.allocation.disk.threshold_enabledThis setting enables or disables disk-based shard allocation. When set […]

Read More
Understanding index.mapping.total_fields.limit in OpenSearch/ElasticSearch
Understanding index.mapping.total_fields.limit in OpenSearch/ElasticSearch

Sometimes, you can get the associated error Limit of total fields [1000] has been exceeded I will explain what it is and how to fix it.You can find that error in OpenSaerch/ElasticSearch logs /var/log/opensearch or /var/log/elasticsearchFor example, in the screenshot, you can see that error: In OpenSearch and Elasticsearch, the number of fields in an index […]

Read More
Monitoring Elasticsearch Cluster With Metricbeat
Monitoring Elasticsearch Cluster With Metricbeat

Monitoring Elasticsearch is crucial for maintaining its performance and ensuring cluster health. Metricbeat, a lightweight shipper by Elastic, simplifies this process by collecting and sending metrics from your Elasticsearch nodes to a monitoring system like Kibana or Elasticsearch itself. How to Monitor Elasticsearch with Metricbeat 1. Install MetricbeatDownload and install Metricbeat on your Elasticsearch nodes. […]

Read More
Decoding the PROCTITLE Field in Auditd Event Streams with Logstash
Decoding the PROCTITLE Field in Auditd Event Streams with Logstash

By default, the PROCTITLE field contains the command used to start a process, encoded in HEX. Learn how to decode it using a Ruby script within Logstash. Problem Overview When processing auditd events, the PROCTITLE field is encoded in HEX format. This makes it unreadable in its raw form. To make this information human-readable, we can use a […]

Read More
Generating a CSR and Using an External Certificate with Elasticsearch
Generating a CSR and Using an External Certificate with Elasticsearch

This guide is aimed at beginners and provides a step-by-step walkthrough for connecting Elasticsearch to external certificates issued by a Certificate Authority (CA). All instructions and steps are based on the official Elasticsearch documentation to ensure accuracy and compatibility. Generate a CSR for Each Node Step 1: Create a CSR Configuration FileFor each node in […]

Read More
Adding Processing Timestamp and Hostname in Logstash Using Ruby
Adding Processing Timestamp and Hostname in Logstash Using Ruby

When processing event streams with Logstash, it can be useful to record the time an event was processed and the hostname of the Logstash server handling it. This information is important for debugging, monitoring, and ensuring the traceability of event data.Logstash makes this task straightforward using the Ruby filter plugin, which allows embedding Ruby code […]

Read More
Handling the Dynamic Pruning Failure in Cardinality Aggregations in Elasticsearch
Handling the Dynamic Pruning Failure in Cardinality Aggregations in Elasticsearch

When working with Elasticsearch, you may encounter the following error during complex queries involving cardinality aggregations: This error typically occurs when Elasticsearch’s dynamic pruning mechanism, designed to optimize aggregation queries, struggles to handle high cardinality (i.e., a large number of unique terms or values). Let’s dive into what this means and how to resolve it. […]

Read More
Calculating Session Duration in Logstash Using Ruby
Calculating Session Duration in Logstash Using Ruby

When processing event streams with Logstash, you may encounter a need to calculate the duration of a session — the difference between its start and end times. This is a common scenario when analyzing time-sensitive data.Logstash provides the flexibility to perform such operations by embedding custom Ruby code into your pipeline configuration. Here’s how you […]

Read More
Elastic for Security Analysts. Part 1: Searching Strings.
Elastic for Security Analysts. Part 1: Searching Strings.

Purpose: With Elastic increasing their foothold in the cybersecurity space through the speed and scalability of their solution, we expect more new Elastic users. These users will approach Elastic armed with an intuition built from experience with other platforms and SIEMs. Often this intuition will be directly challenged after a few searches in Elastic. The […]

Read More