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
Post
by eadmanday » Tue May 22, 2018 12:31 pm
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
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue May 22, 2018 4:22 pm
Have you sent a result as the host? Usually there are just services. Are the services coming in?
eadmanday
Posts: 11 Joined: Tue May 15, 2018 11:01 am
Post
by eadmanday » Tue May 22, 2018 5:03 pm
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:
Post
by scottwilkerson » Tue May 22, 2018 5:23 pm
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>
eadmanday
Posts: 11 Joined: Tue May 15, 2018 11:01 am
Post
by eadmanday » Tue May 22, 2018 6:03 pm
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:
Post
by scottwilkerson » Wed May 23, 2018 7:20 am
Let us know if you have problems.
eadmanday
Posts: 11 Joined: Tue May 15, 2018 11:01 am
Post
by eadmanday » Tue May 29, 2018 10:21 am
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:
Post
by scottwilkerson » Tue May 29, 2018 2:30 pm
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.
eadmanday
Posts: 11 Joined: Tue May 15, 2018 11:01 am
Post
by eadmanday » Wed May 30, 2018 1:12 pm
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:
Post
by scottwilkerson » Wed May 30, 2018 2:10 pm
all right now we are getting somewhere, run
then restart apache