check_nagiosxiserver.php issue from NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
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 »

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?
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:
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.
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 »

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.
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 »

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
	}	
You do not have the required permissions to view the files attached to this post.
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 »

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)
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post 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?
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post 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
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_nagiosxiserver.php issue from NagiosXI

Post by tmcdonald »

What are the different PHP versions? php -v
Former Nagios employee
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post 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 ~]$

5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nagiosxiserver.php issue from NagiosXI

Post 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
You do not have the required permissions to view the files attached to this post.
Locked