# Filebeat - Visualising cron tasks execution time

**URL:** <https://discuss.elastic.co/t/filebeat-visualising-cron-tasks-execution-time/138671>\
**Category:** Beats\
**Created:** [July 5, 2018, 8:50am UTC](https://discuss.elastic.co/t/filebeat-visualising-cron-tasks-execution-time/138671 "2018-07-05T08:50:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![astropanic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/astropanic/32/20726_2.png) [@astropanic](https://discuss.elastic.co/u/astropanic)\
**Post date:** [July 5, 2018, 8:50am UTC](https://discuss.elastic.co/t/filebeat-visualising-cron-tasks-execution-time/138671/1 "2018-07-05T08:50:38Z")

</div>

Hi

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?

---

<div class="post-metadata">

**Author:** ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)\
**Post date:** [July 6, 2018, 11:10am UTC](https://discuss.elastic.co/t/filebeat-visualising-cron-tasks-execution-time/138671/2 "2018-07-06T11:10:37Z")

</div>

It looks like a perfect candidate for the [Elapsed Filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-elapsed.html) in Logstash

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 3, 2018, 1:10pm UTC](https://discuss.elastic.co/t/filebeat-visualising-cron-tasks-execution-time/138671/3 "2018-08-03T13:10:39Z")

</div>

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