Monitor multiple Nagios Core servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Monitor multiple Nagios Core servers

Post by cyient »

Hi,

I have run the code and output is as below.

Code: Select all

# curl http://172.23.4.41/nrdp/?cmd=hello
<?xml version="1.0" encoding="utf-8"?>
<response>
  <status>0</status>
  <message>OK</message>
  <product>nrdp</product>
  <version>1.2</version>
</response>
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor multiple Nagios Core servers

Post by tmcdonald »

Do you already have hosts and services set up in the XI machine that match the servers you are trying to monitor? If so, they should be updating and nothing should show in Unconfigured Objects. First make sure this is not the case.

Then, if they still are not coming in, run the following command on the Nagios XI server:

Code: Select all

tcpdump -naAeX 'port 80' | grep -A2 'nrdp'
and then run the curl again from the other server *while the tcpdump command is still running on XI*. Hit ctrl+C on the tcpdump and post the results.
Former Nagios employee
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Monitor multiple Nagios Core servers

Post by cyient »

Hi,

I'm running trail version of Nagios XI to test "monitoring multiple Nagios Core Servers" feature, licensing does not have affect on this right ?

I have defined only ping service for a host and it's not updating on Nagios XI, same service is not reflecting in unconfigured object.

Please find the output of tcpdump command run on Nagios XI server.

Code: Select all

[root@testserver ~]# tcpdump -naAeX 'port 80' | grep -A2 'nrdp'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
        0x0030:  8ce2 db35 4745 5420 2f6e 7264 702f 3f63  ...5GET./nrdp/?c
        0x0040:  6d64 3d68 656c 6c6f 2048 5454 502f 312e  md=hello.HTTP/1.
        0x0050:  310d                                     1.
31 packets captured
31 packets received by filter
0 packets dropped by kernel

[root@testserver ~]#
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor multiple Nagios Core servers

Post by tmcdonald »

I want to make sure you followed the post correctly. Please PM me your system profile (Admin -> System Profile) as well as your service_check and host_check event handler files, and post back here when you have sent them.

Tech Note: Received and placed in directory.
Former Nagios employee
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Monitor multiple Nagios Core servers

Post by cyient »

Hi,

I have PMed requested files.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor multiple Nagios Core servers

Post by tmcdonald »

Please run the following command from one of the remote Nagios Core servers and post the results:

Code: Select all

bash /path/to/service_check nagtesthost nagtsetservice 0 "Just a test"
Then after a minute or two check the Unconfigured Objects on the Nagios XI server and look for the nagtesthost and nagtestservice entries.
Former Nagios employee
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Monitor multiple Nagios Core servers

Post by cyient »

I have run the code and below is the output.

Code: Select all

[root@singapore ~]# bash /usr/local/nagios/libexec/eventhandlers/service_check nagtesthost nagtestservice 0 "just a test"
Sent 1 checks to http://172.23.4.41/nrdp/
I found the nagtesthost and nagtestservice under unconfigured objects in Nagios XI server.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor multiple Nagios Core servers

Post by tmcdonald »

Did you follow the whole post when setting this up? Make sure you defined the OSCP and obsess settings:
scottwilkerson wrote:The master Nagios machine must use OCSP and OCHP in order to send the proper updates to
the central server.

The default nagios.cfg has these settings.

Code: Select all

obsess_over_services=0
#ocsp_command=somecommand
obsess_over_hosts=0
#ochp_command=somecommand
Change the nagios.cfg settings to those below. The timeout prevents your Nagios server from spending too much time
on one command.

Code: Select all

obsess_over_services=1
ocsp_command=service_check
ocsp_timeout=5
obsess_over_hosts=1
ochp_command=host_check
ochp_timeout=5
and created the commands:
scottwilkerson wrote: Then add 2 commands under Configure -> CCM -> Commands:

Code: Select all

command=service_check
command line*=$USER1$/eventhandlers/service_check $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$'
Command type=misc command

Code: Select all

command=host_check
command line*=$USER1$/eventhandlers/host_check $HOSTNAME$ $HOSTSTATEID$ '$HOSTOUTPUT$'
Command type=misc command
You will need to make these adjustments on your Core systems (even though the instructions were written for XI). Can you send over the commands.cfg file and the nagios.cfg file for the remote Core machines?
Former Nagios employee
cyient
Posts: 116
Joined: Thu May 08, 2014 4:45 am

Re: Monitor multiple Nagios Core servers

Post by cyient »

I haved Pmed the requested details.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor multiple Nagios Core servers

Post by tmcdonald »

I don't have a PM from you it seems and I never received an email saying I did. The last one I have from you is from June 13. Did you send it to me or someone else?

Received and placed in shared folder
Former Nagios employee
Locked