Page 1 of 1

wmi monitoring error

Posted: Sat Apr 18, 2015 10:38 am
by vnc786
Hi Team,
NagiosXI=2014R2.6(trail 60 days)
Windows Server 2008 Std R2 64 bit

Steps to Add Windows Server:
1.I have followed document of of WMI ( Monitoring Windows Machines with WMI and Nagios XI)

2. Added windows Server using WMI component in Configuration Wizard, after putting Username and password but i am not able to monitor services

below is error information in browser as well as on command line

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.
[librpc/rpc/dcerpc_util.c:1290:dcerpc_pipe_auth_recv()] Failed to bind to uuid 4d9f4ab8-7d1c-11cf-861e-0020af6e7c57 - NT_STATUS_NET_WRITE_FAULT
[librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000022) in dcerpc_pipe_connect_b_recv
[wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied


Things done on server
Firewall Off
checked WMI connection remotely success https://4sysops.com/archives/wbemtest-p ... i-queries/
https://4sysops.com/archives/wbemtest-p ... nectivity/
created user and given rights has per nagosxi document


Can telnet from NagiosXi Server to windows Server
$ telnet 192.168.5.9 135
Trying 192.168.5.9...
Connected to 192.168.5.9.
Escape character is '^]'.

Re: wmi monitoring error

Posted: Sun Apr 19, 2015 8:33 pm
by Box293
Does your password have any special characters?

Can you open Core Configuration Manager
Monitoring > Services
Click the Disk Icon for this service

Paste the text for the service here in a code block.

Re: wmi monitoring error

Posted: Sun Apr 19, 2015 11:37 pm
by vnc786
Box293 wrote:Does your password have any special characters?
no
Can you open Core Configuration Manager
Monitoring > Services
Click the Disk Icon for this service

Code: Select all

###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.3.2
# Date:	      2015-04-20 09:51:07
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios CCM will overwrite all manual settings during the next update if you 
# would like to edit files manually, place them in the 'static' directory or 
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define service {
	host_name			192.168.5.9
	service_description		CPU Usage
	use				xiwizard_windowswmi_service
	check_command			check_xi_service_wmiplus!'wmiagent'!'admin@321'!checkcpu!-w '80' -c '90'
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowswmi
	register			1
	}	

define service {
	host_name			192.168.5.9
	service_description		Drive C: Disk Usage
	use				xiwizard_windowswmi_service
	check_command			check_xi_service_wmiplus!'wmiagent'!'admin@321'!checkdrivesize!-a 'C': -w '80' -c '95'
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowswmi
	register			1
	}	

define service {
	host_name			192.168.5.9
	service_description		Explorer
	use				xiwizard_windowswmi_service
	check_command			check_xi_service_wmiplus!'wmiagent'!'admin@321'!checkprocess!-s Commandline -a 'Explorer.exe'
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowswmi
	register			1
	}	

define service {
	host_name			192.168.5.9
	service_description		Memory Usage
	use				xiwizard_windowswmi_service
	check_command			check_xi_service_wmiplus!'wmiagent'!'admin@321'!checkmem!-s physical -w '80' -c '90'
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowswmi
	register			1
	}	

define service {
	host_name			192.168.5.9
	service_description		Page File Usage
	use				xiwizard_windowswmi_service
	check_command			check_xi_service_wmiplus!'wmiagent'!'admin@321'!checkpage!-w '80' -c '90'
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowswmi
	register			1
	}	

define service {
	host_name			192.168.5.9
	service_description		Ping
	use				xiwizard_windowsserver_ping_service
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowswmi
	register			1
	}	

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
on command line i have try back-slashing but no success

Small things to note down
-wmi services running
-can login with wmiagent user locally
-password never expires

--edit--
the current windows is a test server so i do have admin rights FYI

update 1:
installed fresh Windows Server 2008 Ent and did WMI monitoring, got success, I can now fetch the details using WMI but the existing Windows server is having problem. Cant figure out who is having nagios or windows ?

checked this post http://support.nagios.com/forum/viewtop ... mi#p128554

Re: wmi monitoring error

Posted: Mon Apr 20, 2015 10:13 am
by jdalrymple
I've had an absolute 100% success rate with our NagiosXI WMI configuration document.

That said - I recently worked with an individual who even after double and triple checking everything in that document they couldn't get it to work and had a similar error as yours. They ended up having to lower their UAC level.

This isn't strictly necessary. I've used WMI monitoring on all versions of windows from XP to 8.1 (2003-2012R2) without touching the UAC slider, but in one individuals environment it apparently became necessary. This is no doubt due to some strange policies or something being pushed down through his domain.

YMMV

Re: wmi monitoring error

Posted: Mon Apr 20, 2015 12:41 pm
by vnc786
hi jdalrymple,

thanks for reply,

For nagios to monitor through WMI is it compulsory to do steps which are mentioned in document ? I mean below mention steps. The reason i am asking is how do i give justification if some one asks why nagios want to do below things.
  • Adding Remote Activation Privilege to Windows DCOM
    Adding Remote WMI Access
Okay so i can create a user in domain and i can monitor through that, but consider a scenario where you have 100-200 server not in domain, what will be the best route to do this. ?

Re: wmi monitoring error

Posted: Mon Apr 20, 2015 1:10 pm
by jdalrymple
Powershell can handle all of the tasks that our document outlines to do in a GUI. How are you currently deploying mass changes to those non-domain machines? If you can write a proper .PS1 and get it deployed as a logon process you should achieve your goal.

As for the necessity of going through the steps in the script - they're not strictly necessary. They are the way to create a system ACE that will allow Nagios to do WMI monitoring with the absolute *LEAST* unnecessary privileges. - A.K.A. the Nagios server doesn't need administrator access to the workstation.

Re: wmi monitoring error

Posted: Mon Apr 20, 2015 1:18 pm
by vnc786
There is a scenario that around 500+ windows servers are there and running different applications. All server are having a common user already created. so planning to do bulk cloning and the problem is that the client is very strict about making changes

Re: wmi monitoring error

Posted: Mon Apr 20, 2015 1:48 pm
by jdalrymple
vnc786 wrote:All server are having a common user already created. so planning to do bulk cloning and the problem is that the client is very strict about making changes
The minimum requirements for remote monitoring using WMI are in that document. If those configuration parameters are in place for the configured user then there should be no problem. Please be aware this is NOT any shortcoming of Nagios, this is the minimum requirement to monitor Windows remotely using WMI.

Re: wmi monitoring error

Posted: Tue Apr 21, 2015 11:22 am
by vnc786
Hi jdalrymple,

I think the issue is with password.
A normal user created with simple password and added in administrator group and got success didn't follow any steps from Nagios Document just added in Administrator Group but at same time if the existing user is used with tough password(special characters) it fails.

Re: wmi monitoring error

Posted: Tue Apr 21, 2015 2:27 pm
by lmiltchev
If you have spacial characters in the password, you can place the password in the "/usr/local/nagios/etc/resource.cfg". For more info, check our "Nagios XI - Understanding User Macros" document:

http://assets.nagios.com/downloads/nagi ... Macros.pdf