Page 1 of 2
check_wmi_plus nagiosxi informational (null)
Posted: Thu Mar 01, 2012 9:33 am
by CBoekhuis
Hi,
i'm trying to get check_wmi_plus working with nagiosxi.
Running from the prompt we get the requested results , but when i run them as a service in nagiosxi i get (null) as result.
/usr/local/nagios/libexec/check_wmi_plus.pl -H serverX -u <user> -p <password> -m checkcpu -w 80 -c 90
OK (Sample Period 20 sec) - Average CPU Utilisation 0.28%|'Avg CPU Utilisation'=0.28%;80;90;
Has anyone ideas?
This is some info for our setup:
RHEL 5.7
/usr/local/bin/wmic --version = Version 4.0.0tp4-SVN-build-UNKNOWN
/usr/local/nagios/libexec/check_wmi_plus.pl --version = Version: 1.49
ll /usr/local/nagios/libexec/check_wmi*
-rwxr-xr-x 1 nagios nagios 2514 Mar 1 14:50 check_wmi_plus.conf
-rwxrwxr-x 1 nagios nagios 232495 Feb 10 17:27 check_wmi_plus.pl
I've already reinstall the vmi client as described in
http://assets.nagios.com/downloads/nagi ... For_XI.pdf but with no result.
Hope someone can help me out.
Regards
Christian
Re: check_wmi_plus nagiosxi informational (null)
Posted: Thu Mar 01, 2012 11:39 am
by lmiltchev
Do you have any special characters in the username or the password? Sometimes this can be an issue, especially if you have the "!" character.
Can you post the CPU Usage service definition, so we can review it? Replace your real username and password with "<username>" and "<password>" for privacy.
Re: check_wmi_plus nagiosxi informational (null)
Posted: Thu Mar 01, 2012 4:27 pm
by CBoekhuis
username en password do not contain special charachters.
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2012-03-01 17:28:10
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
define service {
host_name someserver.somedomain.nl
service_description CPU Usage
check_command check_xi_service_wmiplus!<username>!<password>!checkcpu!-w 80 -c 90!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
notification_interval 60
first_notification_delay 0
notification_options w,u,r,c,f,s
notifications_enabled 1
_xiwizard windowswmi
register 1
}
and the command def
define command {
command_name check_xi_service_wmiplus
command_line $USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m $ARG3$ $ARG4$
}
Re: check_wmi_plus nagiosxi informational (null)
Posted: Thu Mar 01, 2012 5:37 pm
by scottwilkerson
In your setup us your username in the DOMAIN\Username fashion?
You may need to escape the \ and make it DOMAIN\\Username if that is the case
Re: check_wmi_plus nagiosxi informational (null)
Posted: Fri Mar 02, 2012 12:52 am
by CBoekhuis
The username password is like : <peter> <abc123> no domain annotation.
Re: check_wmi_plus nagiosxi informational (null)
Posted: Fri Mar 02, 2012 10:23 am
by yancy
Sounds like your running an older version of the wizard
Check if your version number is = 1.49:
cat check_wmi_plus.pl | grep VERSION=
my $VERSION="1.49";
If your running 1.42 or older, re-add the WMI wizard found here:
http://exchange.nagios.org/directory/Ad ... rd/details
nagios > admin > manage config wizards
Re: check_wmi_plus nagiosxi informational (null)
Posted: Fri Mar 02, 2012 10:35 am
by CBoekhuis
the versions are up to date as you can see in the first post
/usr/local/bin/wmic --version = Version 4.0.0tp4-SVN-build-UNKNOWN
/usr/local/nagios/libexec/check_wmi_plus.pl --version = Version: 1.49
Re: check_wmi_plus nagiosxi informational (null)
Posted: Fri Mar 02, 2012 10:52 am
by scottwilkerson
CBoekhuis wrote:
ll /usr/local/nagios/libexec/check_wmi*
-rwxr-xr-x 1 nagios nagios 2514 Mar 1 14:50 check_wmi_plus.conf
-rwxrwxr-x 1 nagios nagios 232495 Feb 10 17:27 check_wmi_plus.pl
Looking back at your first post you don't appear to have a check_wmi_plus.ini file which should get installed with the wizard.
Re: check_wmi_plus nagiosxi informational (null)
Posted: Fri Mar 02, 2012 10:57 am
by lmiltchev
Go to: Core Config Manager->Monitoring->Services->Config name filter:<serverX>->CPU Usage->Modify and post a screenshot of this page.
Re: check_wmi_plus nagiosxi informational (null)
Posted: Fri Mar 02, 2012 11:21 am
by CBoekhuis
Hi Scott,
i've attacched the screenshot.
Regards
Christian