Tag: Logstash

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
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
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
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