Page 1 of 1

Way to monitor/alerts for a number of active RDS session

Posted: Mon Nov 16, 2015 3:44 pm
by dlukinski
Hello Nagios Support

I tried some RDS external script (displaying sessions status), but how to get alerted if say number of the active RDS sessions is 20 or more?
- same script or the performance counter?
- see nothing specific in Wizards or else :-\\

Thanks

Re: Way to monitor/alerts for a number of active RDS sessio

Posted: Mon Nov 16, 2015 4:36 pm
by hsmith
Can you post the script, or a link to the script?

This should be trivial if the script is telling you how many sessions there are. If not, it might be a little more complicated.

Re: Way to monitor/alerts for a number of active RDS sessio

Posted: Mon Nov 16, 2015 11:04 pm
by Box293
I developed this plugin some time ago:

https://exchange.nagios.org/directory/P ... fo/details

However it was more for information gathering purposes so I never added warning or critical thresholds.

My vbscripting is rusty, but after the function around line 470 you could check TotalActive, TotalIdle, TotalDisconnected to see if they exceed a threshold (like 20 perhaps).

Code: Select all

Dim ExitCode
If TotalActive > 20 Then
 ExitCode = 2
End If
And change the last line:

Code: Select all

WScript.Quit(0)
to

Code: Select all

WScript.Quit(ExitCode)
This is pretty rough code ...

Re: Way to monitor/alerts for a number of active RDS sessio

Posted: Thu Nov 19, 2015 9:19 am
by dlukinski
Box293 wrote:I developed this plugin some time ago:

https://exchange.nagios.org/directory/P ... fo/details

However it was more for information gathering purposes so I never added warning or critical thresholds.

My vbscripting is rusty, but after the function around line 470 you could check TotalActive, TotalIdle, TotalDisconnected to see if they exceed a threshold (like 20 perhaps).

Code: Select all

Dim ExitCode
If TotalActive > 20 Then
 ExitCode = 2
End If
And change the last line:

Code: Select all

WScript.Quit(0)
to

Code: Select all

WScript.Quit(ExitCode)
This is pretty rough code ...

This worked, thank you very much!

Re: Way to monitor/alerts for a number of active RDS sessio

Posted: Thu Nov 19, 2015 12:00 pm
by rkennedy
Glad to see this worked. I will now close this thread out, but feel free to open another one in the future if you ever need assistance.