Page 1 of 1

WMI Plugin - This plugin requires an INI directory

Posted: Thu Mar 26, 2015 10:04 am
by bosecorp
I am getting this error

This plugin requires an INI directory. Configure its location by setting the $wmi_ini_dir variable in '/usr/local/nagios/libexec' or by using the --inidir parameter to override the default setting. Ini Directory currently set to '/usr/local/nagios/libexec

I already change these setting

our $base_dir='/usr/local/nagios/libexec';
our $wmic_command="/usr/local/bin/wmic";

and because I am not using INI

our $wmi_ini_file='';

but still having problems

Re: WMI Plugin - This plugin requires an INI directory

Posted: Thu Mar 26, 2015 10:21 am
by jdalrymple
What do you mean you're not using an ini? This plugin requires an ini file.

Please post the relevant parts of your check_wmi_plus.conf and also the wmi related contents of your libexec directory.

Code: Select all

[jdalrymple@localhost ~]$ grep "^\$wmi_ini" /usr/local/nagios/libexec/check_wmi_plus.conf                            
$wmi_ini_file='/usr/local/nagios/libexec/check_wmi_plus.ini'; # CHANGE THIS IF NEEDED
$wmi_ini_dir="/usr/local/nagios/libexec"; # CHANGE THIS IF NEEDED,
[jdalrymple@localhost ~]$ ls -l /usr/local/nagios/libexec/ | grep wmi
-rwxr-xr-x. 1 root   root     2405 Mar 20 07:54 check_wmi_plus.conf
-rwxr-xr-x. 1 root   root    64477 Mar 20 07:54 check_wmi_plus.ini
-rwxr-xr-x. 1 root   root   237155 Mar 20 07:54 check_wmi_plus.pl

Re: WMI Plugin - This plugin requires an INI directory

Posted: Thu Mar 26, 2015 11:11 am
by ssax
What version of the plugin are you running?

Here is the process that I followed to get it to work.

Code: Select all

cd /usr/local/nagios/libexec
wget http://edcint.co.nz/checkwmiplus/sites/default/files/check_wmi_plus.v1.59.tar.gz
tar zxf check_wmi_plus.v1.59.tar.gz
mv check_wmi_plus.conf.sample check_wmi_plus.conf
Change /usr/local/nagios/libexec/check_wmi_plus.pl and change these two lines from:

Code: Select all

my $conf_file='/opt/nagios/bin/plugins/check_wmi_plus.conf';
use lib "/usr/lib/nagios/plugins";
To:

Code: Select all

my $conf_file='/usr/local/nagios/libexec/check_wmi_plus.conf';
use lib "/usr/local/nagios/libexec";
Then modify /usr/local/nagios/libexec/check_wmi_plus.conf and change the line below from:

Code: Select all

$wmic_command="/bin/wmic"; # CHANGE THIS IF NEEDED
To:

Code: Select all

$wmic_command="/usr/bin/wmic"; # CHANGE THIS IF NEEDED
Look through those steps and validate that you've done them all.

Re: WMI Plugin - This plugin requires an INI directory

Posted: Thu Mar 26, 2015 11:30 am
by bosecorp
thank you. this worked. you can close this