Technitium DNS server zone high-availability

WMI replacement client for check_wmi_plus

Lately MS Windows update cause authentication problem for check_wmi_plus.pl in nagios. The root cause is due to the out-dated WMI linux client.

Try out check_wmi_plus_wmic_dropin as a replacement for the old WMI linux client.

1. Install the WMI client's dependencies for Ubuntu 22.04.

sudo apt-get install python3-impacket python-is-python3

2. Download the python script from the github repository.

git clone https://github.com/simply42/check_wmi_plus_wmic_dropin.git

3. Copy the wmic.py script to /usr/local/bin.

sudo cp wmic.py /usr/local/bin

4. Make the script executable.

sudo chmod +x /usr/local/bin/wmic.puy

5. Create a symbolic to be use for check_wmi_plus.pl script.

sudo ln -s /usr/local/bin/wmic.py /usr/local/bin/wmic

6. Let test the wmic remote query with windows credential.

administrator@ubuntu:~$ /usr/local/bin/wmic -U domain/administrator%password //PC1 "SELECT Model, Manufacturer, WakeUpType, PartOfDomain FROM Win32_ComputerSystem"
CLASS: Win32_ComputerSystem
Manufacturer|Model|Name|PartOfDomain|WakeUpType
VMware, Inc.|VMware Virtual Platform|PC1|True|6

7. Test the check_wmi_plus.pl with windows credential.

administrator@nagios:/usr/lib/nagios/plugins$ ./check_wmi_plus.pl -H 192.168.41.180 -u domain/USER -p PASSWORD -m checkcpu
OK (Sample Period 3 sec) - Average CPU Utilisation 0.47%|'Avg CPU Utilisation'=0.47%;

Comments