NRDP checks not reporting to main Nagios XI install

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NRDP checks not reporting to main Nagios XI install

Post by cdienger »

Run the following on the sending device:

Code: Select all

curl -XPOST https://monitor.c1.net.au/nrdp/ -d 'cmd=submitcheck&token=NRDP_TOKEN&JSONDATA=%7B%0A%20%20%20%20%22checkresults%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22checkresult%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22host%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22checktype%22%3A%20%221%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22hostname%22%3A%20%22somehost%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22state%22%3A%20%220%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22output%22%3A%20%22Everything%20looks%20okay!%20%7C%20perfdata%3D1%3B%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D%0A' -k -v
and:

Code: Select all

curl -XPOST http://monitor.c1.net.au/nrdp/ -d 'cmd=submitcheck&token=NRDP_TOKEN&JSONDATA=%7B%0A%20%20%20%20%22checkresults%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22checkresult%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22host%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22checktype%22%3A%20%221%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22hostname%22%3A%20%22somehost%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22state%22%3A%20%220%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22output%22%3A%20%22Everything%20looks%20okay!%20%7C%20perfdata%3D1%3B%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%7D%0A' -v
Make sure to replace NRDP_TOKEN with your actual token. The receiving XI appears to be recognizing the nrpd interface on http. If you point your browser to https://monitor.c1.net.au/nrdp/, does the page open?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
benh
Posts: 14
Joined: Tue Feb 04, 2020 7:50 pm

Re: NRDP checks not reporting to main Nagios XI install

Post by benh »

The commands to directly check from sender were both sitting there doing nothing.

But it did reveal that even though I had put an IP address directly into the sender config, that it was then trying to use a FQDN for the post command, and that it was resolving the external address and not the internal one.

Once I dropped a host entry into the sender and re-ran those http/https checks they immediately came back with success post as below.

Am waiting to see if anything appears in unconfigured objects currently.

About to connect() to <FQDN> port 443 (#0)
* Trying <IP>...
* Connected to <FQDN> (<IP>) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* subject: E=root@localhost.localdomain,CN=localhost.localdomain,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--
* start date: Aug 22 16:21:40 2012 GMT
* expire date: Aug 22 16:21:40 2013 GMT
* common name: localhost.localdomain
* issuer: E=root@localhost.localdomain,CN=localhost.localdomain,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--
> POST /nrdp/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <FQDN>
> Accept: */*
> Content-Length: 695
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 695 out of 695 bytes
< HTTP/1.1 200 OK
< Date: Sun, 09 Feb 2020 20:55:03 GMT
< Server: Apache/2.2.15 (CentOS)
< X-Powered-By: PHP/5.3.3
< Content-Length: 87
< Connection: close
< Content-Type: application/json
<
{ "result" : { "status" : "0", "message" : "OK", "output" : "1 checks processed." } }
* Closing connection 0


About to connect() to <FQDN> port 80 (#0)
* Trying <IP>...
* Connected to <FQDN> (<IP>) port 80 (#0)
> POST /nrdp/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <FQDN>
> Accept: */*
> Content-Length: 695
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 695 out of 695 bytes
< HTTP/1.1 200 OK
< Date: Sun, 09 Feb 2020 20:55:09 GMT
< Server: Apache/2.2.15 (CentOS)
< X-Powered-By: PHP/5.3.3
< Content-Length: 87
< Connection: close
< Content-Type: application/json
<
{ "result" : { "status" : "0", "message" : "OK", "output" : "1 checks processed." } }
* Closing connection 0
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP checks not reporting to main Nagios XI install

Post by scottwilkerson »

That looks correct, may we mark this resolved?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
benh
Posts: 14
Joined: Tue Feb 04, 2020 7:50 pm

Re: NRDP checks not reporting to main Nagios XI install

Post by benh »

Hi Scott,

As there is still no objects coming through in unconfigured I don't think we can.

All I know is that the sender is correctly comm'ing tot he receiver, but nothing is showing up still.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP checks not reporting to main Nagios XI install

Post by scottwilkerson »

benh wrote:Hi Scott,

As there is still no objects coming through in unconfigured I don't think we can.

All I know is that the sender is correctly comm'ing tot he receiver, but nothing is showing up still.
Do you have a host configured called "somehost"?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
benh
Posts: 14
Joined: Tue Feb 04, 2020 7:50 pm

Re: NRDP checks not reporting to main Nagios XI install

Post by benh »

I see a "somehost" in the unconfigured objects on the receiving server

However the sending NAgiosXI instance has 120 differnet hosts configured, none with that name.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NRDP checks not reporting to main Nagios XI install

Post by Box293 »

So are these 120 objects actually working and updating? For instance if the checks were not being scheduled they would not be returning data and hence NRDP would not be sending anything to the other server.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
benh
Posts: 14
Joined: Tue Feb 04, 2020 7:50 pm

Re: NRDP checks not reporting to main Nagios XI install

Post by benh »

Yes the sending server is online and actively checking.

I've attached a screenshot showing that checks were performed only a few minutes ago.
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NRDP checks not reporting to main Nagios XI install

Post by Box293 »

On the sending server tail the log file with this command:

Code: Select all

tail /usr/local/nagiosxi/var/cmdsubsys.log -f
Do you get any information about outbound checks?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
benh
Posts: 14
Joined: Tue Feb 04, 2020 7:50 pm

Re: NRDP checks not reporting to main Nagios XI install

Post by benh »

I'm not seeing anything about outboundchecks.

On a hunch I forced a host check as below.

[root@localhost ~]# tail /usr/local/nagiosxi/var/cmdsubsys.log -f
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
.............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
..........................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
...............................PROCESSING COMMAND ID 44...
Setting new htaccess credentials
Updating password for user bh_admin
OUTPUT=
RETURNCODE=0
.........................PROCESSING COMMAND ID 45...
PROCESS COMMAND: CMD=16, DATA={"host_name":"C1-LLW-ESX01","cmd":98,"start_time":1581392755}
COMMAND DATA: {"host_name":"C1-LLW-ESX01","cmd":98,"start_time":1581392755}
CMDARR:
Array
(
[host_name] => C1-LLW-ESX01
[cmd] => 98
[start_time] => 1581392755
)
CORE CMD: SCHEDULE_FORCED_HOST_CHECK;C1-LLW-ESX01;1581392755
SUBMITTING A NAGIOSCORE COMMAND...
....
PROCESSED 2 COMMANDS
Locked