WMI not able to get status

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Thibzy
Posts: 7
Joined: Fri Aug 26, 2016 7:18 am

WMI not able to get status

Post by Thibzy »

Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... =6&t=31589
In the future, please create a new thread and link to the old one instead of adding on.


Hello,
Sorry, for the unearth of the topic but I am actually new in this forum and I dont know how to create my own topic ...

I used Nagios on my Raspberry pi 3 for monitoring some computers Windows seven with the pluggin check_wmi_plus (for being the less intrusive as possible) and actually I have the same mystake of timlee .
I have done all the installation well I think with the guide of the pluggin.
and after the run of the command:

Code: Select all

check_wmi_plus.pl -H HOST -u USER -p PASS -m checkcpu
I have always at the second run of it a warning in the debugger :

Code: Select all

Creating '_AvgCPU' (WMIQuery:1, Row:0) using 'PERF_100NSEC_TIMER_INV' (Parameters: PercentProcessorTime,%.2f,100)
WARNING: The value in the requested field (PercentProcessorTime) does not look like a number - we got ''
   Setting _AvgCPU to CALC_FAIL
So that return me :

Code: Select all

------- Processing _DisplayMsg||~|~| - ||
Complex Format:_DisplayMsg,,~,~, - ,,
_DisplayMsg||~|~| - || ----> OK (Sample Period 10 sec) - 
------- Processing _AvgCPU|%|Average CPU Utilisation| |~||
Complex Format:_AvgCPU,%,Average CPU Utilisation, ,~,,
_AvgCPU|%|Average CPU Utilisation| |~|| ----> Average CPU Utilisation CALC_FAIL%
---------- Building Up Performance Data
------- Processing _AvgCPU|%|Avg CPU Utilisation
Complex Format:_AvgCPU,%,Avg CPU Utilisation
Ignoring perf data since it is not numeric
---------- Done
OUT:OK (Sample Period 10 sec) - Average CPU Utilisation CALC_FAIL%

OK (Sample Period 10 sec) - Average CPU Utilisation CALC_FAIL%
Maybe some body have find a solution since the last reply ?

Thanks for your attention
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: WMI not able to get status

Post by dwhitfield »

What version are you using? You might look at upgrading the plugin: https://assets.nagios.com/downloads/nag ... pgrade.pdf

Also, what version of XI are you running? 5.4 was recently released with some important security fixes, so if you aren't running 5.4, I'd have a serious think about upgrading.
Thibzy
Posts: 7
Joined: Fri Aug 26, 2016 7:18 am

Re: WMI not able to get status

Post by Thibzy »

I am running Nagios 4.1, I have follow this guide : https://blog.jolos.fr/2015/09/installer ... omment-219 for the install of Nagios.

And I have download the last version of the pluggin check_wmi_plus : http://www.edcint.co.nz/checkwmiplus/?q=downloads (check_wmi_plus.v1.61.tar.gz)

I will try to upgrade to 5.4 and I will post a new reply.
Thibzy
Posts: 7
Joined: Fri Aug 26, 2016 7:18 am

Re: WMI not able to get status

Post by Thibzy »

I work actually with the lastest version of the plugin check_wmi_plus v1.61.

And with the nagios core 4.1.1, I dont have the last who is 4.2.4.

Nagios XI was realy necessary ? and if it's the case can I ? past at Nagios XI 5.4, buy upgrade or I have to re install my server ?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: WMI not able to get status

Post by dwhitfield »

Thibzy wrote:Nagios XI was realy necessary ?
No, you just posted in the XI forums, so I thought you were using XI. I would definitely upgrade to 4.2.4. There are some huge security fixes, although with feature enhancements and other bug fixes.

This is not to say I want to steer you away from XI. We give everyone a 60-day trial. You should certainly try out XI and see if it does what you want, but Nagios Core is completely functional on its own.
Thibzy
Posts: 7
Joined: Fri Aug 26, 2016 7:18 am

Re: WMI not able to get status

Post by Thibzy »

Re,

So, I have follow your advices and upgrade my server to Core 4.2.4. but nothing have changed about my problem, the check of CPU utilisation.

Maybe somebody have meet the same mistake with the plugin check_wmi_plus ?
I would like just add in my nagios web interface the service status was UNKNOWN with any description :|
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: WMI not able to get status

Post by dwhitfield »

What OS are you running on the PI? Our instructions are only written for CentOS 6/7, so it might take us some time to get it working on a different OS.

Considering your link to https://blog.jolos.fr/2015/09/installer ... omment-219 I assume Debian, but I just want to be clear before moving forward.
Thibzy
Posts: 7
Joined: Fri Aug 26, 2016 7:18 am

Re: WMI not able to get status

Post by Thibzy »

I am running Raspbian Jessie a variant of Debian for Raspberry Pi.

And I haven't meet any warning or error for the installation.
But for the install of the plugin check_wmi_plus, I have meet some problem.
Because, he need an executable named wmic and his library.
So for doing with it, I have done the following protocol:
- download of wmi Library : - wmi-1.3.16.
- tar xzvf wmi-1.3.16.tar.gz
- cd wmi-1.3.16
- Then I have changed the GNUmakefile :
-Add in comment the following line:
ZENOSS_BINDIR = $(ZENHOME)/bin # Ligne 20
ZENPYTHON = $(ZENOSS_BINDIR)/python # Line 21
USE_BREAKPAD = 1 # Line 73
$(call check,directory,$(ZENHOME),"ZENHOME") # Line 111
$(call check,directory,$(ZENHOME),"ZENHOME") # Line 130
- and I have changed the pyinclude : print (os.path.join(sys.prefix, ‘lib’, ‘python’ + version))
-Then I have run the install with : make "CPP=gcc –E -P -ffreestanding"
- And install all the perl requirement: cpan install Config::IniFiles
cpan install Getopt::Long
cpan install DateTime
cpan install Data::Dumper
cpan install Scalar::Util
cpan install Storable
cpan install Number:

-After I have Download the plugin check_wmi_plus: http://www.edcint.co.nz/checkwmiplus/?q=downloads
- then I have configure it : the conf file and the file plugin (.pl) and moved them at the place where they have to belong.
After this nagios Core can used some the check of the plugin but not the most important to me the CPU utilisation ..

I am really motivated to find the solve of this!

Thanks for your attention
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: WMI not able to get status

Post by dwhitfield »

As of the moment I don't have Raspbian on which to test. I can certainly try to make that happen eventually.

In the mean time, have you looked at https://assets.nagios.com/downloads/nag ... ndows.html ?
Thibzy
Posts: 7
Joined: Fri Aug 26, 2016 7:18 am

Re: WMI not able to get status

Post by Thibzy »

Yes , I have.
But in my project one of the most important requirement has to be the less intrusive for my target. So, that plugin was realy helpfull because he used wmi commands of Windows who actually was native in all my remote computers . No Nsclients++ to install.
And thanks again for the futur help, I am at your disposal for any other suggestion? maybe an other plugin?
Locked