Page 1 of 1

Windows service monitoring help.

Posted: Thu Jul 16, 2015 2:32 pm
by gdolidze
I am looking to monitor the following

distribute file system (dfs)
Network Drive (driven M)
Terminal services
remote desktop services

Can you guys suggest some good plugins for these services.

Re: Windows service monitoring help.

Posted: Thu Jul 16, 2015 2:55 pm
by jdalrymple
gdolidze wrote:distribute file system (dfs)
Builtin - monitor the DFS service and also make sure that DNS is working well with check_dns.
gdolidze wrote:Network Drive (driven M)
Availability and capacity from a client is easy, you can use the wizard and just select it as a drive letter.
gdolidze wrote:Terminal services
remote desktop services
These are kind of the same thing. You could check_tcp port 3389 from a client, or on the server you could just use the wizard and check for the service called termService.

If you are also looking to monitor RDS gateways that's just check_tcp port 443. What am I missing?

Re: Windows service monitoring help.

Posted: Thu Jul 16, 2015 2:59 pm
by jolson
Supplementing what jdalrymple said, I found some plugins you might find interesting:

dfs: https://exchange.nagios.org/directory/A ... or/details

Network Drive: Is there a reason you cannot monitor the drive on the host that distributes the shared drive? I am curious because your answer will determine my suggestion.

Terminal Services: I found several plugins for this purpose.
https://exchange.nagios.org/directory/P ... fo/details
https://exchange.nagios.org/directory/P ... ns/details
https://exchange.nagios.org/directory/P ... TK/details

Remote Desktop Services: You can use NSClient to monitor any service on a Windows box, including Remote Desktop Services.

I'm happy to answer your follow up questions. Thanks!

Re: Windows service monitoring help.

Posted: Thu Jul 16, 2015 3:21 pm
by gdolidze
I should have been more specific,What I need is to know how to check that the driver M is always mapped.
Sorry about that.

Re: Windows service monitoring help.

Posted: Thu Jul 16, 2015 4:19 pm
by ssax
You should be able to use a WMI query or batch/VBS script to get the data that you want.

If you run this command from the command line on the windows machine it should show you the mapped drives and their status:

Code: Select all

wmic path Win32_MappedLogicalDisk get
Then you would just need to write the logic to parse it.

Or you could modify this VBScript that I've modified to suit your needs:

Code: Select all

On Error Resume Next
strComputer = "."
returnValue = 2

if WScript.Arguments.Count = 0 then
    WScript.Echo "Missing parameters"
    WScript.Quit(3)
end if

strDrive = WScript.Arguments(0)
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select Name from Win32_MappedLogicalDisk",,48)
For Each objItem in colItems
    if strDrive = objItem.Name then
        returnValue = 0
    end if
Next

if returnValue = 0 then
    WScript.echo "OK - Drive " & strDrive & ": is mapped"
else
    WScript.echo "CRITICAL - Drive " & strDrive & ": is NOT mapped"
end if

WScript.Quit(returnValue)
Then you could call it through check_nrpe and pass in M: as an argument.