Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-3930

Add SFP status for MikroTik devices (SwitchOS)

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • None
    • Professional Edition
    • Default
    • None

    Description

      It's possible to add SFP status for MikroTik devices running on SwitchOS?
      On device config page this data is visible and some of it propagates to snmp.

      # snmpwalk -v2c -c *** -OeQUs -Ih -m MIKROTIK-MIB mt mtxrOpticalTableEntry
      mtxrOpticalName.6 = "P6 LINK DC"
      mtxrOpticalWavelength.6 = 155000
      mtxrOpticalTemperature.6 = 36
      mtxrOpticalSupplyVoltage.6 = 3260
      mtxrOpticalTxBiasCurrent.6 = 20

      Attachments

        1. Zrzut ekranu 2021-11-04 14.04.41.png
          Zrzut ekranu 2021-11-04 14.04.41.png
          13 kB
        2. Zrzut ekranu 2021-11-04 10.09.42.png
          Zrzut ekranu 2021-11-04 10.09.42.png
          16 kB
        3. Zrzut ekranu 2021-11-03 09.56.17.png
          Zrzut ekranu 2021-11-03 09.56.17.png
          17 kB
        4. mt-swos_before.png
          mt-swos_before.png
          93 kB
        5. mt-swos_after.png
          mt-swos_after.png
          129 kB
        6. mt-poller.txt
          80 kB
        7. mt-discovery.txt
          67 kB
        8. mt_port-sensors-poller.txt
          60 kB
        9. mt_port-sensors-poller_trunk.txt
          59 kB
        10. mikrotik.inc.php.diff
          3 kB
        11. Firefox - Observium - swos.avatar.observium.dev 2021-11-04 13.12.40.png
          Firefox - Observium - swos.avatar.observium.dev 2021-11-04 13.12.40.png
          78 kB

        Activity

          [OBS-3930] Add SFP status for MikroTik devices (SwitchOS)

          Ok. I change port names in meantime.
          Sorry for that

          prezeskk Krzysztof Kulesza added a comment - Ok. I change port names in meantime. Sorry for that
          landy Mike Stupalov added a comment - - edited

          Port associated by mtxrOpticalName -> ifDescr.
          As I see in your snmpdump, port have ifdescr 'P6 LINK DC', that why used such transform:

          IF-MIB::ifDescr.6 = STRING: P6 LINK DC
          IF-MIB::ifName.6 = STRING: P6 LINK DC
          MIKROTIK-MIB::mtxrOpticalName.6 = STRING: P6 LINK DC-5960
          

          landy Mike Stupalov added a comment - - edited Port associated by mtxrOpticalName -> ifDescr. As I see in your snmpdump, port have ifdescr 'P6 LINK DC', that why used such transform: IF-MIB::ifDescr.6 = STRING: P6 LINK DC IF-MIB::ifName.6 = STRING: P6 LINK DC MIKROTIK-MIB::mtxrOpticalName.6 = STRING: P6 LINK DC-5960

          I attache patch that working as expected
          mikrotik.inc.php.diff

          prezeskk Krzysztof Kulesza added a comment - I attache patch that working as expected mikrotik.inc.php.diff

          I update observium to trunk r11715 and nothing happend.
          After rename port name from DC-5960 to DC5960 (remove - delimiter) is working as expected.

          In discovery debug log (diff)
          Store in cache Table OID: MIKROTIK-MIB::mtxrOpticalTable
          -  String 'P6 LINK DC-5960' transformed by action [explode] to: 'P6 LINK DC'
          +  String 'P6 LINK DC5960' transformed by action [explode] to: 'P6 LINK DC5960'

          prezeskk Krzysztof Kulesza added a comment - I update observium to trunk r11715 and nothing happend. After rename port name from DC-5960 to DC5960 (remove - delimiter) is working as expected. In discovery debug log (diff) Store in cache Table OID: MIKROTIK-MIB::mtxrOpticalTable -  String 'P6 LINK DC-5960' transformed by action [explode] to: 'P6 LINK DC' +  String 'P6 LINK DC5960' transformed by action [explode] to: 'P6 LINK DC5960'

          I only copy changed files in r11715 to working copy of observium r11575.
          I update to latest version and check.
          Thanks for reply

           

          r11715 | mike | 2021-11-04 09:33:15 +0100 (Thu, 04 Nov 2021) | 2 lines
          Changed paths:
             M /observium/trunk/includes/definitions/mibs/mikrotik.inc.php
             M /observium/trunk/includes/definitions/os/mikrotik.inc.php

          prezeskk Krzysztof Kulesza added a comment - I only copy changed files in r11715 to working copy of observium r11575. I update to latest version and check. Thanks for reply   r11715 | mike | 2021-11-04 09:33:15 +0100 (Thu, 04 Nov 2021) | 2 lines Changed paths:    M /observium/trunk/includes/definitions/mibs/mikrotik.inc.php    M /observium/trunk/includes/definitions/os/mikrotik.inc.php

          It's should be already associated with port:

          Please attach discovery debug:

          ./discovery.php -d -m ports,sensors -h <device>
          

          landy Mike Stupalov added a comment - It's should be already associated with port: Please attach discovery debug: ./discovery.php -d -m ports,sensors -h <device>
          prezeskk Krzysztof Kulesza added a comment - - edited

          Thanks

          It's possible to group this data like other devices?
          In Port sensors

          prezeskk Krzysztof Kulesza added a comment - - edited Thanks It's possible to group this data like other devices? In Port sensors

          Improved in r11715.

          landy Mike Stupalov added a comment - Improved in r11715.

          General questions and device support you always can discuss in our Discord channel, click here for connect.


          Please make and attach additional information about the device:

          • full snmp dump from device:

            snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk
            snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk

            If device not support SNMP version 2c, replace -v2c with -v1.

          • If you have problems with discovery or poller processes, please do and attach these debugs:

            ./discovery.php -d -h <device>
            ./poller.php -d -h <device>

          • additionally attach device and/or vendor specific MIB files

          This comment is added automatically.

          bot Observium Bot added a comment - General questions and device support you always can discuss in our Discord channel, click here for connect . Please make and attach additional information about the device: full snmp dump from device: snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk If device not support SNMP version 2c, replace -v2c with -v1. If you have problems with discovery or poller processes, please do and attach these debugs: ./discovery.php -d -h <device> ./poller.php -d -h <device> additionally attach device and/or vendor specific MIB files This comment is added automatically.

          People

            landy Mike Stupalov
            prezeskk Krzysztof Kulesza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: