Page 5 of 9

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Tue Jan 06, 2015 11:24 am
by sreinhardt
You can try updating with yum, most of those packages should be available from it. Although it then depends on what Cent\RHEL version you are running. Let's try those updates, and see how it goes from there.

Code: Select all

yum install perl perl-Data-Dumper perl-Getopt-Long perl-Getopt-Auto perl-Getopt-Long-Descriptive perl-Getopt-Mixed
Provided you have rpmforge and epel per our standard installer, most if not all of these packages should be available and ready for an update. Once they are updated, try the plugin again and see what results we get.

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Tue Jan 06, 2015 12:05 pm
by Frédéric GRANAT

Code: Select all

[root@nagiosxi libexec]# yum install perl perl-Data-Dumper perl-Getopt-Long perl-Getopt-Auto perl-Getopt-Long-Descriptive perl-Getopt-Mixed
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.quelquesmots.fr
 * epel: mirror-fr2.bbln.org
 * extras: centos.quelquesmots.fr
 * remi: rpms.famillecollet.com
 * rpmforge: nl.mirror.eurid.eu
 * updates: centos.quelquesmots.fr
Setting up Install Process
Package 4:perl-5.8.8-43.el5_11.i386 already installed and latest version
No package perl-Getopt-Long available.
Resolving Dependencies
--> Running transaction check
---> Package perl-Data-Dumper.i386 0:2.125-1.el5.rf set to be updated
---> Package perl-Getopt-Auto.noarch 0:1.00-1.2.el5.rf set to be updated
---> Package perl-Getopt-Long-Descriptive.noarch 0:0.089-1.el5.rf set to be updated
--> Processing Dependency: perl(Sub::Exporter) for package: perl-Getopt-Long-Descriptive
---> Package perl-Getopt-Mixed.noarch 0:1.10-1.el5.rf set to be updated
--> Running transaction check
---> Package perl-Sub-Exporter.noarch 0:0.982-11.el5 set to be updated
--> Processing Dependency: perl(Sub::Install) >= 0.92 for package: perl-Sub-Exporter
--> Processing Dependency: perl(Package::Generator) for package: perl-Sub-Exporter
--> Processing Dependency: perl(Data::OptList) for package: perl-Sub-Exporter
--> Running transaction check
---> Package perl-Data-OptList.noarch 0:0.105-1.el5.rf set to be updated
---> Package perl-Package-Generator.noarch 0:0.103-1.el5.rf set to be updated
---> Package perl-Sub-Install.noarch 0:0.925-1.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                         Arch      Version            Repository   Size
================================================================================
Installing:
 perl-Data-Dumper                i386      2.125-1.el5.rf     dag          64 k
 perl-Getopt-Auto                noarch    1.00-1.2.el5.rf    dag          11 k
 perl-Getopt-Long-Descriptive    noarch    0.089-1.el5.rf     dag          27 k
 perl-Getopt-Mixed               noarch    1.10-1.el5.rf      dag          20 k
Installing for dependencies:
 perl-Data-OptList               noarch    0.105-1.el5.rf     rpmforge     19 k
 perl-Package-Generator          noarch    0.103-1.el5.rf     rpmforge     22 k
 perl-Sub-Exporter               noarch    0.982-11.el5       epel         65 k
 perl-Sub-Install                noarch    0.925-1.el5.rf     rpmforge     19 k

Transaction Summary
================================================================================
Install       8 Package(s)
Upgrade       0 Package(s)

