Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 9823 Views 27 Replies Latest reply: Jan 19, 2012 2:09 PM by Ryan Matte RSS
Ryan Matte ZenossMaster 653 posts since
Mar 26, 2009
Currently Being Moderated

Nov 28, 2011 6:42 PM

Need Some Advice: Currently developing ZenPack to monitor Windows Services via SNMP

I'm currently developing a ZenPack for monitoring Windows Services via SNMP.  I'm starting with developing the interface for 2.5 and will also make sure that it's fully compatible with the 3.x interface before release.

 

I've run in to a snag with the way that Microsoft does the SNMP for this.  The OIDs for the Services are made up from the name of the services.  Each number in the OID after a certain point represents a character in the name of the service.  There is also an OID that represents the status of the process.

 

For example, the OID for the "FileZilla Server FTP server" Service status would be:

 

1.3.6.1.4.1.77.1.2.3.1.3.27.70.105.108.101.90.105.108.108.97.32.83.101.114.118.101.114.32.70.84.80.32.115.101.114.118.101.114

 

Where 1.3.6.1.4.1.77.1.2.3.1.3.27 is the index OID for status values and 70.105.108.101.90.105.108.108.97.32.83.101.114.118.101.114.32.70.84.80.32.115.101.114.118.101.114 is the part of the OID representing the service.

 

 

70105108101901051081089732831011141181011143270848032115101114118101114
FileZilla
Server
FTP
server

 

The nice part about them doing the OIDs this way is that you're never going to end up with bad OIDs for services since they never change for any particular service.  The bad part is that, instead of changing the status value when a service is stopped, they actually represent the service as being stopped by removing it from the SNMP index/table.  This means that instead of receiving a status value other than 1, I end up receiving a debug event in Zenoss.  As a temporary measure I'm using a command datasource that sends a value of 0 when the OID doesn't return a value, but I can't keep it that way because it definitely won't scale well at all.

 

Does anyone have any good idea of how I might be able to do this without having to write a new datasource type and daemon?  I would really like to avoid doing so over simply returning a 0 value.  Any suggestions would be greatly appreciated.

 

Here is a preview of what I have done so far.  The collector plugin that I wrote works lovely, and it identified and saves the snmpindex value for each of the services.  It really all boils down to getting the polling working efficiently and fixing up the skin before it's ready to go.  I need to build locking capability in because if an automated remodel were to kick off while a service is down, it would end up removing the service from the list, which is obviously undersirable.  I also plan on adding a zProperty where Service names can be input to be automatically omitted during modelling.

 

services-screen.png

1 2 Previous Next

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points