Page 2 of 3

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Thu Oct 15, 2015 8:09 pm
by Box293
rajasegar wrote:--url=http://10.10.10.10/nagiosxi/
Does this URL match the url defined in:
Admin > System Settings > Manage System Config
Specifically the "Program URL".
If the "Program URL" is a FQDN, does this resolve to an internal or external IP address?

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Thu Oct 15, 2015 8:21 pm
by rajasegar
Box293 wrote:
rajasegar wrote:--url=http://10.10.10.10/nagiosxi/
Does this URL match the url defined in:
Admin > System Settings > Manage System Config
Specifically the "Program URL".
If the "Program URL" is a FQDN, does this resolve to an internal or external IP address?
Program URL is the same but external is blank.

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Thu Oct 15, 2015 8:26 pm
by rajasegar
http://10.10.10.10/nagiosxi//backend/?u ... getsysstat

The above works fine from my pc browser also. Only in XI monitoring it does not work.

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Thu Oct 15, 2015 10:40 pm
by rajasegar
This problem is also related, works fine from command line but in XI does not work.
Capture.JPG

Code: Select all

[nagios@nagiosprodxi2 libexec]$ ./check_esx3.pl -V
check_esx3.pl 0.2.0

Code: Select all

define command {
       command_name                  		check_vmware_host
       command_line                  		$USER1$/check_esx3.pl -H "$HOSTADDRESS$" -u "$_HOSTUSER$" -p "$_HOSTPWD$" -l "$ARG1$" "$ARG2$" -w "$ARG3$" -c "$ARG4$"  "$ARG5$"  "$ARG6$" 
}

Code: Select all

define service {
	service_description		VMH CPU Usage
	use				STPT-0-generic-cpu,STPT-CB-INFRA-VMWARE
	hostgroup_name			CB_VMWARE_HOST_SM1
	check_command			check_vmware_host!CPU!"-s usage"!$_HOSTLIMIT_CPU_WARN$%!$_HOSTLIMIT_CPU_CRIT$%!!!!
	max_check_attempts		3
	check_interval			10
	retry_interval			10
	register			1
	}	

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Thu Oct 15, 2015 10:51 pm
by rajasegar
I created the same checks in another XI instance and it is working fine.
No idea what is the problem in this instance.

Only difference is the OS version.
XI1 is the one with the problem.

XI1 - Linux nagiosprodxi1 2.6.32-431.11.2.el6.x86_64 #1 SMP Mon Mar 3 13:32:45 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 6.5 (Santiago)

XI2 - Linux nagiosprodxi2 2.6.32-504.3.3.el6.x86_64 #1 SMP Fri Dec 12 16:05:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 6.6 (Santiago)

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Fri Oct 16, 2015 2:16 pm
by ssax
Are you seeing any errors in your /var/log/httpd/error_log or /var/log/httpd/ssl_error_log after you force the check?

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Sun Oct 18, 2015 6:20 pm
by rajasegar
ssax wrote:Are you seeing any errors in your /var/log/httpd/error_log or /var/log/httpd/ssl_error_log after you force the check?
No errors, just huge amount of logging in access_log.

I just refreshed the screen, login, search for server, clicked on the service and forced checked.
43k was logged in access_log. Something is not right here.
access_log.zip

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Mon Oct 19, 2015 3:20 pm
by tmcdonald
What are the different PHP versions? php -v

Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Mon Oct 19, 2015 6:26 pm
by rajasegar
tmcdonald wrote:What are the different PHP versions? php -v

Code: Select all

[nagios@nagiosprodxi1 mod_gearman]$ php -v
PHP 5.3.3 (cli) (built: Jul  3 2015 03:10:33)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
You have new mail in /var/spool/mail/nagios
[nagios@nagiosprodxi1 mod_gearman]$

Code: Select all

[nagios@nagiosprodxi2 ~]$ php -v
PHP 5.3.3 (cli) (built: Jul  3 2015 03:10:33)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[nagios@nagiosprodxi2 ~]$


Re: check_nagiosxiserver.php issue from NagiosXI

Posted: Tue Oct 20, 2015 2:10 pm
by ssax
For the check_nagiosxiserver.php one:

It looks like the body and headers are empty from the debug output that you posted, the script uses curl to access the data, the http_code of 0 usually means that it had trouble connecting.

Back up your current /usr/local/nagios/libexec/check_nagiosxiserver.php, replace it with the one attached, force the check and then post the output from the XI interface.

Thank you