NRDP not processing Host and Service checks

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

NRDP not processing Host and Service checks

Post 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?
"Machines don't make mistakes, we do."
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NRDP not processing Host and Service checks

Post by dwhitfield »

What version of NRDP are you running? 1.5.1 was released today: https://github.com/NagiosEnterprises/nr ... HANGES.rst
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

Re: NRDP not processing Host and Service checks

Post by karthek »

I was using 1.5.0
"Machines don't make mistakes, we do."
kyang

Re: NRDP not processing Host and Service checks

Post 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?
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

Re: NRDP not processing Host and Service checks

Post by karthek »

That's the thing here. No errors. Just a OK at the bottom and that too disappears soon,
Attachments
Screenshot from 2017-12-31 00-50-45.png
"Machines don't make mistakes, we do."
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

Re: NRDP not processing Host and Service checks

Post 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?
"Machines don't make mistakes, we do."
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NRDP not processing Host and Service checks

Post by dwhitfield »

What are your permissions on the nagios.log and status.dat? Please attach your nagios.cfg.
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

Re: NRDP not processing Host and Service checks

Post 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
Attachments
nagios.cfg
(43.78 KiB) Downloaded 431 times
"Machines don't make mistakes, we do."
kyang

Re: NRDP not processing Host and Service checks

Post 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!
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

Re: NRDP not processing Host and Service checks

Post by karthek »

Sorry, i was away.

Got it working by installing the latest NRDP.

Thank you for support. You may lock this thread.
"Machines don't make mistakes, we do."
Locked