Ad Widget

Collapse

[Calculated Items] Multiple level of escaping

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ckone35
    Junior Member
    • Aug 2013
    • 3

    #1

    [Calculated Items] Multiple level of escaping

    Hi Community,

    I'd like to use zabbix to monitor our CXF webservices. CXF expose performance mbeans, great !! The name of the mbeans looks like the following :

    Code:
    org.apache.cxf:bus.id=internal,type=Performance.Counter.Server,service="{http://service.internal.archetype.entreprise.com/}ContractInternalServiceService",port="ContractInternalServicePort",operation="createContract"
    I was able to successfully use the following item key to monitor our mbean.
    Code:
    jmx["org.apache.cxf:bus.id=internal,type=Performance.Counter.Server,service=\"{http://service.internal.archetype.entreprise.com/}ContractInternalServiceService\",port=\"ContractInternalServicePort\",operation=\"createContract\"",NumInvocations]
    As you can see the key is horrible. So I try to wrap the jmx item into a "Calculated Item" with the last function, using this kind of formula :
    Code:
    last("jmx[.....]",0)
    This is working when the jmx key is simple without double quote, but I can not get it to work with my example above ?

    Have you an idea ?

    My test : (escaping / and ")
    Code:
    last("jmx[\"org.apache.cxf:bus.id=internal,type=Performance.Counter.Server,service=\\\"{http://service.internal.archetype.entreprise/}ContractInternalServiceService\\\",port=\\\"ContractInternalServicePort\\\",operation=\\\"createContract\\\"\",NumInvocations]",0)
    Does the (calculated item + last function) is the best way to accomplish my need ? A problem with this solution is that the calculated item is still lagging behind the jmx...

    Thanks in advance
Working...