Nagios plugins for Argus Authorization Service

It is possible to monitor the state of the Argus Authorization Services (PAP, PDP and PEP Server) with some Nagios plugins. These plugins will monitor the activity of the Argus components, and eventually try to restart the service if a component is down.

Requirement

To install the Nagios plugins for Argus on the service host, you need to install the following components:

  • Nagios NRPE
  • Nagios Plugins
  • python

You can install it with the YUM command:

yum install nagios-nrpe nagios-plugins python

Enable and start the Nagios NRPE service on the host:

chkconfig nrpe on
service nrpe start

Installation for Argus 1.3 (EMI)

  1. Download the Nagios Argus plugins argus-nagios-0.2.2-EMI.tar.gz file
  2. Extract the downloaded file: tar xvzf argus-nagios-0.2.2-EMI.tar.gz

Argus 1.3 (EMI) Service Host Configuration

On the host where the Argus Service is running, do the following:

  1. Add following lines to sudoers file by using visudo (assuming nagios plugins are run as user nagios)
        Defaults:nagios !requiretty
        Cmnd_Alias ARGUS = /etc/init.d/argus-pap, /etc/init.d/argus-pdp, /etc/init.d/argus-pepd
        nagios ALL = NOPASSWD: ARGUS
    
  2. Copy the 7 plugins (*.py files) into your local Nagios plugins directory. e.g. /usr/lib64/nagios/plugins (make sure they have execute permissions)
  3. Edit your local Nagios NRPE configuration file /etc/nagios/nrpe.cfg, and add the following command definitions:
    #
    # Argus Service monitoring
    #
    command[check_argus_pap]=/usr/lib64/nagios/plugins/check_argus_pap.py
    command[check_argus_pdp]=/usr/lib64/nagios/plugins/check_argus_pdp.py
    command[check_argus_pepd]=/usr/lib64/nagios/plugins/check_argus_pepd.py
    command[perf_argus_pdp]=/usr/lib64/nagios/plugins/perf_argus_pepd_pdp.py -s PDP -w 300 -c 400
    command[perf_argus_pepd]=/usr/lib64/nagios/plugins/perf_argus_pepd_pdp.py -s PEPD -w 512 -c 640
    command[restart_argus_pap]=/usr/lib64/nagios/plugins/restart_argus_pap.py 
    command[restart_argus_pdp]=/usr/lib64/nagios/plugins/restart_argus_pdp.py
    command[restart_argus_pepd]=/usr/lib64/nagios/plugins/restart_argus_pepd.py 
    
  4. Restart Nagios NRPE: /etc/init.d/nrpe restart

The values for the warning and critical stage are recommendations, they can be adjusted if necessary.

Nagios Server Configuration

On the host running your Nagios server, do the following:

  1. Copy the run_commands script into the <NAGIOS_PATH>/libexec/eventhanlders/ directory (the file must executable for the nagios user).
  2. Define the following command in your Nagios commands.cfg configuration file (beware, you might have to adapt the path of the run_command script)
    define command {
            command_name    do_event
            command_line    /usr/local/nagios/libexec/eventhandlers/run_command  $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ $ARG1$
    }
    
  3. Add the following into your Nagios server objects-file (replace ARGUS_HOSTNAME by the hostname running your Argus service):
    define service {
       use generic-service
       host_name <ARGUS_HOSTNAME>
       service_description Argus PAP
       check_command check_nrpe!check_argus_pap
       max_check_attempts  4
       event_handler_enabled  1
       event_handler  do_event!restart_argus_pap
    }
    
    define service {
       use generic-service
       host_name <ARGUS_HOSTNAME>
       service_description Argus PDP
       check_command check_nrpe!check_argus_pdp
       max_check_attempts  4
       event_handler_enabled  1
       event_handler  do_event!restart_argus_pdp
    }
    
    define service {
       use generic-service
       host_name <ARGUS_HOSTNAME>
       service_description Argus PEP Server
       check_command check_nrpe!check_argus_pepd
       max_check_attempts  4
       event_handler_enabled  1
       event_handler do_event!restart_argus_pepd
    }
    
    define service {
       use generic-service
       host_name <ARGUS_HOSTNAME>
       service_description Argus PDP Stats
       check_command check_nrpe!perf_argus_pdp
    }
    
    define service {
       use generic-service
       host_name <ARGUS_HOSTNAME>
       service_description Argus PEP Server Stats
       check_command check_nrpe!perf_argus_pepd
    }
    

