creating custom mib
Áki Hermann Barkarson <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <9A5C060238623040BBA178A1CBFE9CE8C2DC1C6C@Skyrr-ExchMb1.skyrr.local> |
Hi guys,
Maybe this is not the place to ask with help for creating a custom MIB and if not then if someone could point me towards a forum or mailing list I'd be very grateful.
I have a lot of scripts to monitor various systems and most of them will have some sort of built-in alert functionality that will send an e-mail.. it's a bit messy to have that functionality all distributed and I wanted to see if snmp traps may be a better way to go. We cover all the monitoring functionality with polling for reliability but snmp-traps we use to speed up alerting for critical systems.
To learn more about this I want to create my own MIB and I have an enterprise OID (1513) that I can use.
So I send traps with SNMPv2-SMI::enterprises.1513.... and passing along some variable and this is where I'm struggling with syntax and general lack of understanding. I want to format my mib in the correct way.. maybe it should be split down into one mib defining objects and then I define the notifications in another mib.. and and.. so many questions :) I can see various examples out there but I'd love to have a conversation with someone who actually knows this stuff.
This is what I have so far:
Advania-Traps-MIB DEFINITIONS ::= BEGIN
IMPORTS
enterprises FROM RFC1155-SMI
advania OBJECT IDENTIFIER ::= { enterprises 1513 }
objects OBJECT IDENTIFIER ::= { advania 1 }
notifications OBJECT IDENTIFIER ::= { advania 2 }
-- Objects
trapState OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..31))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A brief description."
::= { msg 1 }
shortMsg OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..31))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A brief description."
::= { msg 1 }
longMsg OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..1279))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Detailed info."
::= { msg 2 }
-- Notifications
customTrap NOTIFICATION-TYPE
STATUS current
VARIABLES { trapState, shortMsg, longMsg }
DESCRIPTION "Custom trap alert."
::= { notifications 1 }
END
Not sure if this is how it's meant to be formatted, any help would be appreciated..
[Description: C:\Users\aki.SKYRR\AppData\Roaming\Microsoft\Signatures\Advania-reply (Áki Hermann Barkarson)-Image01.png]<UrlBlockedError.aspx>
Áki Hermann Barkarson
Sérfræðingur / Service Engineer
CCDP / CCIE # 27552
Skilmálar/Disclaimer<http://www.advania.is/disclaimer>
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
image001.png
(image/png, 11.1 KB) - not displayed