Hello,
We have Nagios XI2014R2.0
Using check_wmi_plus.pl (v.59) with wmic 1.3.16
I followed steps in post below.
http://support.nagios.com/forum/viewtop ... 29&p=22405
I'm trying to understand the correct syntax to use in the check_wmi_plus.conf file to add in the wmic argument to use ntlmv2. However, I get error when I try to run wmi plus from the command line.
In check_wmi_plus.conf:
# extra wmic arguments specified on the command line are added to the ones specified here
our @opt_extra_wmic_args=( "--option='client ntlmv2 auth'=Yes"); # extra arguments to pass to wmic
Any idea how i can get around this syntax error to safely use this option?
Thanks,
Don
check_wmi_plus conf file and opt argument ntlm
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_wmi_plus conf file and opt argument ntlm
Can you show us the error you are encountering? What version of windows are you using this against? Are you using AD credentials, or a standard, local user?
Re: check_wmi_plus conf file and opt argument ntlm
Going against a Win 2008 server with our standard wmi user. If i run this command without the --option flag wmic runs as expected. Something about the new version of wmic is causing this issue below. Thx.
[root@bed-996-124 tmp]# wmic --option="client ntlmv2 auth"=Yes -U domain/xxxxxx%xxxxxx //server.com "Select name from Win32_ComputerSystem"
[lib/util/fault.c:163:fault_report()] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lib/util/fault.c:164:fault_report()] INTERNAL ERROR: Signal 6 in pid 10178 (4.0.0tp4-SVN-build-UNKNOWN)[lib/util/fault.c:165:fault_report()]
Please read the file BUGS.txt in the distribution
[lib/util/fault.c:166:fault_report()] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lib/util/fault.c:144:smb_panic()] PANIC: internal error
[lib/util/fault.c:63:call_backtrace()] BACKTRACE: 21 stack frames:
#0 wmic(call_backtrace+0x1f) [0x8b537f]
#1 wmic(smb_panic+0x206) [0x8b5637]
#2 wmic() [0x8b5761]
#3 wmic() [0x8b5790]
#4 /lib64/libc.so.6(+0x326a0) [0x7fb919ae46a0]
#5 /lib64/libc.so.6(gsignal+0x35) [0x7fb919ae4625]
#6 /lib64/libc.so.6(abort+0x175) [0x7fb919ae5e05]
#7 wmic() [0x8c4292]
#8 wmic() [0x8c480b]
#9 wmic(talloc_free+0x18) [0x8c5769]
#10 wmic() [0x7f2452]
#11 wmic() [0x7f24c2]
#12 wmic() [0x83a979]
#13 wmic() [0x83b66a]
#14 wmic(event_loop_once+0x20) [0x83a1df]
#15 wmic(composite_wait+0x34) [0x839b0e]
#16 wmic(WBEM_ConnectServer_recv+0x20) [0x45cc56]
#17 wmic(WBEM_ConnectServer+0x82) [0x45cfd6]
#18 wmic() [0x4592c8]
#19 /lib64/libc.so.6(__libc_start_main+0xfd) [0x7fb919ad0d5d]
#20 wmic() [0x457b89]
Aborted
[root@bed-996-124 tmp]# wmic --option="client ntlmv2 auth"=Yes -U domain/xxxxxx%xxxxxx //server.com "Select name from Win32_ComputerSystem"
[lib/util/fault.c:163:fault_report()] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lib/util/fault.c:164:fault_report()] INTERNAL ERROR: Signal 6 in pid 10178 (4.0.0tp4-SVN-build-UNKNOWN)[lib/util/fault.c:165:fault_report()]
Please read the file BUGS.txt in the distribution
[lib/util/fault.c:166:fault_report()] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lib/util/fault.c:144:smb_panic()] PANIC: internal error
[lib/util/fault.c:63:call_backtrace()] BACKTRACE: 21 stack frames:
#0 wmic(call_backtrace+0x1f) [0x8b537f]
#1 wmic(smb_panic+0x206) [0x8b5637]
#2 wmic() [0x8b5761]
#3 wmic() [0x8b5790]
#4 /lib64/libc.so.6(+0x326a0) [0x7fb919ae46a0]
#5 /lib64/libc.so.6(gsignal+0x35) [0x7fb919ae4625]
#6 /lib64/libc.so.6(abort+0x175) [0x7fb919ae5e05]
#7 wmic() [0x8c4292]
#8 wmic() [0x8c480b]
#9 wmic(talloc_free+0x18) [0x8c5769]
#10 wmic() [0x7f2452]
#11 wmic() [0x7f24c2]
#12 wmic() [0x83a979]
#13 wmic() [0x83b66a]
#14 wmic(event_loop_once+0x20) [0x83a1df]
#15 wmic(composite_wait+0x34) [0x839b0e]
#16 wmic(WBEM_ConnectServer_recv+0x20) [0x45cc56]
#17 wmic(WBEM_ConnectServer+0x82) [0x45cfd6]
#18 wmic() [0x4592c8]
#19 /lib64/libc.so.6(__libc_start_main+0xfd) [0x7fb919ad0d5d]
#20 wmic() [0x457b89]
Aborted
Re: check_wmi_plus conf file and opt argument ntlm
Ok. The issue that causes the stack trace dump in Samba results from a bug in wmic(??). By changing the qualified server name to the IP address of the server fixes this issue.
See https://bugs.op5.com/view.php?id=7739 for more detail on this bug.
So, the outstanding issue is how to add "--option='client ntlmv2 auth'=Yes" into check_wmi_plus.conf using opt_extra_wmic_args variable.
The error I get is:
UNKNOWN - The WMI query had problems. The error text from wmic is: Error setting option 'client'
Thanks
See https://bugs.op5.com/view.php?id=7739 for more detail on this bug.
So, the outstanding issue is how to add "--option='client ntlmv2 auth'=Yes" into check_wmi_plus.conf using opt_extra_wmic_args variable.
The error I get is:
UNKNOWN - The WMI query had problems. The error text from wmic is: Error setting option 'client'
Thanks
Re: check_wmi_plus conf file and opt argument ntlm
Ok. We can close this. The way to get around adding extra arg in this case is to use the -extrawmicarg from the command line:
./check_wmi_plus59.pl -H 0.0.0.0 -u user -p passwd -m checkcpu -w 80 -c 90 -extrawmicarg --option="client ntlmv2 auth"=Yes
It works fine this way.
./check_wmi_plus59.pl -H 0.0.0.0 -u user -p passwd -m checkcpu -w 80 -c 90 -extrawmicarg --option="client ntlmv2 auth"=Yes
It works fine this way.
Re: check_wmi_plus conf file and opt argument ntlm
Glad you were able to figure that out and share with us what worked. We'll go ahead and close this. Thanks!