These are chat archives for Yelp/elastalert

Apr 2016
Quentin Long
Apr 28 2016 21:17
@sunilmchaudhari you could solve this with bash + elastalert
You could just make a cron job on the ES host that runs something like curl -XPOST localhost:9200/someindex/disk_usage -d '{'"disk_free": `df | grep md1 | awk '{print $4}'}'
So that will just post a document with disk_free equal to the available bytes on the drive md1
So you just make an alert with a range filter on disk_free
@fiunchinho ^
I think I messed up the quotes/backticks slightly in that example, but it's very doable
Bash is your friend :) learn to love it
Quentin Long
Apr 28 2016 21:26
Of course you'll need a timestamp too. date -u +"%Y-%m-%dT%H:%M:%SZ"