Ad Widget

Collapse

Change the Display format / Type an Item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Afateminejad
    Junior Member
    • Feb 2023
    • 15

    #1

    Change the Display format / Type an Item

    Hello everybody

    I have a unify switch us8-150W.
    CPU utilization OID is : .1.3.6.1.4.1.4413.1.1.1.1.4.9.0
    format out put is: = STRING:" 5 Secs (10.2538%) 60 Secs (9.3518%) 300 Secs (9.1566%)"

    Therefor, we must select information type as text.
    Is there a way to display the output as a single number?

    With Thank
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Probably some type of item value preprocessing or make 3 dependent items, again with preprocessing, referring to the current item. Regex will probably work, but it's not fun :-) https://www.zabbix.com/documentation.../preprocessing or https://www.zabbix.com/documentation...ependent_items

    Comment

    • Afateminejad
      Junior Member
      • Feb 2023
      • 15

      #3
      Problem solved.
      In this way, I wrote two pieces of JavaScript code in the preprocessing section.
      At first, It extracted one of the desired numbers (as CPU utilization) from the string and then converted it into a number and finally displayed it as the final output.

      Thanks for your Guidance

      Comment

      Working...