NRDP in logs but not registering
Posted: Thu Jan 20, 2022 11:03 pm
Hi All,
I'm attempting to setup distributed monitoring between a Nagios Core server and a Nagios XI server, with the core server sending updates on to the XI server. The Nagios XI server is Cent OS 7, and the Nagios Core is AWS Linux. I have got to the point that data is being sent as I can see it in the debug log in /usr/local/nrdp/server, looking like the below.
[Fri, 21 Jan 2022 14:57:19 +1100] nagioscorecmd_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Fri, 21 Jan 2022 14:57:19 +1100] nagioscorecmd_process_request() had no registered callbacks, returning
[Fri, 21 Jan 2022 14:57:19 +1100] nagioscorepassivecheck_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Fri, 21 Jan 2022 14:57:19 +1100] REQUEST: [token] t0ken
[Fri, 21 Jan 2022 14:57:19 +1100] REQUEST: [cmd] submitcheck
[Fri, 21 Jan 2022 14:57:19 +1100] REQUEST: [xml] <?xml version='1.0'?>
<checkresults>
<checkresult type='host' checktype='1'>
<hostname>testhost</hostname>
<state>0</state>
<output>PING OK - Packet loss = 0%, RTA = 59.76 ms</output>
</checkresult>
</checkresults>
[Fri, 21 Jan 2022 14:57:19 +1100] no xmldata or jsondata, bailing
I'm not sure if the fact it's being sent with XML escape characters is the issue, and I don't know how to fix it. I've checked permissions on the scripts, replaced the send_nrdp.php script with a fresh version from the github, but I'm not well versed in php so wouldn't know how to modify the script. If I copy of the data directly from the log, replaced the < and > with < and > then copy it into the XML check results on at http://hostname.com/nrdp/ it works and appears in the unconfigured objects area.
Any help would be greatly appreciated, I'm feeling pretty stuck.
I'm attempting to setup distributed monitoring between a Nagios Core server and a Nagios XI server, with the core server sending updates on to the XI server. The Nagios XI server is Cent OS 7, and the Nagios Core is AWS Linux. I have got to the point that data is being sent as I can see it in the debug log in /usr/local/nrdp/server, looking like the below.
[Fri, 21 Jan 2022 14:57:19 +1100] nagioscorecmd_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Fri, 21 Jan 2022 14:57:19 +1100] nagioscorecmd_process_request() had no registered callbacks, returning
[Fri, 21 Jan 2022 14:57:19 +1100] nagioscorepassivecheck_process_request(cbtype = PROCESS_REQUEST, args[cmd] = submitcheck
[Fri, 21 Jan 2022 14:57:19 +1100] REQUEST: [token] t0ken
[Fri, 21 Jan 2022 14:57:19 +1100] REQUEST: [cmd] submitcheck
[Fri, 21 Jan 2022 14:57:19 +1100] REQUEST: [xml] <?xml version='1.0'?>
<checkresults>
<checkresult type='host' checktype='1'>
<hostname>testhost</hostname>
<state>0</state>
<output>PING OK - Packet loss = 0%, RTA = 59.76 ms</output>
</checkresult>
</checkresults>
[Fri, 21 Jan 2022 14:57:19 +1100] no xmldata or jsondata, bailing
I'm not sure if the fact it's being sent with XML escape characters is the issue, and I don't know how to fix it. I've checked permissions on the scripts, replaced the send_nrdp.php script with a fresh version from the github, but I'm not well versed in php so wouldn't know how to modify the script. If I copy of the data directly from the log, replaced the < and > with < and > then copy it into the XML check results on at http://hostname.com/nrdp/ it works and appears in the unconfigured objects area.
Any help would be greatly appreciated, I'm feeling pretty stuck.