Category Archives: Nagios

Pnp4nagios Pi – Integrate With Nagios Web Interface

Pnp4nagios Pi – Integrate With Nagios Web Interface

Define pnp4nagios host and service definitions

Pnp4nagios can be integrated in to Nagios using the action_url directive in host and service definitions to add an icon / link to graphs.

The first step to integrate pnp4nagios with the Nagios web interface is to define host and service definitions by performing the following steps:

  • Logon to the Raspberry Pi and execute the following command to become root:
sudo -i
  • Backup the existing  /usr/local/nagios/etc/objects/template.cfg file (Optional step)
cp /usr/local/nagios/etc/objects/templates.cfg /usr/local/nagios/etc/objects/templates.cfg-beforepnp4nagios
  • Next edit /usr/local/nagios/etc/objects/templates.cfg using the editor of your choice
  • Go to the end of the file and add the host and services definitions below:
define host {
   name host-pnp
   action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=HOST
   register 0
}

define service {
   name service-pnp
   action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
   register 0
}

Update the Nagios generic definitions

  • Next locate the generic-host definition and add in the line shown below in bold:
define host{
        name            generic-host ; The name of this host template
        use             host-pnp
  • FInally locate the generic-service definition and add in the line shown below in bold:
define service{
    name                generic-service ; The 'name' of this service template
    use                 service-pnp
  • Save and exit the file
  • Following the modifications to the templates.cfg file Nagios needs to be restarted by executing the following command:
systemctl restart nagios

PHP 7 Modification

Following the installation and configuration of pnp4nagios I encountered the error shown in the screen shot below:

A quick google turned up the following article https://github.com/lingej/pnp4nagios/issues/148 which gave the solution below for me as my Pi is running PHP 7:

  • Edit the /usr/local/pnp4nagios/share/application/models/data.php file
  • Go to line 979 and change if(sizeof($pages) > 0 ){ to if(is_arrary($pages) && sizeof($pages) > 0 ){
  • Save and exit the file

Pnp4nagios Pi – Configuring Nagios Commands

Pnp4nagios Pi – Configuring Nagios Commands

Configure Nagios to process performance data

Following the successful installation of pnp4nagios the next step is to configure Nagios to process performance data as well as send the data to pnp4nagios. The configuration for this piece is performed by editing the main nagios.cfg file to first enable processing of performance data, then configure the performance data file settings for hosts and services.

To modify configure Nagios to process performance data and configure the performance data file settings for hosts and services perform the following steps:

  • Logon to the Raspberry Pi and execute the following command to become root:
sudo -i
  • Backup the existing /usr/local/nagios/etc/nagios.cfg file (Optional step)
cp /usr/local/nagios/etc/nagios.cfg /usr/local/nagios/etc/nagios.cfg-beforepnp4nagios
  • Edit /usr/local/nagios/etc/nagios.cfg using the editor of your choice
  • Locate the line process_performance_date=0 to process_performance_date=1 as shown below:
# PROCESS PERFORMANCE DATA OPTION
# This determines whether or not Nagios will process performance
# data returned from service and host checks. If this option is
# enabled, host performance data will be processed using the
# host_perfdata_command (defined below) and service performance
# data will be processed using the service_perfdata_command (also
#defined below). Read the HTML docs for more information on
#performance data.
#Values: 1 = process performance data, 0 = do not process performance data

process_performance_data=1
  • Next locate the line starting with #host_perfdata_file= and add in the two lines in bold as shown below to set the performance data file locations to pnp4nagios:
# HOST AND SERVICE PERFORMANCE DATA FILES
# These files are used to store host and service performance data.
# Performance data is only written to these files if the
# enable_performance_data option (above) is set to 1.

#host_perfdata_file=/usr/local/nagios/var/host-perfdata
#service_perfdata_file=/usr/local/nagios/var/service-perfdata

host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata
  • Next locate the line starting with #host_perfdata_file_template= and add in the two lines in bold as shown below to set the data file templates:
# HOST AND SERVICE PERFORMANCE DATA FILE TEMPLATES
# These options determine what data is written (and how) to the
# performance data files. The templates may contain macros, special
# characters (\t for tab, \r for carriage return, \n for newline)
# and plain text. A newline is automatically added after each write
# to the performance data file. Some examples of what you can do are
# shown below.

#host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
#service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$

host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
  • Next locate the line starting with #host_perfdata_file_mode=a and add the two lines in bold as shown below:
# HOST AND SERVICE PERFORMANCE DATA FILE MODES
# This option determines whether or not the host and service
# performance data files are opened in write ("w") or append ("a")
# mode. If you want to use named pipes, you should use the special
# pipe ("p") mode which avoid blocking at startup, otherwise you will
# likely want the default append ("a") mode.

#host_perfdata_file_mode=a
#service_perfdata_file_mode=a

host_perfdata_file_mode=a
service_perfdata_file_mode=a
  • Next locate the line starting with #host_perfdata_file_processing_interval= and add the two lines in bold as shown below:
# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING INTERVAL
# These options determine how often (in seconds) the host and service
# performance data files are processed using the commands defined
# below. A value of 0 indicates the files should not be periodically
# processed.

#host_perfdata_file_processing_interval=0
#service_perfdata_file_processing_interval=0

host_perfdata_file_processing_interval=15
service_perfdata_file_processing_interval=15
  • Next locate the line starting with #host_perfdata_file_processing_command= and add the two lines in bold as shown below:
# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING COMMANDS
# These commands are used to periodically process the host and
# service performance data files. The interval at which the
# processing occurs is determined by the options above.

#host_perfdata_file_processing_command=process-host-perfdata-file
#service_perfdata_file_processing_command=process-service-perfdata-file

host_perfdata_file_processing_command=process-host-perfdata-file-bulk-npcd
service_perfdata_file_processing_command=process-service-perfdata-file-bulk-npcd
  • Save and exit the file

Configure the Nagios commands

The next step in the process is to add the commands to Nagios which will be used to process the performance data with pnp4nagios by performing the following steps:

  • Backup the existing /usr/local/nagios/etc/objects/commands.cfg file (Optional step)
cp /usr/local/nagios/etc/objects/commands.cfg /usr/local/nagios/etc/objects/commands.cfg-beforepnp4nagios
  • Edit /usr/local/nagios/etc/objects/commands.cfg using the editor of your choice
  • Go to the end of the file and add the command definitions below:
define command {
    command_name    process-service-perfdata-file-bulk-npcd
    command_line    /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
    }

define command {
    command_name    process-host-perfdata-file-bulk-npcd
    command_line    /bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$
    }
  • Save and exit the file

Validate the Nagios config and restart Nagios

Once the configuration has been applied to Nagios it needs to be validated and restarted by performing the following steps:

  • Validate the Nagios configuration by executing the following command:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
  • Next restart Nagios by executing the following command:
systemctl restart nagios

Next, proceed on to the next article in the series to integrate with the Nagios Core Web Interface.

Pnp4nagios Pi – Installing pnp4nagios

Pnp4nagios Pi – Installing pnp4nagios

Introduction

This article explains how to implement pnp4nagios on a Raspberry Pu running Raspian Buster Lite and Nagios Core 4.4.5.

pnp4nagios is an add-on for Nagios Core which analyzes performance data provided by plugins and stores them automatically into RRD-databases. This data can then be displayed as graphs for host and service checks.

Prerequisites

In order to implement pnp4nagios on a Raspberry Pi running Raspian Buster Lite and Nagios 4.4.5 the following pre-requisites must be met:

  • Nagios Core installed

Preparing to install pnp4nagios

Before installing pnp4nagios the prerequisite packages need to be installed and the software downloaded

To prepare for the installation of pnp4nagios perform the following steps:

  • Logon to the Raspberry Pi and execute the following command to become root:
sudo -i
  • The next step is to install the pre-requisite packages by executing the following commands:
apt-get update
apt-get -y install rrdtool librrds-perl php-gd php-xml
  • Once the prerequisite packages have been installed download and unpack the source code by executing the following commands:
cd /tmp
wget -O pnp4nagios-0.6.26.tar.gz https://sourceforge.net/projects/pnp4nagios/files/latest
tar -zxf pnp4nagios-0.6.26.tar.gz

Compiling and installing pnp4nagios

Once the system has been prepared and the software downloaded, perform the following steps to compile and install pnp4nagios:

  • To configure pnp4nagios execute the following commands:
cd pnp4nagios-0.6.26/
./configure --with-httpd-conf=/etc/apache2/sites-enabled
make all
  • To install pnp4nagios once it has been compiled execute the following commands:
make install
make install-webconf
make install-config
make install-init

Configure and start / restart daemons

The last part of the installation process for pnp4nagios is to configure and start / restart daemons on the server by performing the following steps:

  • To configure and start the npcd daemon execute the following commands:
systemctl daemon-reload
systemctl enable npcd.service
systemctl start npcd
  • The final step is to restart Apache on the server by executing the following command:
systemctl restart Apache

Next, proceed on to the next article in the series to configure Nagios commands.

Nagios Pi – Implementing SNMP Monitoring

Nagios Pi – Implementing SNMP Monitoring

This article explains how to implement SNMP Monitoring through Nagios on a Raspberry Pu running Raspian Buster Lite.

The check_snmp plugin is part of the Nagios Core Plugins and can be used to monitor various network devices.

This article will not cover configuring SNMP on the target devices but will provide details of the configuration set up on a Cisco SG300-10 switch.

Pre-Requisites

In order to implement SNMP Monitoring through Nagios the following pre-requisites must be met:

  • Nagios Core installed
  • SNMP configured on the target device(s)

Installing SNMP

For the purposes of this article only the SNMP agent was installed on the Raspberry Pi as I do not intend to monitor itself through SNMP but monitor network devices. To install SNMP perform the following steps:

  • Logon to the Raspberry Pi and execute the following commands:
sudo apt-get update
sudo apt-get install snmp
  • The next step is to install the MIBs using the snmp-mibs-downloader package by executing the following command:
sudo apt-get install snmp-mibs-downloader
  • The package will install and download various SNMP MIB files to the device, including the IF-MIB which will be used in this article.
  • Once the installations have completed test that an snmpwalk can contact and enumerate your target device. For the purposes on this article I am using a Cisco SG300-10 switch with the following configuration:
    • IP Address – 192.168.0.254
    • SNMP Version – V2
    • Community String – readonlyv2
  • The command below will execute an snmpwalk to IP Address 192.168.0.254 using SNMP V2, a community string of readonlyv2, instruct snmpwalk to only load the IF-MIB, and finally grep for ifOper to find out the status of the switch ports:
snmpwalk -v2c -c readonlyv2 192.168.0.254 -m IF-MIB | grep ifOper
IF-MIB::ifOperStatus.49 = INTEGER: up(1)
IF-MIB::ifOperStatus.50 = INTEGER: up(1)
IF-MIB::ifOperStatus.51 = INTEGER: up(1)
IF-MIB::ifOperStatus.52 = INTEGER: up(1)
IF-MIB::ifOperStatus.53 = INTEGER: up(1)
IF-MIB::ifOperStatus.54 = INTEGER: up(1)
IF-MIB::ifOperStatus.55 = INTEGER: up(1)
IF-MIB::ifOperStatus.56 = INTEGER: up(1)
IF-MIB::ifOperStatus.57 = INTEGER: up(1)
IF-MIB::ifOperStatus.58 = INTEGER: down(2)
  • From the above example we are able to snmpwalk the switch and find the ifOperStatus for the 10 switch ports (ifOperStatus.49 to ifOperStatus.58)

Installing the Net-SNMP Perl Module

The next step is to install the Net-SNMP Perl Module using the apt-file command by performing the following steps:

  • Execute the following command to install the Net-SNMP module:
sudo apt-get install libnet-snmp-perl

Testing it works

Once SNMP, MIBs, and the Net-SNMP Perl module have been successfully installed you can test the check_snmp plugin from the command line by performing the following steps:

  • Change directory to /usr/local/nagios/libexec and execute the check_snmp.pl script for the first interface of the switch (ifOperStatus.49 in my case):
./check_snmp -H 192.168.0.254 -C readonlyv2 -o ifOperStatus.49 -r 1 -m IF-MIB
SNMP OK - up(1) |
  • The example above uses the -r 1 to inform the plugin to return OK if the interface is UP and uses the IF-MIB file

Adding a Host and Service definition to Nagios

The next step is to add a Host and Service Definition to Nagios to allow monitoring of the Cisco Switch by performing the following steps:

  • Create a new Host definition for Nagios. The example below has been created for the Cisco SG300-10 switch used for this article:
define host {
use           generic-switch 
host_name     cisco-kid 
alias Cisco   SG300-10 Switch 
address       192.168.0.254
hostgroups    switches
}
  • Add a Service definition for Nagios. The example below has been created to check that Port 1 of the SG300-10 switch is UP:
define service {
use                   generic-service
host_name             cisco-kid
service_description   IF1-Uplinks 
check_command check_snmp!-C lost-it-local-read -o ifOperStatus.49 -r 1 -m IF-MIB check_interval 5 retry_interval 1
}
  • Once the Host and Service definitions have been added restart Nagios by executing the following command:
sudo systemctl restart nagios

Confirm Nagios is working

Once the Host and Service definitions have been added and Nagios restarted you will be able to see the Interface check results as shown in the screen shot below:

In the example above I have also added a check for Port 10 of the switches which are currently unplugged to show the results for both an up and down interface.

Nagios Pi Part Four

Nagios Pi Part Four

Since my last post I decided to concentrate on looking in to setting up distributed monitoring with Nagios Core servers and using my Nagios Pi installation as the central server.  I looked around at the various options and went for using NRDP (Nagios Remote Data Protocol) as it enables me to use passive checks on the central server.

Continue reading Nagios Pi Part Four

Nagios – Resolving a HTTP Service Warning HTTP/1.1 403 Forbidden

Nagios – Resolving a HTTP Service Warning  HTTP/1.1 403 Forbidden

This article provides details on how to resolve a HTTP Warning for the the HTTP service on the Nagios server when running on CentOS 7.

To resolve the warning so that it shows as OK perform the following steps:

  • Login to the Nagios server
  • Edit the file /usr/local/nagios/etc/objects/localhost.cfg
  • Locate the HTTP service and change the check_command to the following:
define service {
  use                      local-service
  host_name                NAG-REMOTE
  service_description      HTTP
  check_command            check_http!--expect="403"
  notifications_enabled    0
}
  • Save and exit the file
  • Restart the Nagios service by executing the following:
systemctl restart nagios

The changed command will now expect the 403 forbidden message and now give a result of OK rather than a WARNING.

Nagios NRDP – Testing The Configuration

Nagios NRDP – Testing The Configuration

The final part of this series to to test the configuration to ensure that the remote Nagios server triggers the send_nrdp global event commands and that the central Nagios server receives them and changes the states accordingly.

For the purposes of this testing I stopped the nagios services on both service so that the checks are performed and I can show the log entries on both servers as well as initial states and so on.

  • After starting the nagios service on the central Nagios server the host and services will show as PENDING as shown below:

Central Server – Initial Host and Services state

central-server-nrdp-initial-states

  • After starting the nagios service on the remote Nagios server, the first check performed is for the host. The host changes to UPand below you can see the host becomes UP on the central Nagios server:

nrdp-passive-host-up

  • In the remote nagios logs /usr/local/nagios/var/nagios.log we can see that the Global Event handler command is triggered:
[1576510881] GLOBAL HOST EVENT HANDLER: NAG-REMOTE;UP;HARD;1;global_send_nrdp
  • In the central nagios logs /usr/local/nagios/var/nagios.log we can see the passive check has been received:
[1576510886] PASSIVE HOST CHECK: NAG-REMOTE;0;(null)
  • As the service checks are performed on the remote Nagios server their state is updated on the central Nagios server as shown below:

nrdp-passive-host-and-services-update

  • In the remote Nagios server logs /usr/local/nagios/var/nagios.log we can see the global event handler commands have been triggered:
[1576510952] SERVICE ALERT: NAG-REMOTE;Current Load;OK;HARD;4;OK - load average: 0.00, 0.01, 0.05
[1576510952] GLOBAL SERVICE EVENT HANDLER: NAG-REMOTE;Current Load;OK;HARD;4;global_service_send_nrdp
[1576510989] SERVICE ALERT: NAG-REMOTE;Root Partition;OK;HARD;4;DISK OK - free space: / 15468 MB (88.92% inode=99%):
[1576510989] GLOBAL SERVICE EVENT HANDLER: NAG-REMOTE;Root Partition;OK;HARD;4;global_service_send_nrdp
[1576511027] SERVICE ALERT: NAG-REMOTE;Current Users;OK;HARD;4;USERS OK - 1 users currently logged in
[1576511027] GLOBAL SERVICE EVENT HANDLER: NAG-REMOTE;Current Users;OK;HARD;4;global_service_send_nrdp
[1576511031] HOST ALERT: test;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.04 ms
[1576511031] GLOBAL HOST EVENT HANDLER: test;UP;HARD;1;global_send_nrdp
[1576511064] SERVICE ALERT: NAG-REMOTE;SSH;OK;HARD;4;SSH OK - OpenSSH_7.4 (protocol 2.0)
[1576511064] GLOBAL SERVICE EVENT HANDLER: NAG-REMOTE;SSH;OK;HARD;4;global_service_send_nrdp
[1576511102] SERVICE ALERT: NAG-REMOTE;HTTP;WARNING;HARD;4;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.001 second response time
[1576511102] GLOBAL SERVICE EVENT HANDLER: NAG-REMOTE;HTTP;WARNING;HARD;4;global_service_send_nrdp
[1576511139] SERVICE ALERT: NAG-REMOTE;Swap Usage;OK;HARD;4;SWAP OK - 100% free (2047 MB out of 2047 MB)
[1576511139] GLOBAL SERVICE EVENT HANDLER: NAG-REMOTE;Swap Usage;OK;HARD;4;global_service_send_nrdp
[1576511177] SERVICE ALERT: NAG-REMOTE;Total Processes;OK;HARD;4;PROCS OK: 72 processes with STATE = RSZDT
[1576511177] GLOBAL SERVICE EVENT HANDLER: NAG-REMOTE;Total Processes;OK;HARD;4;global_service_send_nrdp
[1576511181] SERVICE ALERT: NAG-REMOTE;PING;OK;HARD;4;PING OK - Packet loss = 0%, RTA = 0.03 ms
[1576511181] GLOBAL SERVICE EVENT HANDLER: NAG-REMOTE;PING;OK;HARD;4;global_service_send_nrdp
  • In the central nagios logs /usr/local/nagios/var/nagios.log we can see the passive checks have been received:
[1576510956] PASSIVE SERVICE CHECK: NAG-REMOTE;Current Load;0;(null)
[1576510996] PASSIVE SERVICE CHECK: NAG-REMOTE;Root Partition;0;(null)
[1576511036] Error: Got host checkresult for 'test', but no such host can be found
[1576511036] PASSIVE SERVICE CHECK: NAG-REMOTE;Current Users;0;(null)
[1576511066] PASSIVE SERVICE CHECK: NAG-REMOTE;SSH;0;(null)
[1576511106] PASSIVE SERVICE CHECK: NAG-REMOTE;HTTP;0;(null)
[1576511106] SERVICE NOTIFICATION: nagiosadmin;NAG-REMOTE;HTTP;WARNING;notify-service-by-email;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.001 second response time
[1576511106] SERVICE NOTIFICATION: NickPage;NAG-REMOTE;HTTP;WARNING;notify-service-by-email;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.001 second response time
[1576511106] SERVICE ALERT: NAG-REMOTE;HTTP;WARNING;HARD;1;HTTP WARNING: HTTP/1.1 403 Forbidden - 5179 bytes in 0.001 second response time
[1576511146] PASSIVE SERVICE CHECK: NAG-REMOTE;Swap Usage;0;(null)
[1576511186] PASSIVE SERVICE CHECK: NAG-REMOTE;PING;0;(null)
[1576511186] PASSIVE SERVICE CHECK: NAG-REMOTE;Total Processes;0;(null)

Previous Page                                                                                                                                         Next Page

Nagios NRDP – Configuring The send_nrdp Global Event Commands

Nagios NRDP – Configuring The send_nrdp Global Event Commands

This following pages of this article explain how to set up the global event commands on the remote Nagios server NAG-REMOTE to use the send_nrdp.py client and send check results to the central Nagios server NAG-CENTRAL.

Remote Server – Configuring a Global Host Event  Command

To configure a Global Host Event Command on the remote Nagios server NAG-REMOTE perform the following steps:

  • SSH to NAG-REMOTE as a normal user
  • Switch to root in by executing the command below:
su
  • Edit /usr/local/nagios/etc/objects/commands.cfg
vi /usr/local/nagios/etc/objects/commands.cfg
  • Go to the end of the file and add in a new command as shown below, substituting the {Your Nagios server address here} with the IP Address of your Nagios Server with NRDP installed and configured and substituting {Your nrdp token here} with the token you created when setting up NRDP:
define command {
 command_name global_host_send_nrdp
 command_line /usr/bin/printf "%b" "$HOSTNAME$\t$HOSTSTATEID$\t$HOSTOUTPUT$" | $USER3$/send_nrdp.py -u http://{Your Nagios server address here}/nrdp/ -t {Your nrdp token here}
}
  • Save and exit the file
  • Edit /usr/local/nagios/etc/nagios.cfg
vi /usr/local/nagios/etc/nagios.cfg
  • Search for the line #global_host_event_handler=somecommand and change it to the following:
global_host_event_handler=global_host_send_nrdp
  • Save and exit the file
  • Restart the nagios service

Remote Server – Configuring a Global Service Event Command

The next piece of configuration on the Remote Server is to configure a Global Service Event Command which will then be used to send check results to the Central Nagios server via send_nrdp.py.

To configure  a Global Host Event Command perform the following steps:

  • Edit /usr/local/nagios/etc/objects/commands.cfg
vi /usr/local/nagios/etc/objects/commands.cfg
  • Go to the end of the file and add in a new command as shown below, substituting the {Your Nagios server address here} with the IP Address of your Nagios Server with NRDP installed and configured and substituting {Your nrdp token here} with the token you created when setting up NRDP:
define command {
 command_name global_service_send_nrdp
 command_line /usr/bin/printf "%b" "$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATEID$\t$SERVICEOUTPUT$" | $USER3$/send_nrdp.py -u http://{Your Nagios server address here}/nrdp/ -t {Your nrdp token here}
}
  • Save and exit the file
  • Edit /usr/local/nagios/etc/nagios.cfg
vi /usr/local/nagios/etc/nagios.cfg
  • Search for the line #global_service_event_handler=somecommand and change it to the following:
global_service_event_handler=global_service_send_nrdp
  • Save and exit the file
  • Restart the nagios service

Previous Page                                                                                                                                          Next Page