Page 1 of 2

wmic binary has not been installed.

Posted: Tue Jul 07, 2020 4:31 pm
by Interrex
Hi.

When I try to create WMI check's via the wizard I get the following Warning:
"WARNING: wmic binary has not been installed" and refer to the: https://assets.nagios.com/downloads/nag ... For_XI.pdf

The DOC says:
IMPORTANT
Nagios XI 2012 and newer do not need these steps to be performed, the WMI client is installed by default.


My system.
Nagios XI 5.5.7 running on RHEL7 (VM)
Offline installation.
Windows WMI plugin is latest version - 2.1.1

Error from command line:
/usr/local/nagios/libexec/check_wmi_plus.pl -H "address" -u -p -m
This plugin requires the linux implementation of wmic eg from zenoss. Once wmic is installed, configure its location by setting the $wmic_command variable in '/usr/local/nagios/libexec/check_wmi_plus.conf'.

I tried to install wmic rpm, wmi-1.3.14-4.el7.art.x86_64.rpm at the end i got the following conflict.
Transaction check error:
file /bin/winexe from install of wmi-1.3.14-4.el7.art.x86_64 conflicts with file from package nagiosxi-wmic-5.5.7-1.el7.x86_64
file /bin/wmic from install of wmi-1.3.14-4.el7.art.x86_64 conflicts with file from package nagiosxi-wmic-5.5.7-1.el7.x86_64

Did a search for wmic on my server.
Found one, but symbolic link to the file /usr/local/bin/wmic that do not exist..

$ ls -l /usr/bin/wmic
lrwxrwxrwx 1 root root 19 Nov 21 2018 /usr/bin/wmic -> /usr/local/bin/wmic
$ ls -ll /usr/local/bin/wmic
ls: cannot access /usr/local/bin/wmic: No such file or directory
$ sudo ls -ll /usr/local/bin/wmic
ls: cannot access /usr/local/bin/wmic: No such file or directory


Any suggestion for a quick fix?
Or should I do a upgrade of the NagiosXi to a newer version ?

Re: wmic binary has not been installed.

Posted: Wed Jul 08, 2020 7:56 am
by Interrex
Is it possible to download the nagiosxi-wmic rpm?

Re: wmic binary has not been installed.

Posted: Wed Jul 08, 2020 9:41 am
by scottwilkerson
Interrex wrote:Is it possible to download the nagiosxi-wmic rpm?
The RPM is bundled inside this offline install tarball
https://repo.nagios.com/nagiosxi-offlin ... _64.tar.gz

Extract the tarball and you should be able to see the nagiosxi-wmic rpm

Re: wmic binary has not been installed.

Posted: Wed Jul 08, 2020 5:35 pm
by Interrex
Hi, reinstall of the nagiosxi-wmic rpm did not solve the problem, no errors under install, no librarys found after install...
Is it possible to only install the "wmic rpm" from another version?

Do you belive a XI version upgrade will solve the problem ?

Re: wmic binary has not been installed.

Posted: Thu Jul 09, 2020 6:35 am
by Interrex
Hi, I checked another installation with XI 5.5.6.
Same issue there.

Any suggestion how I can get the wmic / wmi plugin to work?
I’m lost here...

Re: wmic binary has not been installed.

Posted: Thu Jul 09, 2020 7:34 am
by scottwilkerson
Can you navigate to the directory with the nagiosxi-wmic rpm and show the output of

Code: Select all

rpm -ql nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm

Re: wmic binary has not been installed.

Posted: Thu Jul 09, 2020 4:06 pm
by Interrex
scottwilkerson wrote:Can you navigate to the directory with the nagiosxi-wmic rpm and show the output of

Code: Select all

rpm -ql nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm
The output is confusing... :)

root@server:~/rpm $ rpm -ql nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm
package nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm is not installed
root@server:~/rpm $ rpm --install nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm
warning: nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID c62934a0: NOKEY
package nagiosxi-wmic-5.5.7-1.el7.x86_64 is already installed

Should I try to remove and install it again ?

Re: wmic binary has not been installed.

Posted: Thu Jul 09, 2020 4:12 pm
by scottwilkerson
lets try

Code: Select all

rpm -qlpv ./nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm

Re: wmic binary has not been installed.

Posted: Thu Jul 09, 2020 4:38 pm
by Interrex
scottwilkerson wrote:lets try

Code: Select all

rpm -qlpv ./nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm
Output is:
root@server:/tmp/rpm $ rpm -qlpv ./nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm
warning: ./nagiosxi-wmic-5.5.7-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID c62934a0: NOKEY
-rwxr-xr-x 1 root root 7946110 Nov 14 2018 /usr/bin/winexe
-rwxr-xr-x 1 root root 12443029 Nov 14 2018 /usr/bin/wmic

Re: wmic binary has not been installed.

Posted: Thu Jul 09, 2020 5:15 pm
by scottwilkerson
I would remove that symlink you have

Code: Select all

rm -f /usr/bin/wmic
then uninstall and reinstall the RPM