Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
[******@nagios ~]$ sudo /usr/local/nagios/bin/plugins/check_wmi_plus/check_wmi_plus.pl -H "********" -u "******\****" -p "********" -m checkeventlog -a application,system -o 2 -3 24
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.
[wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied
There was an issue recently where this was failing because of a locked out account in AD -- could this be the case at all? Are other checks working using this domain account?
Are you able to check the logs to see if the credentials are getting validated or not on the AD side?
I don't see any login attempts in the Security log for the domain account.
So, the domain account is not working for any checks. I tried the checks from the command line as well with no success. Every attempt gets the same login error as shown previously.
The local account is working for all checks, Disk Space, RAM Utilitzation, Uptime, etc. The event viewer check returns no events using the local account. The check is configured to return any events in the last 24 hours, so it should show something.
We're running v1.59. I looked at the changelog for the newer versions and didn't anything specific to our issue, so I haven't upgraded.
/usr/local/nagios/bin/plugins/check_wmi_plus/check_wmi_plus.pl -d -d | head -n 20
Command Line (v1.59): /usr/local/nagios/bin/plugins/check_wmi_plus/check_wmi_plus.pl -d -d
Conf File Dir: /usr/local/nagios/bin/plugins/check_wmi_plus
Loaded Conf File /usr/local/nagios/bin/plugins/check_wmi_plus/check_wmi_plus.conf
======================================== SYSTEM INFO =====================================================
--------------------- Module Versions ---------------------
MODULE_NAME INSTALLED_VERSION STATUS DESIRED_VERSION
Config::IniFiles 2.83 ok 2.58
Perl Version 5.010001 ok 5.01
Getopt::Long 2.45 ok 2.38
DateTime 1.18 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
[***** ~]$sudo /usr/local/nagios/bin/plugins/check_wmi_plus/check_wmi_plus.pl -H "********" -u "******\****" -p "********" -m checkeventlog -a application,system -o 2 -3 24 -d
Command Line (v1.59): /usr/local/nagios/bin/plugins/check_wmi_plus/check_wmi_plus.pl -H "********" -u USER -p PASS -m checkeventlog -a application,system -o 2 -3 24 -d
Conf File Dir: /usr/local/nagios/bin/plugins/check_wmi_plus
Loaded Conf File /usr/local/nagios/bin/plugins/check_wmi_plus/check_wmi_plus.conf
Round #1 of 1
QUERY: /bin/wmic '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//rightfax.qdinc.net' 'Select EventCode,EventIdentifier,Type,LogFile,SourceName,Message,TimeGenerated from Win32_NTLogEvent where ( Logfile="application" OR Logfile="system" ) and EventType<=2 and EventType>0 and TimeGenerated > "20160619141400.00000000"'
OUTPUT: [wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied
Could not find the CLASS: line - an error occurred
WMI DATA:$VAR1 = [];
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.
[wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied