Passive check struggle

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.
marypoppins
Posts: 10
Joined: Tue May 29, 2018 3:07 am

Re: Passive check struggle

Post by marypoppins »

I took a step. I reinstall the whole nrdp from the source.
Now there is only one warning:

Code: Select all

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/nrdp/server/includes/utils.inc.php on line 392
The nrdp debug.log shows:

Code: Select all

[Wed, 30 May 2018 21:28:55 +0000] REQUEST: [cmd] submitcheck
[Wed, 30 May 2018 21:28:55 +0000] REQUEST: [token] token
[Wed, 30 May 2018 21:28:55 +0000] REQUEST: [XMLDATA] <?xml version='1.0'?>
                                  <checkresults>
                                        <checkresult type='host'>
                                                <hostname>Apollonia</hostname>
                                                <state>0</state>
                                                <output>Everything looks okay! | perfdata=1;</output>
                                        </checkresult>
                                        <checkresult type='service'>
                                                <hostname>Apollonia</hostname>
                                                <servicename>Disk Usage</servicename>
                                                <state>1</state>
                                                <output>WARNING: Danger Will Robinson! | perfdata=1;</output>
                                        </checkresult>
                                  </checkresults>
[Wed, 30 May 2018 21:28:55 +0000] have xml
However my check does not appear in nagios, nor the in the check status on the ncpa webpage. The /var/spool/nagois/checkresults folder also empty.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Passive check struggle

Post by scottwilkerson »

When you submitted the form did you get the OK message?

Your result would only stay in /var/spool/nagois/checkresults for a split second

You would need to look in the nagios.log to see if the results were received for host Apollonia
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
marypoppins
Posts: 10
Joined: Tue May 29, 2018 3:07 am

Re: Passive check struggle

Post by marypoppins »

No, There is no OK message after the submit. Only the warning message (from php, display_error=on)
There is nothing in the nagios.log
:(
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Passive check struggle

Post by scottwilkerson »

Can you verify you have the simplexml.so php extension not sure what it is called in freebsd but maybe php5-simplexml
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
marypoppins
Posts: 10
Joined: Tue May 29, 2018 3:07 am

Re: Passive check struggle

Post by marypoppins »

There is no such package installed. Now as you said I remember there was an error when first time installed ncpa. :roll: This page
https://support.nagios.com/kb/article/n ... ml#FreeBSD
said:
The following packages need to be installed:
pkg install -y wget git bash gmake openssl python27 cx_freeze py27-sqlite3
and there was an error after install ncpa. It shows something about xml, but the proper missing package name was not mentioned. I installed the php56-xml package.

I searched and installed the php56-simplexml as you mentioned, but no luck. Maybe I should configure something in the httpd.conf?

I search about simplexml install error on the net, and somebody had trouble with it on freebsd. He/she installed the php-extensions instead so I give a try. And it seems it was the missing package. Now the nrdp debug shows:

[Thu, 31 May 2018 08:05:08 +0000] nrdp_write_check_output_to_cmd(hostname=Apollonia, servicename=, state=0, type=host, output=Everything looks okay! | perfdata=1;
[Thu, 31 May 2018 08:05:08 +0000] nrdp_write_check_output_to_cmd() successful
[Thu, 31 May 2018 08:05:08 +0000] nrdp_write_check_output_to_cmd(hostname=Apollonia, servicename=Disk Usage, state=1, type=service, output=WARNING: Danger Will Robinson! | perfdata=1;
[Thu, 31 May 2018 08:05:08 +0000] nrdp_write_check_output_to_cmd() successful
[Thu, 31 May 2018 08:05:08 +0000] all nrdp (json) checks have been written
Also the nagios map menu works as well which I thought before a missing nagios package caused.
So at last I have a passive check message "WARNING: Danger Will Robinson! " in the nagios after some days. :]

I give a big big thanks to you for your kindness and helping me!
Have a nice day!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Passive check struggle

Post by scottwilkerson »

Excellent! congrats!

Locking the thread.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked