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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

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

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post 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.
Former Nagios Employee.
me.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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 ...
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

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

Post 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!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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.
Former Nagios Employee
Locked