I am monitoring CRON jobs, 40 or 50 different jobs all running on 1 server.
I set up the mk-job like described here: Monitoring time-based processes (Cronjobs) (users have rights to write in the respective directories under /var/lib/check_mk_agent/job/
If I run a cmk -d on the server, I see the logs of all the different cron jobs are being sent to the checkMK server.
But if I check the web interface for the same job, I see different results
the exit code is actually â0â and the job has ran much more recent, the rest of the values seem to be okay.
Does anyone have an explanation for this behavior?
can you share the output of
âgrep -A 11 archiving_BM4 ~/tmp/check_mk/cache/<hostname_in_question>â
and just to be sure:
âgrep -A 11 archiving_BM4 ~/tmp/check_mk/piggyback/<hostname_in_question>/*â
maybe there are multiple files for the same job. There really isnât much caching going on that could otherwise lead to false data, when âcmk -dâ already shows the current and correct data.
Every user has 1 job, uniquely named.
The content of the files on the host seems to have the correct output from the mk-job command:
These are the directories
This is the folder content of one of the problematic jobs that we were discussing before.
File content seems to be ok as well:
I executed your command and saw that when I was testing with the cron jobs under the root user, they all created a log file in that â/var/lib/check_mk_agent/job/root/â folder.
I deleted all those logs and now my cron jobs get detected perfectly!
What a relief, thanks for the support and thinking along!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.