You are here

check_wmi_plus

2 posts / 0 new
Last post
LukasKurth_Bosch
LukasKurth_Bosch's picture
check_wmi_plus

Hello,

i have another problem. I have installed wmic and configured check_wmi_plus, but i cant get it to work.

SSH-Console:

##################
root@opsview:/usr/local/nagios/libexec# ./check_wmi_plus.pl -H <IP> -m checkdrivesize -u <domain & user> -p <password> -a c: -o 1 -d
Command Line (v1.56): ./check_wmi_plus.pl -H <IP> -m checkdrivesize -u USER -p PASS -a c: -o 1 -d
Conf File Dir: /usr/lib/nagios/plugins/check_wmi
Loaded Conf File /usr/lib/nagios/plugins/check_wmi/check_wmi_plus.conf
Round #1 of 1
QUERY: /usr/lib/nagios/plugins/check_wmi/wmic '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//192.168.3.35' 'Select DeviceID,freespace,Size,VolumeName from Win32_LogicalDisk where DriveType=3'
OUTPUT: sh: /usr/lib/nagios/plugins/check_wmi/wmic: Permission denied

Could not find the CLASS: line - an error occurred
WMI DATA:$VAR1 = [
          [
            {
              '_ColSum_Size' => 0,
              '_QuerySum_Size' => 0,
              '_ColSum_FreeSpace' => 0,
              '_QuerySum_FreeSpace' => 0
            }
          ]
        ];
UNKNOWN - The WMI query had problems. The error text from wmic is: sh: /usr/lib/nagios/plugins/check_wmi/wmic: Permission denied
##################

If "check_wmi_plus.pl -H <IP> -m checkdrivesize -u USER -p PASS -a c: -o 1 -d" ist what the console understands, then i guess i have a problem with the commands (passing the right user and password). How can i fix that?

I checked wmic but this is giving me correct data.

My check_wmi_plus path is: "/usr/lib/nagios/plugins/check_wmi/"

LukasKurth_Bosch
LukasKurth_Bosch's picture
Re: check_wmi_plus

Heya, found it by myself ;)

The crappy Installation Guide on that hompage, this here is better: http://interwebplus.com/blog/index.php?post=nagios-check-wmi-plus-on-ubuntu

Sometimes just a 'little' different, but that was the way to solve it :)