Open-AudIT https://www.open-audit.org/phpBB3/ |
|
add MIB for Switch https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=6609 |
Page 1 of 1 |
Author: | caninfo [ Wed Jul 26, 2017 5:04 pm ] |
Post subject: | add MIB for Switch |
Hi, On a discovery of a switch with snmp, somefields are not recognized as the serial number or the model. I've download from the manufacturer the MIB for Hirschmann switchs. Is it possible to add it to Open Audit code (OID's)? Thank you |
Author: | Mark [ Thu Jul 27, 2017 7:25 am ] |
Post subject: | Re: add MIB for Switch |
Post the MIB here and I'll take a look. Should be simple enough. |
Author: | caninfo [ Thu Jul 27, 2017 6:02 pm ] |
Post subject: | Re: add MIB for Switch |
[code]HIRSCHMANN-DISCOVERY-MGMT-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-TYPE FROM SNMPv2-SMI MacAddress FROM SNMPv2-TC SnmpAdminString FROM SNMP-FRAMEWORK-MIB InetAddressType, InetAddress, InetAddressPrefixLength FROM INET-ADDRESS-MIB hmManagement FROM HIRSCHMANN-MGMT-MIB; hmMgmtDiscoveryGroup MODULE-IDENTITY LAST-UPDATED "201407071200Z" -- 07 Jul 2014 12:00:00 GMT ORGANIZATION "Hirschmann Automation and Control GmbH" CONTACT-INFO "Postal: Stuttgarter Str. 45-51 72654 Neckartenzlingen Germany Phone: +49 7127 140 E-mail: hac.support@belden.com" DESCRIPTION "The Hirschmann generic discovery SNMP MIB. Copyright (C) 2014. All Rights Reserved." REVISION "201407071200Z" -- 07 Jul 2014 12:00:00 GMT DESCRIPTION "Initial version." ::= { hmManagement 100 } -- -- ************************************************************* -- hmMgmtDiscoveryGroup groups -- ************************************************************* -- hmMgmtDiscoveryStatusGroup OBJECT IDENTIFIER ::= { hmMgmtDiscoveryGroup 1 } hmMgmtDiscoveryCfgGroup OBJECT IDENTIFIER ::= { hmMgmtDiscoveryGroup 2 } -- -- ************************************************************* -- hmMgmtDiscoveryStatusGroup -- ************************************************************* -- hmMgmtDiscMode OBJECT-TYPE SYNTAX INTEGER { read-write(1), read-only(2) } MAX-ACCESS read-only STATUS current DESCRIPTION "Operational mode of the protocol." ::= { hmMgmtDiscoveryStatusGroup 1 } hmMgmtDiscMacAddr OBJECT-TYPE SYNTAX MacAddress MAX-ACCESS read-only STATUS current DESCRIPTION "Physical base address (MAC address) of the agent. This is the burned in MAC address from the production." ::= { hmMgmtDiscoveryStatusGroup 2 } hmMgmtDiscIpIntfType OBJECT-TYPE SYNTAX INTEGER { loopback-intf (1), router-intf (2), mgmt-intf (3) } MAX-ACCESS read-only STATUS current DESCRIPTION "The interface which reports the ip settings." ::= { hmMgmtDiscoveryStatusGroup 3 } hmMgmtDiscSwVersion OBJECT-TYPE SYNTAX SnmpAdminString MAX-ACCESS read-only STATUS current DESCRIPTION "Version of the currently running firmware." ::= { hmMgmtDiscoveryStatusGroup 4 } hmMgmtDiscProductDescr OBJECT-TYPE SYNTAX SnmpAdminString MAX-ACCESS read-only STATUS current DESCRIPTION "Manufacturer-defined product description." ::= { hmMgmtDiscoveryStatusGroup 5 } -- -- ************************************************************* -- hmMgmtDiscoveryCfgGroup -- ************************************************************* -- hmMgmtDiscCfgUUID OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS read-write STATUS current DESCRIPTION "The UUID of the device used for the discovery protocol." ::= { hmMgmtDiscoveryCfgGroup 1 } hmMgmtDiscCfgProto OBJECT-TYPE SYNTAX INTEGER { none(1), bootp(2), dhcp(3) } MAX-ACCESS read-write STATUS current DESCRIPTION "The switch's network configuration protocol. The default value is dependent of the device type." ::= { hmMgmtDiscoveryCfgGroup 2 } hmMgmtDiscCfgIPAddrType OBJECT-TYPE SYNTAX InetAddressType MAX-ACCESS read-write STATUS current DESCRIPTION "Local IP address type." ::= { hmMgmtDiscoveryCfgGroup 3 } hmMgmtDiscCfgIPAddr OBJECT-TYPE SYNTAX InetAddress MAX-ACCESS read-write STATUS current DESCRIPTION "IP address of the management agent board. Changing this value will take effect after activating with hmMgmtDiscCfgAction." ::= { hmMgmtDiscoveryCfgGroup 4 } hmMgmtDiscCfgPrefLen OBJECT-TYPE SYNTAX InetAddressPrefixLength MAX-ACCESS read-write STATUS current DESCRIPTION "The length of the IP netmask." ::= { hmMgmtDiscoveryCfgGroup 5 } hmMgmtDiscCfgGwIPAddrType OBJECT-TYPE SYNTAX InetAddressType MAX-ACCESS read-write STATUS current DESCRIPTION "Default gateway IP address type." ::= { hmMgmtDiscoveryCfgGroup 6 } hmMgmtDiscCfgGwIPAddr OBJECT-TYPE SYNTAX InetAddress MAX-ACCESS read-write STATUS current DESCRIPTION "IP address of the default gateway. Changing this value will take effect after activating with hmMgmtDiscCfgAction." ::= { hmMgmtDiscoveryCfgGroup 7 } hmMgmtDiscCfgAction OBJECT-TYPE SYNTAX INTEGER { other (1), activate (2) } MAX-ACCESS read-write STATUS current DESCRIPTION "This object, when read, always returns a value of other(1). Setting the object to activate(2) causes a reconfiguration of the IP protocol stack." DEFVAL { other } ::= { hmMgmtDiscoveryCfgGroup 8 } hmMgmtDiscCfgBlinking OBJECT-TYPE SYNTAX INTEGER { enable(1), disable(2) } MAX-ACCESS read-write STATUS current DESCRIPTION "Enables/disables the HiDiscovery blinking sequence on this device. This object will not be saved." DEFVAL { disable } ::= { hmMgmtDiscoveryCfgGroup 9 } END [/code] |
Author: | jpa [ Sat Jul 29, 2017 7:24 am ] |
Post subject: | Re: add MIB for Switch |
Could you also post the contents of HIRSCHMANN-DISCOVERY-MGMT-MIB? |
Author: | caninfo [ Mon Jul 31, 2017 4:56 am ] |
Post subject: | Re: add MIB for Switch |
this is the content of the mib |
Author: | caninfo [ Mon Jul 31, 2017 6:14 pm ] |
Post subject: | Re: add MIB for Switch |
I have several MIB to add, can i do it myself ? |
Author: | jpa [ Wed Aug 02, 2017 6:35 am ] |
Post subject: | Re: add MIB for Switch |
It's open source so yes. It's not exactly non-developer friendly. The MIB you posted is dependent on another MIB for some of the details needed to get this to work. I searched and found various MIBs for Hirschmann (Vendor ID 248) switches that shows the info you would need. Quick info: snmp_audit in snmp_helper.php performs the snmp audit and it's a fairly long function. It tries the usual OIDs for info and also grabs the vendor ID and calls out to vendor specific snmp_helper scripts. So you can't just drop a MIB in a directory and you'd need more info that provided in that MIB to get OpenAudit to pull the data. Not sure where Mark will put this on the development list and I can't speak for Opmantek as I'm just another user. |
Author: | Mark [ Wed Aug 02, 2017 8:16 am ] |
Post subject: | Re: add MIB for Switch |
I'll add the attributes straight away - when we have the correct OIDs to query. As JPA said, this MIB doesn't provide them. Find me the MIB that does (even better - get me the OIDs), and I'll add them in 5 minutes. And if you ask really nice, I'll even provide you a patch so you don't need to wait for the next release |
Author: | caninfo [ Wed Aug 02, 2017 6:20 pm ] | ||
Post subject: | Re: add MIB for Switch | ||
I found two mib and I think that they are the good ones.. Well i hope so
|
Author: | Mark [ Wed Aug 09, 2017 12:21 pm ] | ||
Post subject: | Re: add MIB for Switch | ||
I haven't managed to get the serial sorted, but this file should at least tell you what the product model is. Put it into open-audit\code_igniter\application\helpers\snmp_248_helper.php (rename it from .txt).
|
Author: | caninfo [ Thu Aug 10, 2017 4:17 pm ] |
Post subject: | Re: add MIB for Switch |
Thank's Mark for your work, it works well. |
Page 1 of 1 | All times are UTC + 10 hours |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |