Performing Core Operations
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Generally available
The plugins described in this section are useful for core operations, such as mutating and dropping events.
- date filter
-
Parses dates from fields to use as Logstash timestamps for events.
The following config parses a field called
logdateto set the Logstash timestamp:JSON filter { date { match => [ "logdate", "MMM dd yyyy HH:mm:ss" ] } } - drop filter
-
Drops events. This filter is typically used in combination with conditionals.
The following config drops
debuglevel log messages:JSON filter { if [loglevel] == "debug" { drop { } } } - fingerprint filter
-
Fingerprints fields by applying a consistent hash.
The following config fingerprints the
IP,@timestamp, andmessagefields and adds the hash to a metadata field calledgenerated_id:JSON filter { fingerprint { source => ["IP", "@timestamp", "message"] method => "SHA1" key => "0123" target => "[@metadata][generated_id]" } } - mutate filter
-
Performs general mutations on fields. You can rename, remove, replace, and modify fields in your events.
The following config renames the
HOSTORIPfield toclient_ip:JSON filter { mutate { rename => { "HOSTORIP" => "client_ip" } } }The following config strips leading and trailing whitespace from the specified fields:
JSON filter { mutate { strip => ["field1", "field2"] } } - ruby filter
-
Executes Ruby code.
The following config executes Ruby code that cancels 90% of the events:
JSON filter { ruby { code => "event.cancel if rand <= 0.90" } }