Add Nagios 3.2.3 server to Nagios xi configuration

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
frankwijers
Posts: 22
Joined: Fri Apr 09, 2021 6:22 am

Re: Add Nagios 3.2.3 server to Nagios xi configuration

Post by frankwijers »

Here's a part of the log (I see the same 3 to 4 times a second):

[Tue, 09 Nov 2021 16:43:16 +0100] all nrdp checks have been written
[Tue, 09 Nov 2021 16:43:16 +0100] check_auth()
[Tue, 09 Nov 2021 16:43:16 +0100] check_token()
[Tue, 09 Nov 2021 16:43:16 +0100] checking token: XXXX
[Tue, 09 Nov 2021 16:43:16 +0100] * token passed
[Tue, 09 Nov 2021 16:43:16 +0100] nagioscorecmd_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Tue, 09 Nov 2021 16:43:16 +0100] nagioscorecmd_process_request() had no registered callbacks, returning
[Tue, 09 Nov 2021 16:43:16 +0100] nagioscorepassivecheck_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Tue, 09 Nov 2021 16:43:16 +0100] REQUEST: [token] XXXX
[Tue, 09 Nov 2021 16:43:16 +0100] REQUEST: [cmd] submitcheck
[Tue, 09 Nov 2021 16:43:16 +0100] REQUEST: [XMLDATA] <?xml version='1.0'?><checkresults></checkresults>
[Tue, 09 Nov 2021 16:43:16 +0100] our xml: SimpleXMLElement Object
(
)
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Add Nagios 3.2.3 server to Nagios xi configuration

Post by tgriep »

No errors that I can see so could you post your Nagios xi System Profile so we can review it?
To get your system profile. Login to the Nagios xi GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and upload it to the forum post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
frankwijers
Posts: 22
Joined: Fri Apr 09, 2021 6:22 am

Re: Add Nagios 3.2.3 server to Nagios xi configuration

Post by frankwijers »

Here we go.
Last edited by tgriep on Wed Nov 10, 2021 9:53 am, edited 1 time in total.
Reason: Removed Profile from post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Add Nagios 3.2.3 server to Nagios xi configuration

Post by tgriep »

First, upgrade xi on the server to the latest version of xi.

There was an update to NRDP for processing spooled XML data that might fix the issue.
Follow this document to manually upgrade xi.
https://assets.nagios.com/downloads/nag ... ctions.pdf

In the NRDP log, do you see the following data in it showing the data and writing the output to cmd?

Code: Select all

[Tue, 09 Nov 2021 08:55:46 -0600] REQUEST: [token] nrdppass
[Tue, 09 Nov 2021 08:55:46 -0600] REQUEST: [cmd] submitcheck
[Tue, 09 Nov 2021 08:55:46 -0600] REQUEST: [xml] <?xml version='1.0'?>
                                      <checkresults>
                                      <checkresult type='service' checktype='1'>
                                          <servicename>nrdpservicepy</servicename><hostname>testnrdppy</hostname>
                                      <state>0</state>
                                      <output><![CDATA[test]]></output>
                                      </checkresult>
                                      </checkresults>
[Tue, 09 Nov 2021 08:55:46 -0600] our xml: SimpleXMLElement Object
                                  (
                                      [checkresult] => SimpleXMLElement Object
                                          (
                                              [@attributes] => Array
                                                  (
                                                      [type] => service
                                                      [checktype] => 1
                                                  )

                                              [servicename] => nrdpservicepy
                                              [hostname] => testnrdppy
                                              [state] => 0
                                              [output] => SimpleXMLElement Object
                                                  (
                                                  )

                                          )

                                  )

[Tue, 09 Nov 2021 08:55:46 -0600] gathered the following data:
                                  type: service
                                  hostname: testnrdppy
                                  servicename: nrdpservicepy
                                  state: 0
                                  output: test
                                  allow_old_results: 1
                                  time: 0

