exporting custom OIDs ?

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
renaatski
Posts: 24
Joined: Tue Apr 27, 2004 4:39 am

exporting custom OIDs ?

Post by renaatski »

Hi,

I've been using cacti on my Fedora Core 3 with great success for a variety of platforms (netapp, cisco). Cacti is doing a great job in keeping track of the metrics I selected.

I now have applications on a Windows platform (Real Media Encoder, Windows Media) that have lots of statistics I'm interested in. Unfortunately, they are not available to the Windows SNMP agent .

Under linux I would just write a script that I'd "link" to a reserved OID and have the script do whatever it takes (parse logfiles, whatever..) to return the values...
I would just put something in /usr/local/share/snmp/snmpd.conf along the lines of:

exec .1.3.6.1.4.1.2021.50 /usr/bin/perl /usr/local/sbin/display-bindstats.pl

So whenever I'd call the .1.3.6.1.4.1.2021.50 OID from the Cacti box, the script gets executed on the called SNMP agent , and returns the requested information.

How does that translate to windows ? Can I use this mechanism to obtain "foreign" counters ?

Kind regards,

Renaat
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Get the Windows Resource kit and look for the MIBCC tool from Microsoft. If there is a counter, you can create an OID for it. Of course, Microsux's would rather you use WMI. Good luck.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
renaatski
Posts: 24
Joined: Tue Apr 27, 2004 4:39 am

Post by renaatski »

Hi Larry,

can you elaborate a bit on that ? Or do you have some examples, links for doing this ?

My colleague have been trying to compile stuff using MIBCC, but have been unable to do so...

Kind regards,

Renaat
Guest

Post by Guest »

Right, maybe this question needs some elaborating.

There isn't exactly a counter for what we're trying to do, but ... If we could make a customer OID known to Windows, we could with a local program on the server SET (using snmpset) a value into that OID.

Cacti would then be able to retrieve that OID, along with the default SMI stuff, and whatnot...

Now, we've created a bogus MIB:

STREAMPOWER-MIB DEFINITIONS ::= BEGIN

IMPORTS
enterprises, Counter, IpAddress, TimeTicks, Gauge
FROM RFC1155-SMI
PhysAddress, DisplayString
FROM RFC1213-MIB
TRAP-TYPE
FROM RFC-1215
OBJECT-TYPE
FROM RFC-1212;


streampower OBJECT IDENTIFIER ::= { enterprises 789 }

-- the current Streampower mib

streampower1 OBJECT IDENTIFIER ::= { streampower 1 }

productType OBJECT-TYPE
SYNTAX INTEGER {
eisa-based(1),
pci-based(2)
}
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The product type representing the target platform."
::= { streampower1 1 }


END

I know that enterprise 789 is Network Appliance , but it only serves as a demo here.

When I check this MIB using http://www.simpleweb.org/Docs/ietf/mibs/validate/ this validates just fine.

Next we compile the mib:

c:\test> mibcc -owhatever.bin theabovesnippet.mib
Microsoft (R) SNMP MIB Compiler Version 2.00
Copyright (c) Microsoft Corporation 1998. All rights reserved.
mibcc: parsing theabovesnippet.mib
mibcc: total files processed: 1
mibcc: writing compiled file 'whatever.bin'

c:\test>

Next we copy the new mib over the existing one from windows:

c:\>test> copy whatever.mib c:\windows\system32\mib.bin
Overwrite C:\WINDOWS\system32\mib.bin? (Yes/No/All): a

I then restart the "SNMP Service" service.

Unfortunately, an snmpget/set of .1.3.6.1.4.1.789.1.1 just fails (as does walking the the tree). SNMPwalk just gives me the standard SMI tree.

The OID just isn't there (not offered by "SNMP service"). I don't get it.


What am I doing wrong here ?


Renaat
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests