Page 1 of 2

NRDP not processing Host and Service checks

Posted: Tue Dec 26, 2017 9:28 am
by karthek
Hi,

I have NRDP configured with Nagios core. Passive host and service checks are not getting processed by NRDP. I don't see them in nagios.cmd nor in nagios.log, no errors while submitting from http://localhost/nrdp

But, the downtime requests are getting processed and i'm seeing them in the nagios.cmd file. What could be missing?

Re: NRDP not processing Host and Service checks

Posted: Wed Dec 27, 2017 11:47 am
by dwhitfield
What version of NRDP are you running? 1.5.1 was released today: https://github.com/NagiosEnterprises/nr ... HANGES.rst

Re: NRDP not processing Host and Service checks

Posted: Thu Dec 28, 2017 2:43 am
by karthek
I was using 1.5.0

Re: NRDP not processing Host and Service checks

Posted: Thu Dec 28, 2017 11:25 am
by kyang
Did you upgrade to 1.5.1?

Otherwise, what is the result when you submit a check in http://localhost/nrdp?

Does it process with something like this?

Code: Select all

<result>
<status>0</status>
<message>OK</message>
<meta>
<output>2 checks processed.</output>
</meta>
</result>
Or a different error?

Re: NRDP not processing Host and Service checks

Posted: Sat Dec 30, 2017 8:53 am
by karthek
That's the thing here. No errors. Just a OK at the bottom and that too disappears soon,

Re: NRDP not processing Host and Service checks

Posted: Sat Dec 30, 2017 9:01 am
by karthek
i've upgraded it to 1.5.1

If i submit the command, it's not showing any output, just a blank page. Any thoughts?

Re: NRDP not processing Host and Service checks

Posted: Mon Jan 01, 2018 5:51 pm
by dwhitfield
What are your permissions on the nagios.log and status.dat? Please attach your nagios.cfg.

Re: NRDP not processing Host and Service checks

Posted: Tue Jan 02, 2018 12:56 pm
by karthek
Please see below file permissions and attached nagios.cfg

root@karthek:/usr/local/nagios/var# ll nagios.log
-rw-r--r-- 1 nagios nagios 8171 Jan 2 23:22 nagios.log
root@karthek:/usr/local/nagios/var# ll status.dat
-rw-rw-r-- 1 nagios nagios 13471 Jan 2 23:22 status.dat

Re: NRDP not processing Host and Service checks

Posted: Wed Jan 03, 2018 4:31 pm
by kyang
It looks like there was a fix/pull that was mentioned on the NRDP Github.

https://github.com/NagiosEnterprises/nrdp/pull/30

You could use the pull request, or just don't use the default JSON format which is fine too.

Trying sending a check with something like this against, on a host/service you have for passive checks.

Code: Select all

{
    "checkresults": [
        {
            "checkresult": {
                "type": "host",
                "checktype": "1"
            },
            "hostname": "localhost",
            "state": "0",
            "output": "Everything looks okay! | perfdata=1;"
        },
        {
            "checkresult": {
                "type": "service",
                "checktype": "1"
            },
            "hostname": "localhost",
            "servicename": "SSH",
            "state": "1",
            "output": "WARNING: Danger Will Robinson! | perfdata=1;"
        }
    ]
}
Once you submit it with this format, try a tail and see if it worked.

Code: Select all

tail -10 /usr/local/nagios/var/nagios.log
Here's my example.

Code: Select all

[1515014710] PASSIVE SERVICE CHECK: localhost;SSH;1;WARNING: Danger Will Robinson!
[1515014710] SERVICE ALERT: localhost;SSH;WARNING;SOFT;1;WARNING: Danger Will Robinson!
[1515014710] PASSIVE HOST CHECK: localhost;0;Everything looks okay! Test!
Let us know!

Re: NRDP not processing Host and Service checks

Posted: Wed Jan 10, 2018 7:03 am
by karthek
Sorry, i was away.

Got it working by installing the latest NRDP.

Thank you for support. You may lock this thread.