Announcement

Collapse
No announcement yet.

How to configure cron.d jobs on CentOS 5.5?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to configure cron.d jobs on CentOS 5.5?

    Hi,

    For a CentOS 5.5 install I created the /etc/cron.d directory and added these files:

    Code:
    [[email protected] ~]# ls -al /etc/cron.d/
    -rw-r--r--  1 root root 2443 Nov  3 13:45 centreon
    -rw-r--r--  1 root root 2576 Nov  3 13:45 centstorage
    Code:
    # cat /etc/cron.d/centreon
    
    CRONTAB_EXEC_USER=""
    
    # Cron for log analyser - for reporting
    0 1 1-31 * * nagios /usr/bin/perl /usr/local/centreon/cron/archiveDayLog >> /usr/local/centreon/log/archiveDayLog.log 2>&1
    
    # Cron for CentACL
    */2 * * * * apache /usr/bin/php -q /usr/local/centreon/cron/centAcl.php >> /usr/local/centreon/log/centAcl.log 2>&1
    Code:
    # cat /etc/cron.d/centreon
    # rewrite file with new cron line
    CRONTAB_EXEC_USER=""
    
    # Cron for log parsor
    * * * * * nagios /usr/local/centreon/bin/logAnalyser >> /usr/local/centreon/log/logAnalyser.log 2>&1
    
    # Cron for tracing Nagios Poller Performances
    */5 * * * * nagios /usr/local/centreon/bin/nagiosPerfTrace >> /usr/local/centreon/log/nagiosPerfTrace.log 2>&1
    
    # Cron for databin and logs purge
    0 2 * * * nagios /usr/local/centreon/cron/centreonPurge.sh >> /usr/local/centreon/log/centreon-purge.log 2>&1
    The cron jobs seem to be NOT running. Is this setup correct? How can I solve this? Move the file to /etc/cron.daily?

    Thx!
    Roderick
    Centos 6.2 - Nagios 3.4.1 - Centreon 2.3.8 - NDO 1.5.2 - Centreon Syslog 1.4.1 - nagios status map - www.r71.nl www.360viewpoint.nl
    StatusMap Module - NDO Tools Module - ImportCSV Module - SNMP-UI Module

  • #2
    do you have restarted crond service after creation of files ?
    Centreon Syslog Module Manager/Developper
    Centreon E2S Module Manager/Developper
    Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
    Nagios 3.x et NDOutil 1.x

    Comment


    • #3
      Crond was not even installed! This was the problem. Centos package is named differently then in RedHat, that was my mixup:
      # yum install -y vixie-cron
      # service start crond

      Roderick
      Centos 6.2 - Nagios 3.4.1 - Centreon 2.3.8 - NDO 1.5.2 - Centreon Syslog 1.4.1 - nagios status map - www.r71.nl www.360viewpoint.nl
      StatusMap Module - NDO Tools Module - ImportCSV Module - SNMP-UI Module

      Comment

      Working...
      X