Ad Widget

Collapse

Problem with calculated item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • greedysoul
    Junior Member
    • Jul 2014
    • 10

    #1

    Problem with calculated item

    Hello, I have a calculated Item in a Tomcat template called Avg Processing Time and it fails to work (Zabbix 2.2.9, java-gateway running against Tomcat 7). I think it’s because the multiple quoting in the formula, since the individual keys are working but the division of sums of the points over 300 seconds fails to retrieve any data:

    Code:
    sum("jmx[\"Catalina:type=GlobalRequestProcessor,name=\"http-nio-8443\"\",\"processingTime\"]",300)/(sum("jmx[\"Catalina:type=GlobalRequestProcessor,name=\"http-nio-8443\"\",\"requestCount\"]",300)+0.001)
    The problem is that the items with a name containing non-alphanumeric characters need to be double-quoted to work, the bean request has another set of doublequotes around it, and the key has another set around that. How should the calculated item work, any ideas? It works fine BTW in earlier Tomcat versions which used a different naming convention that didn't require the quotes around the name value.
    Last edited by greedysoul; 27-05-2015, 13:37. Reason: fixed item
  • greedysoul
    Junior Member
    • Jul 2014
    • 10

    #2
    Bump! I'm still unable to fix this one
    I know the sum evaluation fails but I don't get it why:

    Code:
    Cannot evaluate function "sum(300)": item "delta33:jmx["Catalina:type=GlobalRequestProcessor,name="http-nio-8443"","

    Comment

    • greedysoul
      Junior Member
      • Jul 2014
      • 10

      #3
      I got it to work eventually, the formula just needed some extra backslashes around the name value

      sum("jmx[\"Catalina:type=GlobalRequestProcessor,name=\\"htt p-nio-8082\\"\",\"processingTime\"]",300)/(sum("jmx[\"Catalina:type=GlobalRequestProcessor,name=\\"htt p-nio-8082\\"\",\"requestCount\"]",300)+0.001)

      Comment

      Working...