Cron Logs
Cron job logs is one of the popularly used time-based job scheduling software and Site24x7 AppLogs is a cloud monitoring service that facilitates easy and efficient log management. With Site24x7 AppLogs you can quickly search for Cron job data which has been sorted into relevant fields such as Cron daemon, host, date & time, user, PID, command, etc. all of which is shown in a single dashboard. Learn more about log management with Site24x7.
Getting started
- Log in to your Site24x7 account.
- Download and install the Site24x7 Server Monitoring agent (Linux).
- Go to Admin > AppLogs > Log Profile and Add Log Profile.
Logs file path
Each application writes logs in different folders and files. By default Cron logs are sourced from the below mentioned folder path for the respective OS. If you have logs in a different folder, you can mention it under the File Path to source them from that particular folder while creating a log profile.
Log pattern
$DateTime:date$ $Host$ $CronDeamon$[$PID$]:! ($User$)! $Command$
This is the default pattern defined by Site24x7 AppLogs for parsing Cron logs based on the sample mentioned below.
Sample log
Jul 8 22:00:00 dev-db crond[18340]: (root) CMD (/bin/sh /home/root/bin/system_check &)
The above sample log can be separated into 6 fields, each of which will take its respective value from here and will then be uploaded to Site24x7.
Field name | Field value |
Date Time | Jul 8 22:00:00 |
Host | dev-db |
Cron Deamon | crond[18340] |
PID | root |
User | CMD |
Command | (/bin/sh /home/root/bin/system_check &) |
Related log types
Related Articles: