Problem with monitoring Windows 2012 R2 servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problem with monitoring Windows 2012 R2 servers

Post by slansing »

That definitely looks like authentication issues, I'm not sure if the document you were given deals with the entire user setup process, or not. If it does not, make sure you follow this to the letter:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: Problem with monitoring Windows 2012 R2 servers

Post by bdgoecke »

Frédéric,

If I use the wrong password on my Nagios server using check_wmi_plus.pl version 1.59 (on CentOS 5) I get the same error...

Code: Select all

UNKNOWN - The WMI query had problems. You might have your username/password wrong or the user's access level is too low. Wmic error text on the next line.
[librpc/rpc/dcerpc_util.c:1290:dcerpc_pipe_auth_recv()] Failed to bind to uuid 4d9f4ab8-7d1c-11cf-861e-0020af6e7c57 - NT_STATUS_NET_WRITE_FAULT
[librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000022) in dcerpc_pipe_connect_b_recv
[wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied
I do not believe the error is related to check_wmi_plus.pl.

==>brian.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

Hi,
/usr/local/nagios/libexec/check_wmi_plus.pl -H 172.16.1.13 -u svc_riverbed -p dsisvc -m checkcpu -w 80 -c 90
It works

It seems it's an access right problem when using check_wmi_plus_latest.pl
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: Problem with monitoring Windows 2012 R2 servers

Post by bdgoecke »

Frédéric,

Could you check the version ?

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus_latest.pl --version
This is the version I am using,

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl --version
Version: 1.59
I have not had any issues with that version.

If you could, also check the version of wmic you have,

Code: Select all

wmic --version
I am using

Code: Select all

wmic --version
Version 4.0.0tp4-SVN-build-UNKNOWN
==>brian.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

Hi,

[root@nagiosxi libexec]# /usr/local/nagios/libexec/check_wmi_plus_latest.pl --version
Version: 1.59
[root@nagiosxi libexec]# wmic --version
Version 4.0.0tp4-SVN-build-UNKNOWN
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by tgriep »

Can you run this command and post back the results?

Code: Select all

ll /usr/local/nagios/libexec/check_wmi_plus*
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

[root@nagiosxi libexec]# ll /usr/local/nagios/libexec/check_wmi_plus*
-rwxr-xr-x 1 nagios nagios 2499 Jan 21 11:41 /usr/local/nagios/libexec/check_wmi_plus.conf
-rw-r--r-- 1 nagios nagios 2358 Sep 23 2011 /usr/local/nagios/libexec/check_wmi_plus.conf.sample
-rwxr-xr-x 1 nagios nagios 46543 Oct 22 2012 /usr/local/nagios/libexec/check_wmi_plus.ini
-rwxr-xr-x 1 nagios nagios 329189 Jan 26 17:18 /usr/local/nagios/libexec/check_wmi_plus_latest.pl
-rwxr-xr-x 1 nagios nagios 237169 Oct 22 2012 /usr/local/nagios/libexec/check_wmi_plus.pl
-rw-r--r-- 1 nagios nagios 83948 Sep 23 2011 /usr/local/nagios/libexec/check_wmi_plus.README.txt

/usr/local/nagios/libexec/check_wmi_plus.d:
total 152
-rwxr-xr-x 1 nagios nagios 18574 Sep 23 2011 checkexchange.ini
-rwxr-xr-x 1 nagios nagios 11917 Sep 23 2011 checkiis.ini
-rwxr-xr-x 1 nagios nagios 15024 Sep 23 2011 check_sql_express.ini
-rwxr-xr-x 1 nagios nagios 14767 Sep 23 2011 check_sql.ini
-rwxr-xr-x 1 nagios nagios 43512 Sep 23 2011 check_wmi_plus.ini
-rwxr-xr-x 1 nagios nagios 7209 Sep 23 2011 CommandExamples.chtml
-rwxr-xr-x 1 nagios nagios 2861 Sep 23 2011 events.ini
-rwxr-xr-x 1 nagios nagios 590 Sep 23 2011 README.txt
-rwxr-xr-x 1 nagios nagios 24581 Sep 23 2011 samples.ini
[root@nagiosxi libexec]#
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by tgriep »

Could you post this file?

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.conf
Be sure to check out our Knowledgebase for helpful articles and solutions!
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: Problem with monitoring Windows 2012 R2 servers

Post by bdgoecke »

Frédéric,

I am not having any problems with my 1.59 check_wmi_plus.pl on my CentOS 5 ?

I would like to check and make sure everything, except perl, was updated for your version 1.59.

Could you run the following commands, and post the output.

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus_latest.pl --version

Code: Select all

cp /usr/local/nagios/libexec/check_wmi_plus.conf /tmp/check_wmi_plus.conf_backup

Code: Select all

grep -v '$ignore_my_outdated_perl_module_versions' /tmp/check_wmi_plus.conf_backup > \
/usr/local/nagios/libexec/check_wmi_plus.conf

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus_latest.pl --version

Code: Select all

cp /tmp/check_wmi_plus.conf_backup /usr/local/nagios/libexec/check_wmi_plus.conf

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl --version
The commands will:
check the version
backup the config
remove the $ignore_my_outdated_perl_module_versions from the config
check the version again (should output info about module versions)
copy the original config back
check the version again to make sure it is all working as before

Thanks.

==>brian.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

Hi,
1) Answer to tgriep (content of Check WMI Plus Config file)

# Check WMI Plus Config file
# This is read in-line into the perl program, so the syntax has to be just right.

# The settings in here override the default settings in the plugin code
# This file is only required if you want to change the default settings in the plugin

# It is provided in the release package as check_wmi_plus.conf.sample
# Rename it to check_wmi_plus.conf and/or set its location right at the top of the check_wmi_plus.pl script

# this file makes it easier to upgrade the plugin since you can keep your old settings in your own copy of this file

# ---------------------- FILE LOCATIONS -------------------------

# we are looking for the dir where utils.pm is located. This is normally installed as part of Nagios
use lib "/usr/lib/nagios/plugins"; # CHANGE THIS IF NEEDED

# Set the full path where the plugin is installed
# You might not even use this variable if you have different locations for everything
# as a first guess, grab the directory that this conf file lives in
$base_dir="$conf_file_dir"; # CHANGE THIS IF NEEDED

# This is the full path location of the wmic command
# - standard value "$base_dir/wmic"
$wmic_command="/usr/local/bin/wmic"; # CHANGE THIS IF NEEDED

# you do not need to use this if you are using $wmi_ini_dir
# normally you would only use this if you had a single specific ini file you wanted to use
# set the location of the ini file. Set to '' if not using it or specify using the --inifile parameter
# set this to something else if you want
# - standard value "$base_dir/check_wmi_plus.ini"
$wmi_ini_file='/usr/local/nagios/libexec/check_wmi_plus.ini'; # CHANGE THIS IF NEEDED

# set the location of the ini dir. Set to '' if not using it or specify using the --inidir parameter
# set this to something else if you want
# you might like to use "$base_dir/wmic"
# - standard value "$base_dir/check_wmi_plus.d"
$wmi_ini_dir="/usr/local/nagios/libexec"; # CHANGE THIS IF NEEDED,

# set the location of temporary directory - used for keep state option
$tmp_dir='/tmp'; # CHANGE THIS IF NEEDED

# this script helps with making the manpage help. By default it is in the same directory as the plugin itself
$make_manpage_script="$base_dir/check_wmi_plus.makeman.sh"; # CHANGE THIS IF NEEDED

# this is the directory where the manpage is stored when created, defaults to the same directory as the ini files
$manpage_dir="$wmi_ini_dir"; # CHANGE THIS IF NEEDED
$ignore_my_outdated_perl_module_versions=1;
$ignore_my_outdated_perl_module_versions=1;

2) Answer to bdgoecke
[root@nagiosxi ~]# /usr/local/nagios/libexec/check_wmi_plus_latest.pl --version
Version: 1.59
[root@nagiosxi ~]# cp /usr/local/nagios/libexec/check_wmi_plus.conf /tmp/check_wmi_plus.conf_backup
[root@nagiosxi ~]# grep -v '$ignore_my_outdated_perl_module_versions' /tmp/check_wmi_plus.conf_backup > \
> /usr/local/nagios/libexec/check_wmi_plus.conf
[root@nagiosxi ~]# /usr/local/nagios/libexec/check_wmi_plus_latest.pl --version
Warning - one or more of your Perl Modules are out of date and this may cause plugin problems. If you are having any problems with Check WMI Plus you must upgrade your Perl Modules before contacting support (since they'll just tell you to upgrade!). You can override this warning at your peril by using the --IgnoreMyOutDatedPerlModuleVersions command line option or the "$ignore_my_outdated_perl_module_versions" setting in the conf file (/usr/local/nagios/libexec/check_wmi_plus.conf). Version Information on the next line.
MODULE_NAME INSTALLED_VERSION STATUS DESIRED_VERSION
Config::IniFiles 2.68 ok 2.58
Perl Version 5.008008 BAD 5.01
Getopt::Long 2.43 ok 2.38
DateTime 0.70 ok 0.66
Number::Format 1.73 ok 1.73
Data::Dumper 2.154 ok 2.125
Scalar::Util 1.41 ok 1.22
Storable 2.51 ok 2.22
[root@nagiosxi ~]# cp /tmp/check_wmi_plus.conf_backup /usr/local/nagios/libexec/check_wmi_plus.conf
[root@nagiosxi ~]# /usr/local/nagios/libexec/check_wmi_plus.pl --version
Version: 1.49
Locked