Troubleshooting Cron Jobmonitor

Last updated on 15 November, 2024
  1. Open the terminal and enter the following command: $ crontab -e
  2. Enter the password.  
    <div style=”background-color: #eff6fd; margin-bottom: 30px; margin-top: 18px; padding: 20px 20px 2px 20px;”><strong>Note</strong>If you log in as a root user, you are not be required to enter the password.</div>
  3. Update the Cron Jobomonitor by running the following command:54 11 * * * /usr/local/logicmonitor/agent/lib/lmbatchjobwrapper.sh <agent ip>:7214 nginx.corp.exactasystems.co "CORP-NGINX GixyTest 6am Daily" /etc/scripts/gixytest.sh > /<path>/anyfile.log 2>&1

    Update Cron Jobmonitor
  4. To apply the changes, restart the Cron Jobmonitor by running the following command:
    sudo systemctl restart cron
  5. To see if the Cron jobs are running correctly, run the following command:
    tail -f filename.log

    Cron Jobmonitor running
  6. To enable the Cron Jobmonitor logging, open /etc/rsyslog.d/50-default.conf file by running the following command and uncommenting the code:
    # Uncomment the following line to enable cron logging to a separate file cron.*       /var/log/cron.log cron.*       /var/log/cron.log
    Uncommenting
  7. Restart the Syslog service to ensure the logging configuration is updated and functional by running the following command:
    sudo systemctl restart rsyslog
  8.  In the LogicMonitor portal, navigate to Resource Tree > select the resource on which jobmonitor module is applied.
  9. Select Job Monitor Executions tab.
    The Cron Jobmonitor details are displayed.