Ad Widget

Collapse

how do I get IP address contained within the OID

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gregtompkins
    Junior Member
    • Sep 2011
    • 23

    #1

    how do I get IP address contained within the OID

    Hello,

    I have routers and IP addresses are stored in the OID. For example:

    [root@server1 ~]# snmpwalk -Os -cpublic -v2c 192.168.1.1 ipAdEntIfIndex
    ipAdEntIfIndex.11.22.33.144 = INTEGER: 2
    ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
    ipAdEntIfIndex.192.168.1.1 = INTEGER: 3
    ipAdEntIfIndex.192.168.11.1 = INTEGER: 4

    I set up the Item like in the attachment but it comes back "Not Supported"

    What am I doing incorrectly?

    Thank You!
    Last edited by gregtompkins; 10-12-2013, 09:13.
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    Try to change "Type of information" from Character to Text
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • Pada
      Senior Member
      • Apr 2012
      • 236

      #3
      Originally posted by jan.garaj
      Try to change "Type of information" from Character to Text
      I'm pretty sure that won't fix it.

      @gregtompkins:
      You'll have to find an OID or OID tree, where it has the IP address as the value and not part of the OID. I've never seen the IP address encoded into the OID before...

      I suppose you can always write a script that performs an SNMPWALK and then performs some operation with grep/awk/sed to obtain just the IP address from the OID.

      Comment

      • jan.garaj
        Senior Member
        Zabbix Certified Specialist
        • Jan 2010
        • 506

        #4
        Do you have any error? See: list of items (=host items), column error, popup message on error icon.
        Did you wait after update of "Type of information" - default refresh time for unsupported items is 600sec. Or you can try disable/enable item after update.
        Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
        My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

        Comment

        • gregtompkins
          Junior Member
          • Sep 2011
          • 23

          #5
          Yes, I got an error.... I changed it to "Text" the last part of the OID contains the IP addresses of the interfaces and the value = 1,2,3,4 corresponds with the Interface lo, eth0, eth1, eth2. I know, it would be "easy" if it was OID = IP address but in my case it's OID.IPADDRESS = interface #x

          # snmpwalk -Os -cpublic -v2c 192.168.1.1 ifDescr
          ifDescr.1 = STRING: lo
          ifDescr.2 = STRING: eth0
          ifDescr.3 = STRING: eth1
          ifDescr.4 = STRING: eth2

          # snmpwalk -Os -cpublic -v2c 192.168.1.1 IF-MIB::ifAlias
          ifAlias.1 = STRING: lo
          ifAlias.2 = STRING: WAN
          ifAlias.3 = STRING: LAN
          ifAlias.4 = STRING: DMZ

          # snmpwalk -Os -cpublic -v2c 192.168.1.1 ipAdEntAddr
          ipAdEntAddr.11.22.33.44 = IpAddress: 11.22.33.44
          ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1
          ipAdEntAddr.192.168.1.1 = IpAddress: 192.168.1.1
          ipAdEntAddr.192.168.11.1 = IpAddress: 192.168.11.1

          # snmpwalk -Os -cpublic -v2c 192.168.1.1 ipAdEntIfIndex
          ipAdEntIfIndex.11.22.33.44 = INTEGER: 2
          ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
          ipAdEntIfIndex.192.168.1.1 = INTEGER: 3
          ipAdEntIfIndex.192.168.11.1 = INTEGER: 4

          Comment

          Working...