coolacid / GettingStartedWithELK

Getting Started with ELK
50 stars 7 forks source link

Add Snippets/Date/drop-old-timestamps.txt #17

Closed klamontagne closed 10 years ago

klamontagne commented 10 years ago

Drop stray older events to avoid creating Elasticsearch indices just for them

shurane commented 10 years ago

Now that's a pretty useful code snippet. Can the equivalent be done using just if and drop and not having to break into the ruby filter? I did something similar where I showed how to delete nested fields using Logstash statements and via the ruby filter: https://github.com/coolacid/GettingStartedWithELK/pull/12

Very cool, @klamontagne.

I would suggest using 4-space tabs consistently instead of using both 2-space and 4-space, and rename drop-old-timestamps.txt to drop-old-timestamps.conf. Although now I noticed that all the files in Snippets/Date are named *.txt.

klamontagne commented 10 years ago

I asked on #Logstash and ruby was the only filter able to obtain the current date.

All the files look like valid config snippets, I don't know why they are *.txt either.

klamontagne commented 10 years ago

ping