Hey guys,
I've been tasked at work with exposing various metrics for our software through SNMP. I've not really worked with SNMP much, but through various googling, I've managed to come up with the following MIB file:
I can run snmpwalk -v 1 -m +IDB-MIB -c public localhost:161 .1.3.6.1.4.1.42134.3 and see in the debug information that it's finding the correct MIB file, and it doesn't give me an "object not found" error.
However, I can't figure out how to make it return a value. All that snmpwalk will display is "End of MIB". I have a feeling I'm missing a fairly important step, something to do with "compiling" the MIB, but every tutorial I've read assumes that's already been done and doesn't give any information on how to do it. Can anyone provide me with a link or any information on how to do this?
Once I've gotten this simple number to display, I need to make the output be the result of a script, so if anyone can give me some pointers for that, it would be much appreciated.
Thanks!
I've been tasked at work with exposing various metrics for our software through SNMP. I've not really worked with SNMP much, but through various googling, I've managed to come up with the following MIB file:
Code:
IDB-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32, enterprises
FROM SNMPv2-SMI
OBJECT-GROUP FROM SNMPv2-CONF;
idb MODULE-IDENTITY
LAST-UPDATED "201307300000Z" -- Midnight 30 July 2013
ORGANIZATION "xxxxxxxxxxxxxxxxx"
CONTACT-INFO "email: xxxxxxxxxxxxxx"
DESCRIPTION "xxxxxxxxxx"
REVISION "201307300000Z" -- Midnight 29 July 2013
DESCRIPTION "First Draft"
::= { enterprises 42134 }
test2 OBJECT-TYPE
SYNTAX Integer32
UNITS "tests"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"A test object"
DEFVAL { 5 }
::= { idb 3 }
testGroup OBJECT-GROUP
OBJECTS {
test2
}
STATUS current
DESCRIPTION "all test objects"
::= { idb 2 }
However, I can't figure out how to make it return a value. All that snmpwalk will display is "End of MIB". I have a feeling I'm missing a fairly important step, something to do with "compiling" the MIB, but every tutorial I've read assumes that's already been done and doesn't give any information on how to do it. Can anyone provide me with a link or any information on how to do this?
Once I've gotten this simple number to display, I need to make the output be the result of a script, so if anyone can give me some pointers for that, it would be much appreciated.
Thanks!