/get_rdp_info

Nagios plugin to obtain Remote Desktop Session Host session details

Primary LanguageVisual BasicGNU General Public License v3.0GPL-3.0

get_rdp_info.vbs plugin for Nagios version 2012-10-07
Copyright (c) 2012 Troy Lea aka Box293
plugins@box293.com

The purpose of this plugin is to get information on the Windows Terminal Services / Remote Desktop Session Host Usage and return this back to Nagios.
The plugin runs without any arguments, it will just return a service status of OK.
The plugin is not designed to return critical or warning states, it's core purpose is to gather data for historical analysis.

This plugin is designed to be run by NSClient++ on the host you want to check. It is not designed to allow you to check a remote host, this is why there is no option to specify the host name.


Session Information:
The plugin will report how many RDP sessions are Active, Idle or Disconnected.
This is a way to look at daily trends and understand how loaded your servers are.


RDP Bytes:
This plugin will report the total RDP Input and Output bytes of all sessions.
Once again this is a way to look at daily trends and understand how much RDP traffic is generated by your RDP servers. For example users may be transferring files via the RDP protocol, this will be highlighted when looking at the historical data.


Configuring Nagios and NSClient++

Nagios:
The following shows you how to configure your Command AND Service definitions.
Command Definition:
        define command {
                command_name    get_rdp_info
                command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c get_rdp_info
                }

Service Definition:
        define service {
                host_name               your_host
                service_description     RDP Info
                check_command           get_rdp_info
                max_check_attempts      3
                check_interval          3
                retry_interval          3
                register                1
                }

NSClient++
Version 0.3.x
Copy the plugin to the scripts directory.
Add the following to the [External Scripts] section in NSC.ini:
        get_rdp_info=cscript.exe //T:30 //NoLogo scripts\get_rdp_info.vbs

Nagios PNP Performance Graph Template
A custom pnp performance graph template has been provided, this generates two seperate performance graphs.
The file must be placed into the pnp/templates directory on your Nagios host. I have only tested this on Nagios XI and the default location on a Nagios XI host is /usr/local/nagios/share/pnp/templates.
NOTE: The name of the file MUST match the name of the Command Definition command_name. In the example above it is called get_rdp_info and hence this is why the template is called get_rdp_info.php. If you are using this plugin as a passive check, the ending string of the performance data includes the name of the plugin, pnp will see this and use the custom pnp template.


License:
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

To see the license type:
        cscript /nologo check_paging_file.vbs -license | more

Help:
To see the help type:
        cscript /nologo check_paging_file.vbs -help | more


Version Notes:
2012-10-05 Initial release.