Windows Active Sessions
Robert Jackson
rab at walkermartyn.co.uk
Mon Jan 23 15:56:34 CET 2012
Hi Jim,
Managed to get some output, but not what I expected:
"I (0.3.8.75 2010-05-27) seem to be doing fine"
I get the same manually running check_nrpe from the Nagios host command
line.
Any ideas?
-----Original Message-----
From: Jim Avery [mailto:jim at jimavery.me.uk]
Sent: Monday 23 January 2012 13:43
To: Nagios Users List
Subject: rab at walkermartyn.co.uk - Re: [Nagios-users] Windows Active
Sessions - Bayesian Filter detected spam
On 23 January 2012 13:09, Robert Jackson <rab at walkermartyn.co.uk> wrote:
> Does anyone know how to return the number of active sessions from a
Windows
> Terminal server? I have installed the NSClient++ service on the
Windows
> server and obviously have the NRPE plugin installed on my Nagios host.
Rab,
if I've understood correctly then you can query a Windows performance
counter.
I use an entry in the NSClient++ config file in the [External Alias]
section that looks like this:-
alias_CheckCounter-ts_act_sess=CheckCounter
"Counter:sessions=\Terminal Services\Active Sessions" ShowAll
MaxWarn=40 MaxCrit=50
Then on the Nagios side, the command is simply check_nrpe -H
thehostname -c alias_CheckCounter-ts_act_sess
So the command definition in Nagios is:-
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -u $ARG1$
}
And the service definition looks something like this:-
define service{
use srv-pnp,generic-service
host_name myhost
service_description TS_Active_Sessions
check_command check_nrpe!-c ts_act_sess
notes Number of Terminal Services Active Sessions
contact_groups notify-engineers
}
There are lots of similar ways to do this sort of think using
NSClient++. Precisely how you set it up depends a bit on how
obsessive you are about security and your particular preference.
The method shown above means you can have allow_arguments=0 and
allow_nasty_meta_chars=0 in the [nrpe] section which is good for
security. The downside is that if you need to change the warning
theshold, you have to edit the nsc.ini file on the target system.
hth,
Jim
------------------------------------------------------------------------
------
Try before you buy = See our experts in action!
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-dev2
_______________________________________________
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
************************************************************************
The information in this internet E-mail is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is unauthorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
Walker Martyn Ltd or any of its affiliates. If you are not the
intended recipient please contact administrator at walkermartyn.co.uk
Walker Martyn Ltd, company number SC197533. Company is
registered in Scotland and has its registered office at 1 Park
Circus Place, Glasgow G3 6AH, UK.
****************************************************************
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
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-dev2
_______________________________________________
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