check_nagiosxiserver.php issue from NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

check_nagiosxiserver.php issue from NagiosXI

Post by rajasegar »

This check based on /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php was working fine for ages.
Suddenly decided to fail for no reason and I have no idea what is the problem.

IP address masked.

This works fine from CCM Test Check Command

Code: Select all

COMMAND: /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=10.10.10.10 --url=http://10.10.10.10/nagiosxi/ --username=nagiosadmin --ticket="ei55555" --mode=iowait --warn="10" --crit="15" 
OUTPUT: Ok: I/O Wait = 0.73%|iowait=0.73%;10;15;;
Works fine from command line also.

Code: Select all

[nagios@nagiosprodxi1 ~]$ /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=10.10.10.10 --url=http://10.10.10.10/nagiosxi/ --username=nagiosadmin --ticket="ei55555" --mode=iowait --warn="10" --crit="15"
Ok: I/O Wait = 0.77%|iowait=0.77%;10;15;;
[nagios@nagiosprodxi1 ~]$
However under nagiosxi it gives
Error: Could not parse XML from http://10.10.10.10/nagiosxi/ ()
Capture.JPG
Can someone advice what could be the problem?
You do not have the required permissions to view the files attached to this post.
Last edited by rajasegar on Thu Oct 15, 2015 6:31 pm, edited 1 time in total.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_nagiosxiserver.php issue from NagiosXI

Post by hsmith »

Are you running SSL on the server you are trying to check?
Former Nagios Employee.
me.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post by rajasegar »

hsmith wrote:Are you running SSL on the server you are trying to check?
No SSL.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_nagiosxiserver.php issue from NagiosXI

Post by Box293 »

Are you checking the XI server locally or are you checking remote XI servers?
What is the version of the XI server(s).
Is Mod_Gearman executing these checks? If yes, what happens when you test on the command line of all your workers?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post by rajasegar »

Box293 wrote:Are you checking the XI server locally or are you checking remote XI servers?
What is the version of the XI server(s).
Is Mod_Gearman executing these checks? If yes, what happens when you test on the command line of all your workers?
It is checking locally. Mod gearman is not handling this check.
V5.2 as per my signature.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_nagiosxiserver.php issue from NagiosXI

Post by Box293 »

Can you edit the check in CCM and add --debug=1 to the end of the $ARG1$ field.

Save and apply config.
Go and force the service to perform the check.
Does this output debug information in the status output?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post by rajasegar »

I just checked from the mod_gearman servers. It is working fine also.
As updated earlier I am not using gearman for this check.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post by rajasegar »

Box293 wrote:Can you edit the check in CCM and add --debug=1 to the end of the $ARG1$ field.

Save and apply config.
Go and force the service to perform the check.
Does this output debug information in the status output?

Code: Select all

ACCESSING URL: http://10.10.10.10/nagiosxi//backend/?username=nagiosadmin&ticket=ei555555&cmd=getsysstat
RESULT:
Array
(
[headers] => Array
(
)

[body] =>
[info] => Array
(
[url] => http://10.10.10.10:80/nagiosxi//backend/
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 314
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 10.009108
[namelookup_time] => 0.000122
[connect_time] => 0.000677
[pretransfer_time] => 0.000682
[size_upload] => 51
[size_download] => 0
[speed_download] => 0
[speed_upload] => 5
[download_content_length] => -1
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)

)

)
Error: Could not parse XML from http://10.17.19.235/nagiosxi/ ()
Last edited by rajasegar on Thu Oct 15, 2015 6:30 pm, edited 1 time in total.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_nagiosxiserver.php issue from NagiosXI

Post by tgriep »

The only thing that looks different is that the ticket number from when you are running the command from the command line is different when you ran the debug, that may be causing it.
Can you post the service check here so we can review it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post by rajasegar »

tgriep wrote:The only thing that looks different is that the ticket number from when you are running the command from the command line is different when you ran the debug, that may be causing it.
Can you post the service check here so we can review it?
No. I masked the ticket number in the original post but forgot to change in the output.
Please note that this started giving problems only after the 5.2 upgrade.

Code: Select all

define service {
	host_name			nagiosprodxi1
	service_description		Nagios: I/O Wait
	use				STPT-Standard-Nagios-Services
	check_command			check_xi_nagiosxiserver!--address=10.10.10.10 --url=http://10.10.10.10/nagiosxi/ --username=nagiosadmin --ticket="ei555555" --mode=iowait --warn="10" --crit="15" --debug=1!!!!!!!
	max_check_attempts		2
	check_interval			5
	retry_interval			5
	register			1
	}	
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
Locked