Page 3 of 3
Re: Add Nagios 3.2.3 server to Nagios XI configuration
Posted: Tue Nov 09, 2021 10:45 am
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
(
)
Re: Add Nagios 3.2.3 server to Nagios XI configuration
Posted: Tue Nov 09, 2021 2:35 pm
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.
Re: Add Nagios 3.2.3 server to Nagios XI configuration
Posted: Tue Nov 09, 2021 3:08 pm
by frankwijers
Here we go.
Re: Add Nagios 3.2.3 server to Nagios XI configuration
Posted: Wed Nov 10, 2021 9:54 am
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
Re: Add Nagios 3.2.3 server to Nagios XI configuration
Posted: Wed Nov 10, 2021 11:03 am
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.
Re: Add Nagios 3.2.3 server to Nagios XI configuration
Posted: Wed Nov 10, 2021 11:49 am
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.
Re: Add Nagios 3.2.3 server to Nagios XI configuration
Posted: Thu Nov 11, 2021 1:44 am
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.
Re: Add Nagios 3.2.3 server to Nagios XI configuration
Posted: Thu Nov 11, 2021 9:52 am
by tgriep
Your welcome.
That is good news that it is working now.