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

Leave a Reply

Your email address will not be published. Required fields are marked *