The major goal of the regional server is to distribute the results of all service checks to the central server. The regional Nagios machines must use OCSP and OCHP in order to send the proper updates to the central server.
The blue represents the regional server so that it is transferring the information that it collects from the servers, routers and switches it is monitoring to the central Nagios server. The same settings for NSCA that you did for passive checks will have to be set up for this server and you will need to use the same password and encryption scheme as on the central server. See that link as it has not been repeated here.
The default nagios.cfg has these settings.
Change the nagios.cfg settings to those below. The timeout prevents your Nagios server from spending too much time on one command.
You will need to create two scripts in the /usr/lib/nagios/plugins/eventhandlers/distributed-monitoring directory. This script is key to transferring the proper information to your central server.
# Service Check
/bin/echo -e “$HOST\t$SRV\t$RESULT\t$OUTPUT\n” | $CMD -H nagios -c $CFG
nagios is = to your central Nagios server
# Host Check
/bin/echo -e “$HOST\t$RESULT\t$OUTPUT\n” | $CMD -H nagios -c $CFG
chmod 755 service_check
chmod 755 host_check
Create a file called misccommands.cfg in the /etc/nagios/objects directory so you can add the new commands.
command_line $USER1$/eventhandlers/distributed-monitoring/service_check $HOSTNAME$ ‘$SERVICEDEC$’ $SERVICESTATEID$ ‘$SERVICEOUTPUT$’
command_line $USER1$/eventhandlers/distributed-monitoring/host_check $HOSTNAME$ $SERVICESTATEID$ ‘$SERVICEOUTPUT$’
Be sure to add this line to your nagios.cfg file.