Windows service monitoring help.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gdolidze
Posts: 154
Joined: Tue Apr 07, 2015 10:07 am

Windows service monitoring help.

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Windows service monitoring help.

Post 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?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Windows service monitoring help.

Post 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!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
gdolidze
Posts: 154
Joined: Tue Apr 07, 2015 10:07 am

Re: Windows service monitoring help.

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Windows service monitoring help.

Post 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.
Locked