Filebeat - Visualising cron tasks execution time

(Wojciech Pietrzak) #1


I have some entries in /var/log/cron.log like:

Jul  5 10:40:01 sandbox-3 CRON[30420]: (root) CMD ([30422] echo2 'wopi' > /tmp/wopi_root.txt)
Jul  5 10:40:01 sandbox-3 CRON[30420]: (CRON) error (grandchild #30422 failed with exit status 127)
Jul  5 10:40:01 sandbox-3 CRON[30420]: (root) END ([30422] echo2 'wopi' > /tmp/wopi_root.txt)

As You can see:

  • in the first line the command is started (CMD)
  • in the second line there is a error notification (on purpose)
  • in the third line the command is ended (END)

All three lines are containig the PID of the process (30420).

Since this tasks are run periodicaly via cron, it makes sense to visualise how they are performing.

Is there a possibility to create a visualisation showing how much time the corresponding tasks are took?

I thought about using the PID and the hostname for generating a document id for logstash, where I would send the data.

Has somebody already done something like this?

(Adrian Serrano) #2

It looks like a perfect candidate for the Elapsed Filter in Logstash

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.