Ad Widget

Collapse

Cisco - Entity MIB monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Noobz
    Senior Member
    • Jun 2020
    • 105

    #1

    Cisco - Entity MIB monitoring

    I have an ASR920 which uses:
    entity-MIB::entPhysicalDescr
    to label ALL sensors I want to monitor.

    It stores the values in:
    entity-sensor-mib::entPhySensorValue

    I have a simple discover rule which creates an item:
    "sensor value: {#SNMPVALUE}" - where SNMPVALUE is the entPhysicalDesc i.e "PEM Iout" or "subslot 0/0 transceiver 1 Tx Power Sensor"
    and the value is the entPhySensorValue


    The issue here is that there are all kinds of sensors here, so they need different units and different scales (multiplication) applied.

    I have 'overcome' this before by having a multitude of discovery rules walking the same entity tables over and over again with different filters, this seems horrendously inefficient.

    Can anyone offer any suggestions on how to streamline this process?
  • Noobz
    Senior Member
    • Jun 2020
    • 105

    #2
    Bump... Bueler?

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #3
      you can try using this in LLD
      The Override tab allows to set rules to modify the list of item, trigger, graph and host prototypes or their attributes for discovered objects that meet given criteria

      Comment


      • Noobz
        Noobz commented
        Editing a comment
        Thanks, I've found most of the solution to this now. I wasn't formatting the JSONPath correctly in the LLD macro, it required square brackets AND quotes.

        The current issue I'm on though is using a custom multiplier with a template macro.

        A returned value is 30000 - it needs to be 30.000
        The multiplier is held in an SNMP table entPhySensorPrecision, which for that index would be 3
        I have tried a whole bunch of variations of 1e-{#entphysensorprecision}, e-{#entphysensorprecision} - 10^-{#entphysensorprecision} and they aren't accepted.

        I can use the macro by itself, but as soon as it is integrated into an expression, it is taken as a string. Even simple multiplication like 10*{#macro} fail

        I assume I can get around this with value mapping 3 => 0.0001, 2=> 0.001 etc however I'm trying to avoid hard coding values as much as possible
    • Noobz
      Senior Member
      • Jun 2020
      • 105

      #4
      I ended up getting this done through a combination of LLD Macros, Javascript preprocessing, and unit blacklisting in the item prototype.

      I've raised a ticket for the macro not working in the custom multiplier, as the same expression works when using JS preprocessing instead of custom multiplier.

      Comment

      Working...