Ad Widget

Collapse

Data Value Conversion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • penguin356
    Junior Member
    • Jan 2020
    • 6

    #1

    Data Value Conversion

    I am working with a Cisco SG500. I need to monitor the switch ports POE usage. I am able to get the amount of current being supplied by the port. The switch is reporting in milliawatts (i.e 1600, 1700, 1800 etc). My template looks like this:

    <name>Port 01 POE Usage</name>
    <type>4</type>
    <snmp_community>{$SNMP_COMMUNITY}</snmp_community>
    <multiplier>0</multiplier>
    <snmp_oid>1.3.6.1.4.1.9.6.1.101.108.1.1.5.1.1</snmp_oid>
    <key>1.3.6.1.4.1.9.6.1.101.108.1.1.5.1.1</key>
    <delay>30</delay>
    <history>90</history>
    <trends>365</trends>
    <status>0</status>
    <value_type>3</value_type>
    <allowed_hosts/>
    <units>Watts</units>
    <delta>0</delta>
    <snmpv3_contextname/>
    <snmpv3_securityname/>
    <snmpv3_securitylevel>0</snmpv3_securitylevel>
    <snmpv3_authprotocol>0</snmpv3_authprotocol>
    <snmpv3_authpassphrase/>
    <snmpv3_privprotocol>0</snmpv3_privprotocol>
    <snmpv3_privpassphrase/>
    <formula></formula>
    <delay_flex/>
    <params/>
    <ipmi_sensor/>
    <data_type>0</data_type>
    <authtype>0</authtype>
    <username/>
    <password/>
    <publickey/>
    <privatekey/>
    <port/>
    <description/>
    <inventory_link>0</inventory_link>
    <applications>
    <application>
    <name>PoE</name>
    </application>
    </applications>
    <valuemap/>
    <logtimefmt/>
    </item>

    Zabbix is reporting back to me that the port is supplying KiloWats (KW) of power. I have tried changing the units to mW instead of Watts. All that does is append mW in front of Watts (it looks like this mWKWatts). Does any know how to get Zabbix to covert the integer value returned by snmp_oid 1.3.6.1.4.1.9.6.1.101.108.1.1.5.1.1 to Watts (i.e. 1.7W instead of 1700)?

    Thanks!

    Last edited by penguin356; 08-01-2020, 17:10.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Hi, one way should be using a preprosessing multiplier of 0.001, and using float as the type information.

    Markku

    Comment

    • penguin356
      Junior Member
      • Jan 2020
      • 6

      #3
      As a newb to Zabbix, any "how to" to do what you are mentioning would be very much appreciated.

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        In the item configuration page there is a Preprosessing tab on top. There add a preprosessing step, select Custom multiplier.

        Markku

        Comment

        • penguin356
          Junior Member
          • Jan 2020
          • 6

          #5
          TY Markku!! I now have my POE Usage on the ports showing as Watts.

          Got another question...
          I am pulling the system temperature from my switch using SNMP OID 1.3.6.1.4.1.9.6.1.101.83.5.1.1.2.1. The system is returning the temperature in Celsius. I am trying to convert to Fahrenheit by using (C * 1.8 + 32). I have a custom multiplier (1.8) set on my item named SwitchTemperature. The custom multiplier is working perfectly.

          I have created another item named Temperature. This item is set to type calculated. The custom formula is this:

          (32+last("SwitchTemperature"))

          The item named Temperature is grayed out on the latest data page.
          Got any ideas on how to get the switch temperature to display on the latest data page in F?

          Comment

          • penguin356
            Junior Member
            • Jan 2020
            • 6

            #6
            I figured it out!!!
            preprosessing via a java srcipt: return (value * 1.8) + 32

            Comment

            Working...