Total download size: 247 k
Is this ok [y/N]: y
Downloading Packages:
(1/8): perl-Getopt-Auto-1.00-1.2.el5.rf.noarch.rpm       |  11 kB     00:00
(2/8): perl-Data-OptList-0.105-1.el5.rf.noarch.rpm       |  19 kB     00:00
(3/8): perl-Sub-Install-0.925-1.el5.rf.noarch.rpm        |  19 kB     00:00
(4/8): perl-Getopt-Mixed-1.10-1.el5.rf.noarch.rpm        |  20 kB     00:00
(5/8): perl-Package-Generator-0.103-1.el5.rf.noarch.rpm  |  22 kB     00:00
(6/8): perl-Getopt-Long-Descriptive-0.089-1.el5.rf.noarc |  27 kB     00:00
(7/8): perl-Data-Dumper-2.125-1.el5.rf.i386.rpm          |  64 kB     00:00
(8/8): perl-Sub-Exporter-0.982-11.el5.noarch.rpm         |  65 kB     00:00
--------------------------------------------------------------------------------
Total                                           169 kB/s | 247 kB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-Sub-Install                                         1/8
  Installing     : perl-Data-OptList                                        2/8
  Installing     : perl-Package-Generator                                   3/8
  Installing     : perl-Sub-Exporter                                        4/8
  Installing     : perl-Getopt-Long-Descriptive                             5/8
  Installing     : perl-Getopt-Auto                                         6/8
  Installing     : perl-Data-Dumper                                         7/8
  Installing     : perl-Getopt-Mixed                                        8/8

Installed:
  perl-Data-Dumper.i386 0:2.125-1.el5.rf
  perl-Getopt-Auto.noarch 0:1.00-1.2.el5.rf
  perl-Getopt-Long-Descriptive.noarch 0:0.089-1.el5.rf
  perl-Getopt-Mixed.noarch 0:1.10-1.el5.rf

Dependency Installed:
  perl-Data-OptList.noarch 0:0.105-1.el5.rf
  perl-Package-Generator.noarch 0:0.103-1.el5.rf
  perl-Sub-Exporter.noarch 0:0.982-11.el5
  perl-Sub-Install.noarch 0:0.925-1.el5.rf

Complete!
[root@nagiosxi libexec]# ./check_wmi_plus_latest.pl -H 172.16.1.13 -u svc_riverbed -p dsisvc -m checkcpu -w 80 -c 90
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 (/opt/nagios/bin/plugins/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.35     BAD       2.38
DateTime                           0.70      ok       0.66
Number::Format                     1.73      ok       1.73
Data::Dumper                      2.125      ok      2.125
Scalar::Util                       1.23      ok       1.22
Storable                           2.15     BAD       2.22

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Tue Jan 06, 2015 1:38 pm
by lmiltchev
Do you get any warnings/errors, while viewing the plugin's usage?

Code: Select all

./check_wmi_plus_latest.pl -h
Have you tried overriding the warning by using the "--IgnoreMyOutDatedPerlModuleVersions"?

What is the output of the following commands?

Code: Select all

cat /etc/*release
uname -a
grep "our \$base_dir=" /usr/local/nagios/libexec/check_wmi_plus_latest.pl
which wmic
grep "our \$wmic_command=" /usr/local/nagios/libexec/check_wmi_plus_latest.pl

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Wed Jan 07, 2015 2:25 am
by Frédéric GRANAT
Do you get any warnings/errors, while viewing the plugin's usage?
=> I ran that command, please see the previous thread

Have you tried overriding the warning by using the "--IgnoreMyOutDatedPerlModuleVersions"?
=>[root@nagiosxi libexec]# ./check_wmi_plus_latest.pl -H 172.16.1.13 -u svc_riverbed -p dsisvc -m checkcpu -w 80 -c 90 --IgnoreMyOutDatedPerlModuleVersions
This plugin requires an INI directory. Configure its location by setting the $wmi_ini_dir variable in '/opt/nagios/bin/plugins/check_wmi_plus.conf' or by using the --inidir parameter to override the default setting. Ini Directory currently set to '/opt/nagios/bin/plugins/check_wmi_plus.d'[root@nagiosxi libexec]#

What is the output of the following commands?
[root@nagiosxi libexec]# cat /etc/*release
CentOS release 5.8 (Final)

[root@nagiosxi libexec]# uname -a
Linux nagiosxi 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 17:10:06 EDT 2012 i686 i686 i386 GNU/Linux

[root@nagiosxi libexec]# grep "our \$base_dir=" /usr/local/nagios/libexec/check_wmi_plus_latest.pl
our $base_dir='/opt/nagios/bin/plugins';

[root@nagiosxi libexec]# which wmic
/usr/local/bin/wmic

[root@nagiosxi libexec]# grep "our \$wmic_command=" /usr/local/nagios/libexec/check_wmi_plus_latest.pl
our $wmic_command="/bin/wmic";

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Wed Jan 07, 2015 3:56 pm
by lmiltchev
Let's try to modify the "check_wmi_plus_latest.pl" plugin a bit. Change the following lines from this:

Code: Select all

our $base_dir='/opt/nagios/bin/plugins';
our $wmic_command="/bin/wmic";
to this:

Code: Select all

our $base_dir='/usr/local/nagios/libexec';
our $wmic_command="/usr/local/bin/wmic";
Also, if you are not using ini file, set:

Code: Select all

our $wmi_ini_file='';
Let me know if this helped. Thanks!

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Thu Jan 08, 2015 5:46 am
by Frédéric GRANAT
Hi,
No impact, still have the problem.

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Thu Jan 08, 2015 12:44 pm
by lmiltchev
What do you mean? Same problem in terms of not being able to run the "new" plugin and getting "Warning - one or more of your Perl Modules are out of date and this may cause plugin problems." errors or the "new" plugin is not working any better than the "old" one?

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Fri Jan 09, 2015 3:56 am
by Frédéric GRANAT
1) content of check_wmi_plus_latest.pl

# ---------------------- DEFAULT FILE LOCATIONS -------------------------
# Developed and tested with everything installed in /opt/nagios/bin/plugins

# You might not even use this variable if you have different locations for everything
# our $base_dir='/opt/nagios/bin/plugins';
our $base_dir='/usr/local/nagios/libexec';

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

# 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"
our $wmi_ini_file='';


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

2) launching of check_wmi_plus_latest.pl

[root@nagiosxi libexec]# ./check_wmi_plus_latest.pl -H 172.16.1.13 -u svc_riverbed -p dsisvc -m checkcpu -w 80 -c 90
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 (/opt/nagios/bin/plugins/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.35 BAD 2.38
DateTime 0.70 ok 0.66
Number::Format 1.73 ok 1.73
Data::Dumper 2.125 ok 2.125
Scalar::Util 1.23 ok 1.22
Storable 2.15 BAD 2.22

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Fri Jan 09, 2015 1:12 pm
by bdgoecke
Frédéric,

I have had success updating the perl modules to be able to run a newer version of check_wmi_plus.pl on CentSO 6.6 ( and I believe we can upgrade the perl modules on your system). But the version of perl is more problematic, we are not going to be able to update perl. Version upgrades for perl are difficult to do, and are best handled by the system update process.

We will help you try to upgrade the modules, and then we can see if we can get 1.59 version check_wmi_plus.pl to run.

It still isn't know if the newer version of check_wmic_plus.pl is going to solve your problem with the CPU check.

==>brian.

Re: Problem with monitoring Windows 2012 R2 servers

Posted: Mon Jan 12, 2015 3:26 am
by Frédéric GRANAT
Hi,
Perl Version 5.008008 BAD 5.01

=> check_wmi_plus_latest.pl doesn't work caused by Perl is not up to date. You say that we're not going to update Perl.
Could you please explain how check_wmi_plus_latest.pl is going to work ?

It still isn't know if the newer version of check_wmic_plus.pl is going to solve your problem with the CPU check.
=> Do you think it's worth spending time on pluggin upgrade (1 post = 1 day) ? What other solution do you propose ?

Rgds,

Frederic