OOM metrics gathering

We running docker platform and monitoring using TICK stack. lot of containers killed by OOM due to genuine and not properly tuned containers. We would like to keep an watch on killed events and setup alerts appropriately.

is there any best way to monitor these events? one traditional solution is to watch dmesg or /var/log/syslog and grep for OOM killed. am looking any better way then this using telegraf/

Srinivas Kotaru

You could use the procstat plugin to watch specific processes, though you will not be sure why the process was terminated. Alternatively you can use the logparser plugin with a custom pattern to monitor syslog specifically for the oom-killer.