Installation for Argus 1.2 (gLite 3.2)

  1. Download the Nagios Argus plugins nagios_argus.tar.gz file
  2. Extract the downloaded file nagios_argus.tar.gz

Argus 1.2 Service Host Configuration

On the host where the Argus Service is running, do the following:

  1. Add following lines to sudoers file by using visudo (assuming nagios plugins are run as user nagios)
        Defaults:nagios !requiretty
        Cmnd_Alias ARGUS = /etc/init.d/pepd, /etc/init.d/pdp, /etc/init.d/pap-standalone
        nagios ALL = NOPASSWD: ARGUS
    
  2. Copy the 7 plugins (*.py files) into your local Nagios plugins directory. e.g. /usr/lib64/nagios/plugins (make sure they have execute permissions)
  3. Edit your local Nagios NRPE configuration file nrpe.cfg (e.g. /etc/nagios/nrpe.cfg), and add the following command definitions:
    command[check_argus_pap]=/usr/lib64/nagios/plugins/check_argus_pap.py
    command[check_argus_pepd]=/usr/lib64/nagios/plugins/check_argus_pepd.py
    command[check_argus_pdp]=/usr/lib64/nagios/plugins/check_argus_pdp.py
    command[check_argus_pdp_perf]=/usr/lib64/nagios/plugins/check_argus_pepd_pdp.py -s PDP -w 300 -c 400
    command[check_argus_pepd_perf]=/usr/lib64/nagios/plugins/check_argus_pepd_pdp.py -s PEPD -w 600 -c 1000
    command[restart_argus_pap]=/usr/lib64/nagios/plugins/restart_argus_pap.py 
    command[restart_argus_pepd]=/usr/lib64/nagios/plugins/restart_argus_pepd.py 
    command[restart_argus_pdp]=/usr/lib64/nagios/plugins/restart_argus_pdp.py
    
  4. Restart Nagios NRPE: /etc/init.d/nrpe restart

Nagios Server Configuration

On the host running your Nagios server, do the following:

  1. Copy the run_commands script into the <NAGIOS_PATH>/libexec/eventhanlders/ directory (the file must executable for the nagios user).
  2. Define the following command in your Nagios commands.cfg configuration file (beware, you might have to adapt the path of the run_command script)
    define command {
            command_name    do_event
            command_line    /usr/local/nagios/libexec/eventhandlers/run_command  $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ $ARG1$
    }
    
  3. Add the following into your Nagios server objects-file (replace ARGUS_HOME_NAME by the hostname running your Argus service):
    define service {
       use generic-service
       host_name <ARGUS_HOST_NAME>
       service_description ARGUS PAP
       check_command check_nrpe!check_argus_pap
       max_check_attempts  4
       event_handler_enabled  1
       event_handler      do_event!restart_argus_pap
    }
    
    define service {
       use generic-service
       host_name <ARGUS_HOST_NAME>
       service_description ARGUS PDP
       check_command check_nrpe!check_argus_pdp
       max_check_attempts  4
       event_handler_enabled  1
       event_handler      do_event!restart_argus_pdp
    }
    
    define service {
       use generic-service
       host_name <ARGUS_HOST_NAME>
       service_description ARGUS PEPD
       check_command check_nrpe!check_argus_pepd
       max_check_attempts  4
       event_handler_enabled  1
       event_handler      do_event!restart_argus_pepd
    }
    
    define service {
       use generic-service
       host_name <ARGUS_HOST_NAME>
       service_description ARGUS PDP PERF
       check_command check_nrpe!check_argus_pdp_perf
    }
    
    define service {
       use generic-service
       host_name <ARGUS_HOST_NAME>
       service_description ARGUS PEDP PERF
       check_command check_nrpe!check_argus_pepd_perf
    }
    
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatgz argus-nagios-0.2.2-EMI.tar.gz r1 manage 5.5 K 2011-07-06 - 17:13 ValeryTschoppExCern Argus 1.3 (EMI) Nagios plugins
Unknown file formatgz nagios_argus.tar.gz r1 manage 4.5 K 2010-04-13 - 13:22 ValeryTschoppExCern old Nagios plugins for Argus 1.2 (gLite 3.2)
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r11 - 2016-07-05 - MaartenLitmaath
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback