Number of RDP session script not working
Number of RDP session script not working
Hi
I am trying to use this script, but dopesn't seem to work
https://exchange.nagios.org/directory/P ... fo/details
the script works in Windows 2008, WIndows 8, but it doesn't work in Windows 2012
and also the script doesn't give us the number of sessions for windows 2012.
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
Z:\>c:
C:\>cd "Program Files"
C:\Program Files>cd "NSClient++"
C:\Program Files\NSClient++>cd scripts
C:\Program Files\NSClient++\scripts>cscript get_rdp_infovbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: There is no file extension in "C:\Program Files\NSClient++\scripts\
get_rdp_infovbs".
C:\Program Files\NSClient++\scripts>cscript get_rdp_info.vbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files\NSClient++\scripts\get_rdp_info.vbs(370, 5) Microsoft VBScript
runtime error: Object doesn't support this property or method: 'InputBytes'
C:\Program Files\NSClient++\scripts>
I am trying to use this script, but dopesn't seem to work
https://exchange.nagios.org/directory/P ... fo/details
the script works in Windows 2008, WIndows 8, but it doesn't work in Windows 2012
and also the script doesn't give us the number of sessions for windows 2012.
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
Z:\>c:
C:\>cd "Program Files"
C:\Program Files>cd "NSClient++"
C:\Program Files\NSClient++>cd scripts
C:\Program Files\NSClient++\scripts>cscript get_rdp_infovbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: There is no file extension in "C:\Program Files\NSClient++\scripts\
get_rdp_infovbs".
C:\Program Files\NSClient++\scripts>cscript get_rdp_info.vbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files\NSClient++\scripts\get_rdp_info.vbs(370, 5) Microsoft VBScript
runtime error: Object doesn't support this property or method: 'InputBytes'
C:\Program Files\NSClient++\scripts>
Re: Number of RDP session script not working
As this isn't a plugin we wrote, it's a bit difficult to troubleshoot.
Have you taken a look to see if any other plugins will work for you? I was able to find this one -
https://exchange.nagios.org/directory/P ... ns/details
Another option, could you look at your performance counters and see if you can monitor Terminal Services -> Active Sessions? You may be able to pull the active connections from there as well.
Have you taken a look to see if any other plugins will work for you? I was able to find this one -
https://exchange.nagios.org/directory/P ... ns/details
Another option, could you look at your performance counters and see if you can monitor Terminal Services -> Active Sessions? You may be able to pull the active connections from there as well.
Former Nagios Employee
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Number of RDP session script not working
I wrote this script a few years ago.
If you weren't interested in the bytes information, you can comment out lines 398 - 430.
And replace line 494 with:
I think that'll work.
Also, if your operating system is something other than english ... then I would give up as the sessions stuff isn't going to work either.
I had another user report this issue some time ago and they also had Windows 2012. I tried to help them however it seems as though the object the script is referencing no longer exists in the WMI class. I no longer work with Remote Desktop Servers so I have no interest in updating it.bosecorp wrote:the script works in Windows 2008, WIndows 8, but it doesn't work in Windows 2012
If you weren't interested in the bytes information, you can comment out lines 398 - 430.
And replace line 494 with:
Code: Select all
FinalOutput = "Sessions {Active=" & TotalActive & " Idle=" & TotalIdle & " Disconnected=" & TotalDisconnected & "} |'Active Sessions'=" & TotalActive & " 'Idle Sessions'=" & TotalIdle & " 'Disconnected Sessions'=" & TotalDisconnected & " [get_rdp_info]"Also, if your operating system is something other than english ... then I would give up as the sessions stuff isn't going to work either.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Number of RDP session script not working
that eliminated the errors,
but still doesn't give me the session count which is what I really want
but still doesn't give me the session count which is what I really want
Re: Number of RDP session script not working
Are you able to see the active # of connections through the performance counters?rkennedy wrote: Another option, could you look at your performance counters and see if you can monitor Terminal Services -> Active Sessions? You may be able to pull the active connections from there as well.
Former Nagios Employee
Re: Number of RDP session script not working
Yes, I can.
what changes would need to be made to the script
what changes would need to be made to the script
You do not have the required permissions to view the files attached to this post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Number of RDP session script not working
The script uses this command to get the connection details:
What is the output of that command in a dos window?
Code: Select all
qwinstaAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Number of RDP session script not working
The commands shows the active sessions
Re: Number of RDP session script not working
We didn't write the plugin for the Windows RDP sessions, so it's hard to say why it's not working.
If you can pull the information from performance counters as you mentioned, it may be easier to go that route.
If you can pull the information from performance counters as you mentioned, it may be easier to go that route.
Former Nagios Employee
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Number of RDP session script not working
Performance counter is probably going to be easier.
These guides should help:
https://support.nagios.com/kb/category.php?id=19
These guides should help:
https://support.nagios.com/kb/category.php?id=19
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.