Nagios Core - Passive checks no communication.

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.
eadmanday
Posts: 11
Joined: Tue May 15, 2018 11:01 am

Re: Nagios Core - Passive checks no communication.

Post by eadmanday »

Hey scottwilkerson,

I have added the below code to the bottom of templates.cfg file in /usr/local/nagios/etc/objects

Code: Select all

define service {
       name                                generic-service
       is_volatile                         0
       max_check_attempts                  3
       check_interval                      10
       retry_interval                      2
       active_checks_enabled               1
       passive_checks_enabled              1
       check_period                        24x7
       parallelize_check                   1
       obsess_over_service                 1
       check_freshness                     0
       event_handler_enabled               1
       flap_detection_enabled              1
       process_perf_data                   1
       retain_status_information           1
       retain_nonstatus_information        1
       notification_interval               60
       notification_period                 24x7
       notification_options                w,c,u,r,
       notifications_enabled               1
       contact_groups                      admins
       register                          0

}   
I re-ran my grep to check the log file and no errors, no errors are reported after a restart of the Nagios server and a restart of the NCPApassive agent.

I have left the machine for about 15 minutes and came back to check if anything has changed. Nothing changed other than clearing the errors out of the log file.
My main dashboard still shows my Webprint system greyed out and pending checks as seen in the attachment.
Attachments
Screen Shot 2018-05-22 at 9.29.24 AM.png
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core - Passive checks no communication.

Post by scottwilkerson »

Have you sent a result as the host? Usually there are just services. Are the services coming in?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
eadmanday
Posts: 11
Joined: Tue May 15, 2018 11:01 am

Re: Nagios Core - Passive checks no communication.

Post by eadmanday »

I am assuming you do that through the Nagios NRDP server URL? I have not done that yet today, or I might be confused on how to send that information.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core - Passive checks no communication.

Post by scottwilkerson »

If you sent this at the NRDP URL in the submit data field it should set the host to OK

Code: Select all

<?xml version='1.0'?> 
<checkresults>
	<checkresult type='host'>
		<hostname>Webprint</hostname>
		<state>0</state>
		<output>Everything looks okay!</output>
	</checkresult>
</checkresults>
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
eadmanday
Posts: 11
Joined: Tue May 15, 2018 11:01 am

Re: Nagios Core - Passive checks no communication.

Post by eadmanday »

Ahh yes, I have not done that test but will test it first thing tomorrow. My ACL's don't allow access while out of the office.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core - Passive checks no communication.

Post by scottwilkerson »

Let us know if you have problems.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
eadmanday
Posts: 11
Joined: Tue May 15, 2018 11:01 am

Re: Nagios Core - Passive checks no communication.

Post by eadmanday »

Hey Scottwilkerson, sorry for the slow was sick and out of the office recovering.

I tested the XML code you gave me through the NRDP URL. Entered the token as well... No 'OK' was give and nothing gave any feedback of a successful command input.

I tested the same XML, but with the default values entered from the page load. Same issue after entering the correct token. So it seems like both the default and the XML code you provided are not providing the "OK" feedback and be successful.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core - Passive checks no communication.

Post by scottwilkerson »

This leads me to believe that there is an error.

Can you watch the httpd error_log on the server when you submit the page again and report the errors.

My guess would be that there is a missing php function from addon, but seeing the error in the logs will help.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
eadmanday
Posts: 11
Joined: Tue May 15, 2018 11:01 am

Re: Nagios Core - Passive checks no communication.

Post by eadmanday »

Hey ScottWilkerson

I popped over to the ubuntu log location /var/log/apache2 and opened the error.log.

I found the following errors

Code: Select all

[Wed May 30 11:06:40.876445 2018] [:error] [pid 24479] [client 1.1.1.1:56836] PHP Fatal error:  Uncaught Error: Call to undefined function simplexml_load_string() in /usr/local/nrdp/server/plugins/nagio$
[Wed May 30 11:07:31.395677 2018] [:error] [pid 24476] [client 1.1.1.1:56837] PHP Fatal error:  Uncaught Error: Call to undefined function simplexml_load_string() in /usr/local/nrdp/server/plugins/nagio$
* 1.1.1.1 ip replaced the client machines IP address


This error is taking up the log file and is really all I see.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Core - Passive checks no communication.

Post by scottwilkerson »

all right now we are getting somewhere, run

Code: Select all

apt-get install php-simplexml
then restart apache
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked