Prerequisites for Monitoring Cron Jobs

Prerequisites for Monitoring Cron Jobs

Below is the list of prerequisites for monitoring Cron jobs:

  1. Curl must be installed in the remote Linux machine. 
  2. Script linked to the cron job must have executable permission.
  3. The machine where Applications Manager is installed should be reachable from the remote Linux machine via SSL port without any proxy server.
  4. The remote machine where the cron job is running must be synced with the correct time zone.
  5. Cron job interval should be a minimum of five minutes.
  6. Cron job uses HTTPs protocol to send responses to the machine where Applications Manager is installed and is validated using the admin user's Rest API key. If the admin user's API key is regenerated, then update the latest API key for all the cron job(s) on the remote Linux machine using the crontab -e command.
  7. Linux cron is supported only in SSH and TELNET mode of monitoring.
Steps to configure Cron jobs

      1)Check whether curl is installed in the system where cron jobs are running, by executing the below command in terminal
       $curl -V
       Output should be similar as below
             

2)Check the script added in the cron job addition is having executable permission
$ls -al <script added in Job script path>

[testuser@test-machine]$ ls -al test.sh
-rwx------. 1 testuser testgroup 35 Apr 24 22:38 test.sh


3)Under Settings -> User Management ->Click on Admin User and generate the API key by clicking the Click here as shown



4)Replace the <ADMIN_API_KEY> with the api key generated above 
5)After replacing paste the content in the target server where cron job is running by following the steps below
  1. In target server terminal execute     
                $ crontab -e 
  1. A cron editor will open 
  2. Paste the curl content and save and exit 
  3. The terminal should return the following
                  crontab: installing new crontab

If cron job details are not getting updated in Applications Manager even after performing the above steps , check whether the target server can access the Applications Manager installed machine and  the port in which it is running by executing the below command in the target server.

telnet remote_server_ip port_number

remote_server_ip/hostname - Replace remote_server_ip with the hostname/ipaddress of machine in which Applications Manager is running.
port_number - Replace Port number with port number in which Applications Manager is running

Example
http://127.0.0.1:9666 - APM build link
telnet 127.0.0.1 9666


                  New to ADSelfService Plus?