Windows Server 2008 R2 - Invalid Drive

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
syappstech
Posts: 3
Joined: Wed Dec 21, 2011 3:34 pm

Windows Server 2008 R2 - Invalid Drive

Post by syappstech »

Howdy,

I have setup nagios to monitor free disk space on a Windows 2008 R2 server. We'll call that server 1. When nagios polls this device, it polls the C:\ and F:\ drive without an issue, but reports an Invalid Drive for the E:\ drive. Server2, Server3 and Server4, all report on the E: drive just fine. I've attached a snippet below.

I see there is an open bug report with NSC on this (http://nsclient.org/nscp/ticket/446), but wondering if anyone has figured out a way around it, as it's really hampering our monitoring abilities.

Code: Select all

define service{
        use                     generic-service
        hostgroup_name          windows-servers
        service_description     C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 95 -c 98
        }

# Create a service for monitoring E:\ disk usage
# Change the host_name to match the name of the host you defined above

define service{
        use                     generic-service
        host_name               server1,server2,server3,server4
        service_description     E:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l e -w 95 -c 98
        }

# Create a service for monitoring F:\ disk usage
# Change the host_name to match the name of the host you defined above

define service{
        use                     generic-service
        host_name               server1
        service_description     F:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l f -w 90 -c 95
        }
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Windows Server 2008 R2 - Invalid Drive

Post by jsmurphy »

I have never come across this problem though it may be worthwhile trying to use check_nrpe instead of check_nt: http://www.nsclient.org/nscp/wiki/CheckDriveSize
syappstech
Posts: 3
Joined: Wed Dec 21, 2011 3:34 pm

Re: Windows Server 2008 R2 - Invalid Drive

Post by syappstech »

jsmurphy wrote:I have never come across this problem though it may be worthwhile trying to use check_nrpe instead of check_nt: http://www.nsclient.org/nscp/wiki/CheckDriveSize
Yeah, this is the first time I've run in to this. No matter what I do, I come back to the same error. At least it appears to be a documented bug, just not sure if it's fixed or if they have a workaround for it.

That sounds like a good idea, but is honestly above my head. Are there folks around who do contract work? The service contract through Nagios seems excessive (though likely, well worth it).

Thanks!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Windows Server 2008 R2 - Invalid Drive

Post by jsmurphy »

I am sure there are but that's really going to depend on where you are located... in my region of the world Nagios has very little penetration (It's all Tivoli and OpenView here) so the Nagios professional is a rare breed.

The support contract however is well worth it, especially considering you can get Nagios XI with it which has a number of great features that make administration easier. (I feel like I should clarify I'm not paid to say that, my company recently swapped from Core to XI a few months ago and have been quite happy with it :lol: )
syappstech
Posts: 3
Joined: Wed Dec 21, 2011 3:34 pm

Re: Windows Server 2008 R2 - Invalid Drive

Post by syappstech »

Since I see a few people are having the same issue and I've found no resolution, I wanted to share what I found and how I fixed this.

This issue was impacting us on one single Windows 2008 Server R2 server. All of our other servers E:\ drives could be monitored without issue. On a whim, I checked the security settings at the root of the drive.

The drive permission at the root of the E:\ drive was restricted to the Domain Admins group and Domain Users only.

I looked at the same permissions on the F:\ drive, which was able to be monitored by nagios correctly. That drive had the same, but also have \Everyone, \CREATOR OWNER and \SYSTEM.

I added the \SYSTEM back to the root permissions on the E:\ drive and bam, nagios was able to now see that drive and report on it's free disk space.

This is now resolved, at least, for me. Hopefully this will help others who have run in to this issue as well.
Attachments
correct permissions
correct permissions
correct permissions.png (11.1 KiB) Viewed 8664 times
wrong permissions
wrong permissions
LHammonds
Posts: 23
Joined: Mon Jan 02, 2012 9:03 pm
Location: Behind you!!!

Re: Windows Server 2008 R2 - Invalid Drive

Post by LHammonds »

Thanks for letting us know what the solution was. I was curious since I had something kinda similar on some Win2008 servers but one was missing the firewall port rule and the other was a configuration file problem (forgot to change the IP after copying for a new server)

FYI - As a rule, I make sure the group "EVERYONE" is removed from all shares. Viruses tend to exploit it and use it to distribute / infect files (e.g. I Love You)

LHammonds
Locked