monitoring dhcp

Giles Coochey giles at coochey.net
Tue Jan 24 15:41:06 CET 2012


On 2012-01-24 14:36, C. Bensend wrote:
>> We've a Windows 2008 server with DHCP role. There is an option to 
>> display
>> the statics of the scope.
>> Total Addresses ..
>> In Use .. %
>> Available ..%
>>
>> Is it possible to gt these information available in Nagios.
>
> I haven't had much luck with this.  Microsoft doesn't expose hardly
> any of this data via WMI or any other interface that I've found.
> I haven't looked at Powershell yet, mostly because many of my
> servers do not have it installed (2003 -vs- 2008).
>
> The best I've been able to do is watch the event log for DHCP
> server complaints about a scope getting close to consumed.  Even
> *that* has been problematic, as the DHCP server service seems to
> arbitrarily decide when it wants to complain.  I ended up writing
> a custom plugin that watches the event log for those events, parsing
> the output, and deciding on whether it's appropriate to alert.
>
I don't think you'll have much trouble getting this via SNMP. It is 
defined in the MIB on a per-scope basis, suggest you go a snmpwalk on 
the OID I gave earlier and see what you get.

MIB excerpt:

           scopeTable OBJECT-TYPE
               SYNTAX  SEQUENCE OF ScopeTableEntry
               ACCESS  read-only
               STATUS  mandatory
               DESCRIPTION
                       "A list of subnets maintained by the server"
               ::= { dhcpScope 1 }

           scopeTableEntry  OBJECT-TYPE
               SYNTAX  ScopeTableEntry
               ACCESS  read-only
               STATUS  mandatory
               DESCRIPTION
			"This is the row corresponding to a subnet"
	      INDEX   { subnetAdd }
               ::= { scopeTable 1 }

	  ScopeTableEntry ::= SEQUENCE {
		subnetAdd
			IpAddress,

		noAddInUse
			Counter,

		noAddFree
			Counter,

		noPendingOffers
			Counter

		}
           subnetAdd  OBJECT-TYPE
               SYNTAX  IpAddress
               ACCESS  read-only
               STATUS  mandatory
               DESCRIPTION
			"This is the subnet address "
               ::= { scopeTableEntry 1 }


           noAddInUse  OBJECT-TYPE
     	  SYNTAX  Counter
     	  ACCESS  read-only
     	  STATUS  mandatory
           DESCRIPTION
		   "This is the no. of addresses in use"
     		::= { scopeTableEntry 2 }

           noAddFree  OBJECT-TYPE
     	  SYNTAX  Counter
     	  ACCESS  read-only
     	  STATUS  mandatory
           DESCRIPTION
		   "This is the no. of addresses that are free "
     		::= { scopeTableEntry 3 }

           noPendingOffers  OBJECT-TYPE
     	  SYNTAX  Counter
     	  ACCESS  read-only
     	  STATUS  mandatory
           DESCRIPTION
		   "This is the no. of addresses that are currently in the offer
		   state"
     		::= { scopeTableEntry 4 }

           END




-- 
Message sent via my webmail account.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list