[Tue, 09 Nov 2021 08:55:46 -0600] nrdp_write_check_output_to_cmd(hostname=testnrdppy, servicename=nrdpservicepy, state=0, type=service, output=test
[Tue, 09 Nov 2021 08:55:46 -0600] nrdp_write_check_output_to_cmd() completed
[Tue, 09 Nov 2021 08:55:46 -0600] all nrdp checks have been written
Be sure to check out our Knowledgebase for helpful articles and solutions!
frankwijers
Posts: 22
Joined: Fri Apr 09, 2021 6:22 am

Re: Add Nagios 3.2.3 server to Nagios xi configuration

Post by frankwijers »

Did the upgrade to 5.8.7, still nothing. Debug.log:

Code: Select all

[Wed, 10 Nov 2021 17:00:08 +0100] all nrdp checks have been written
[Wed, 10 Nov 2021 17:00:08 +0100] check_auth()
[Wed, 10 Nov 2021 17:00:08 +0100] check_token()
[Wed, 10 Nov 2021 17:00:08 +0100]  checking token: XXXX
[Wed, 10 Nov 2021 17:00:08 +0100]  * token passed
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorecmd_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorecmd_process_request() had no registered callbacks, returning
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorepassivecheck_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [token] XXXX
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [cmd] submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [XMLDATA] <?xml version='1.0'?><checkresults></checkresults>
[Wed, 10 Nov 2021 17:00:08 +0100] our xml: SimpleXMLElement Object
                                  (
                                  )

[Wed, 10 Nov 2021 17:00:08 +0100] all nrdp checks have been written
[Wed, 10 Nov 2021 17:00:08 +0100] check_auth()
[Wed, 10 Nov 2021 17:00:08 +0100] check_token()
[Wed, 10 Nov 2021 17:00:08 +0100]  checking token: XXXX
[Wed, 10 Nov 2021 17:00:08 +0100]  * token passed
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorecmd_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorecmd_process_request() had no registered callbacks, returning
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorepassivecheck_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [token] XXXX
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [cmd] submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [XMLDATA] <?xml version='1.0'?><checkresults></checkresults>
[Wed, 10 Nov 2021 17:00:08 +0100] our xml: SimpleXMLElement Object
                                  (
                                  )

[Wed, 10 Nov 2021 17:00:08 +0100] all nrdp checks have been written
[Wed, 10 Nov 2021 17:00:08 +0100] check_auth()
[Wed, 10 Nov 2021 17:00:08 +0100] check_token()
[Wed, 10 Nov 2021 17:00:08 +0100]  checking token: XXXX
[Wed, 10 Nov 2021 17:00:08 +0100]  * token passed
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorecmd_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorecmd_process_request() had no registered callbacks, returning
[Wed, 10 Nov 2021 17:00:08 +0100] nagioscorepassivecheck_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [token] XXXX
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [cmd] submitcheck
[Wed, 10 Nov 2021 17:00:08 +0100] REQUEST: [XMLDATA] <?xml version='1.0'?><checkresults></checkresults>
[Wed, 10 Nov 2021 17:00:08 +0100] our xml: SimpleXMLElement Object
                                  (
                                  )


The checkresults part seems a little empty to me.

Did a little test and sent the data through the commandline on the core server, debug log now shows this:

Code: Select all

[Wed, 10 Nov 2021 17:06:14 +0100] check_auth()
[Wed, 10 Nov 2021 17:06:14 +0100] check_token()
[Wed, 10 Nov 2021 17:06:14 +0100]  checking token: XXXX
[Wed, 10 Nov 2021 17:06:14 +0100]  * token passed
[Wed, 10 Nov 2021 17:06:14 +0100] nagioscorecmd_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Wed, 10 Nov 2021 17:06:14 +0100] nagioscorecmd_process_request() had no registered callbacks, returning
[Wed, 10 Nov 2021 17:06:14 +0100] nagioscorepassivecheck_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Wed, 10 Nov 2021 17:06:14 +0100] REQUEST: [token] XXXX
[Wed, 10 Nov 2021 17:06:14 +0100] REQUEST: [cmd] submitcheck
[Wed, 10 Nov 2021 17:06:14 +0100] REQUEST: [XMLDATA] <?xml version='1.0'?><checkresults><checkresult type='service' checktype='1'><servicename>SQL Server-Agent MSSQLSERVER</servicename><hostname>sqlsrv02</hostname><state>0</state><output><![CDATA[SQLSERVERAGENT: Started]]></output></checkresult></checkresults>
[Wed, 10 Nov 2021 17:06:14 +0100] our xml: SimpleXMLElement Object
                                  (
                                      [checkresult] => SimpleXMLElement Object
                                          (
                                              [@attributes] => Array
                                                  (
                                                      [type] => service
                                                      [checktype] => 1
                                                  )

                                              [servicename] => SQL Server-Agent MSSQLSERVER
                                              [hostname] => sqlsrv02
                                              [state] => 0
                                              [output] => SimpleXMLElement Object
                                                  (
                                                  )

                                          )

                                  )

[Wed, 10 Nov 2021 17:06:14 +0100] gathered the following data:
                                  type: service
                                  hostname: sqlsrv02
                                  servicename: SQL Server-Agent MSSQLSERVER
                                  state: 0
                                  output: SQLSERVERAGENT: Started
                                  allow_old_results: 1
                                  time: 0

[Wed, 10 Nov 2021 17:06:14 +0100] nrdp_write_check_output_to_cmd(hostname=sqlsrv02, servicename=SQL Server-Agent MSSQLSERVER, state=0, type=service, output=SQLSERVERAGENT: Started
[Wed, 10 Nov 2021 17:06:14 +0100] nrdp_write_check_output_to_cmd() completed
[Wed, 10 Nov 2021 17:06:14 +0100] all nrdp checks have been written


I don't understand why this is working when I use the commandline and not when nagios is trying to send by itself.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Add Nagios 3.2.3 server to Nagios xi configuration

Post by tgriep »

Thanks for the details about the debug log.

If they are empty, then NRDP is not processing the XML data from the core server.

One thing I found, the send_nrpd.sh script is an older version so update it on the Core server with the attached copy.

See if that works.

One question was PHP upgraded on the xi server to version 7.x?

Thank you.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
frankwijers
Posts: 22
Joined: Fri Apr 09, 2021 6:22 am

Re: Add Nagios 3.2.3 server to Nagios xi configuration

Post by frankwijers »

The new script seems to have done the trick.
After I placed the file there, hosts and services popped up in seconds on the xi machine (which has PHP version 7.4.25).
Now time to add them to our system and place them in correct hostgroups.

Thanks a lot for your help.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Add Nagios 3.2.3 server to Nagios xi configuration

Post by tgriep »

Your welcome.
That is good news that it is working now.
Be sure to check out our Knowledgebase for helpful articles and solutions!