We deployed check_nagiosxiserver.php to check one nagios server JOBS running status from another nagios server.
and sometimes it had errors like
"Error: Could not parse XML from http://hostIP/nagiosxi/ ()" and made alerts and notifications.
any clue why this would happend?
set up screenshot as attached files.
thanks
Using check_nagiosxiserver,and some error happened
Using check_nagiosxiserver,and some error happened
You do not have the required permissions to view the files attached to this post.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Using check_nagiosxiserver,and some error happened
Hi,
This is often caused by syntax issues with the URL, can you post the whole check command to thread, take about any sensitive information. In the CCM, find the service and click on the Run Check Command button to view the entire string.
Benjamin
This is often caused by syntax issues with the URL, can you post the whole check command to thread, take about any sensitive information. In the CCM, find the service and click on the Run Check Command button to view the entire string.
Regards,[[email protected] ~]$ /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=$HOSTADDRESS$ --url='http://192.168.23.115/nagiosxi' --apikey='JdqXNOLmVmGgt7l5NNVDinUho2OUJuuscmIqDM2Xsu8RjJMK0fJbdcnTC7aYalfU' --mode=jobs
All jobs are running okay.
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Using check_nagiosxiserver,and some error happened
the result after press "run check command"
some data has been taken out for security reason.
[nagios@twxxxxx ~]$ /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=x.x.x.x --url=http://x.x.x.x/nagiosxi/ --username=nxxx --ticket="oooooo" --mode=jobs All jobs are running okay.
the problem doesn't happen all the time but soemtimes it did happen.
After sending out notifications, it will recover to OK by itself short time later ,quite annoying actually.
some data has been taken out for security reason.
[nagios@twxxxxx ~]$ /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=x.x.x.x --url=http://x.x.x.x/nagiosxi/ --username=nxxx --ticket="oooooo" --mode=jobs All jobs are running okay.
the problem doesn't happen all the time but soemtimes it did happen.
After sending out notifications, it will recover to OK by itself short time later ,quite annoying actually.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Using check_nagiosxiserver,and some error happened
Hi @ahm002,
Since this is happening on and off, let's increase the timeout on this check. The default value is only 10 seconds. You can increase this by adding the ---timeout=<seconds> option in the command string.
For example, to increase this to 30 seconds, the command would look like:
Let me know if that helps reduce the number of notifications.
Benjamin
Since this is happening on and off, let's increase the timeout on this check. The default value is only 10 seconds. You can increase this by adding the ---timeout=<seconds> option in the command string.
For example, to increase this to 30 seconds, the command would look like:
Code: Select all
/usr/local/nagios/libexec/check_nagiosxiserver.php --address=$HOSTADDRESS$ --url='http://192.168.23.115/nagiosxi' --apikey='JdqXNOLmVmGgt7l5NNVDinUho2OUJuuscmIqDM2Xsu8RjJMK0fJbdcnTC7aYalfU' --mode=jobs --timeout=30
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Using check_nagiosxiserver,and some error happened
So far so good,keep on watching. it hasnt happened for a week more.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Using check_nagiosxiserver,and some error happened
That's good to hear. We'll keep this open.So far so good,keep on watching. it hasnt happened for a week more.
Thanks,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!