Fwd: Re: Re: NRPE/NSClient++ CheckCPU Error?
Matthew Jurgens
nagiosusers at edcint.co.nz
Wed Feb 1 07:11:13 CET 2012
On 31/01/2012 11:13 PM, Robert Jackson wrote:
>
> Hi Matthew,
>
> Many thanks for the reply. I'm really sorry for all the hassle. I
> really like check_wmi_plus.pl and it's a bit of a learning curve for
> me at the moment. I hope you can bear with me?
>
> Is there a switch on the command that allows multiple runs or how do I
> run the command twice with Centreon/Nagios?
>
I don't think you really want to do that.
check_wmi_plus calculates using counters because that way it gets really
accurate results. To do this however it needs 2 WMI samples so that is
can difference the counters and give you a result. To get 2 WMI samples
you could do this the old way it used to do it which was take a sample,
wait a bit, take another sample, calculate results from those 2 samples.
The newer way is take a sample, calculate results from the sample just
taken and the sample taken the last time it ran. If there was no last
time you ran or the sample is older than KEXPIRY (set on the command
line by --keepexpiry KEXPIRY and defaulted to 3600 seconds) then
check_wmi_plus can't calculate any results so it just collects a sample
and then waits till the next time it is run.
The newer way means less WMI calls, less chance of a timeout and also
means that the calculations include counter activity when check_wmi_plus
is not even running.
If you really want to run the old way then you have to
use the --nokeepstate and -y DELAY parameters
> The complete error from Nagios is:
>
> 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
>
> Obviously this indicates username/password or access rights issues.
> However the username/password combination I have combined with access
> rights (member of the local Administrators group) works as is proven
> by the plugin script test in Centreon:
>
> Command Line
>
>
>
> /usr/lib/nagios/plugins/check_wmi_plus.pl -H wm-tsrv2 -u
> 'WM-Tsrv2/nagios-wmi' -p 'wmicheck' -m checkcpu -w '85' -c '95' ' ' '
> ' ' '
>
> Output
>
>
>
> OK (Sample Period 899 sec) - Average CPU Utilisation 8.48%|'Avg CPU
> Utilisation'=8.48%;85;95;
>
> Status
>
>
>
> OK
>
I don't fully understand how Centreon works but that WMI error is just
what is returned from Windows by wmic. So whatever user Centreon is
passing when is runs for real is either not what you think it is or just
does not have the permission level on the Windows server. You'll need to
turn on debugging maybe in Nagios and maybe in Centreon to see what the
full command that it is actually executing against the Windows host.
check_wmi_plus has a debug mode too. Add -d to the command line. Add -z
also if you want to see the user/password it is using for the WMI calls.
--
Smartmon System Monitoring <http://www.smartmon.com.au>
www.smartmon.com.au <http://www.smartmon.com.au>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120201/6c7e17f6/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list