Ad Widget

Collapse

zero/zero not calcualting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anjiytwok
    Member
    • Dec 2012
    • 44

    #1

    zero/zero not calcualting

    Hi,

    I have created few calculated Iems.

    in that I have something like this.

    CALCULATED Itmes

    result = item1/Item2

    but errot it was showing that Division by zero. Cannot evaluate expression [0.000/0.000000]

    offcourse it 0/0 can't be divisible, But in this case for me expected result is '0' how can i make this work?



    how can i correct his? please advise.
    Last edited by anjiytwok; 12-04-2013, 22:43.
  • Heilig
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2013
    • 366

    #2
    Try something like this:
    result = item1/(Item2+0.0001)

    Comment

    • anjiytwok
      Member
      • Dec 2012
      • 44

      #3
      First I would like to thank for very quick respose.

      And I need one case.

      is there any way, if i get the 0.00/0.000 case I have to make this as 1.

      How can i do this?

      Item1/Item2=0/0 =1

      Comment

      • Heilig
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2013
        • 366

        #4
        Change the mathematical rules we are unlikely to succeed.
        Write a script that will perform the required mathematical operations, analyze the result (in the case of "0/0" is replaced by the "1") and send it to Zabbix (using external checks, user parameters or zabbix_sender).
        Last edited by Heilig; 16-04-2013, 21:41.

        Comment

        • anjiytwok
          Member
          • Dec 2012
          • 44

          #5
          Yes. I know that 0/0 cant be divisible and cant be 1

          but case it its demanding to visualize some data.


          okay, let me try using the (external checks) ..

          Comment

          Working...