How can I get MIBs list from a remote server by using PHP?

后端 未结 1 505
广开言路
广开言路 2020-12-07 06:11

I am working on a project that involves SNMP. Basically I need to construct MIB and OID tree in PHP.

I know that there are programs that do this already, but I am tr

相关标签:
1条回答
  • 2020-12-07 06:37

    If you just want a list of modules, see if your manager supports SNMPv2-MIB::sysORTable. This does not help you find the MIB files of course, but tells you what is supposed to be supported.

    Quoting specs, sysORTable is:

    "The (conceptual) table listing the capabilities of the local SNMP application acting as a command responder with respect to various MIB modules. SNMP entities having dynamically-configurable support of MIB modules will have a dynamically-varying number of conceptual rows."

    Here is what I get for a standard Linux host :

    snmptable -M +.  -m +ALL -v 2c -c public -Pu -Ci  <some ipaddr>  SNMPv2-MIB::sysORTable
    SNMP table: SNMPv2-MIB::sysORTable
    
     index                                        sysORID                                              sysORDescr  sysORUpTime
         1          SNMP-MPD-MIB::snmpMPDMIBObjects.3.1.1         The MIB for Message Processing and Dispatching. 0:0:00:00.30
         2       SNMP-USER-BASED-SM-MIB::usmMIBCompliance         The MIB for Message Processing and Dispatching. 0:0:00:00.30
         3 SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance                   The SNMP Management Architecture MIB. 0:0:00:00.30
         4                            SNMPv2-MIB::snmpMIB                      The MIB module for SNMPv2 entities 0:0:00:00.30
         5                                TCP-MIB::tcpMIB         The MIB module for managing TCP implementations 0:0:00:00.30
         6                                     IP-MIB::ip The MIB module for managing IP and ICMP implementations 0:0:00:00.30
         7                                UDP-MIB::udpMIB         The MIB module for managing UDP implementations 0:0:00:00.30
         8        SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup               View-based Access Control Model for SNMP. 0:0:00:00.30
    
    0 讨论(0)
提交回复
热议问题