Ad Widget

Collapse

How to filter discovered JMX objects based on the value of a property

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Carlosdlg
    Junior Member
    • Mar 2021
    • 2

    #1

    How to filter discovered JMX objects based on the value of a property

    Hello,

    I'm building a template to monitor Weblogic managed servers through JMX, but I need to create a discovery rule that only discovers instances of an object type (MBean) if the value of a property of the object matches a certain pattern.

    My discovery rule's key looks like this:
    Code:
    jmx.discovery[beans,"com.bea:ServerRuntime=ManagedServer01,Name=*http*,Type=ServerChannelRuntime"]
    And it correctly discovers ServerChannelRuntime instances whose name includes the *http* pattern. For each discovered object, I get data like these:

    Code:
    {
    "{#JMXDOMAIN}": "com.bea",
    "{#JMXTYPE}": "ServerChannelRuntime",
    "{#JMXOBJ}": "com.bea:ServerRuntime=ManagedServer01,Name=Default[http],Type=ServerChannelRuntime",
    "{#JMXNAME}": "Default[http]",
    "{#JMXSERVERRUNTIME}": "ManagedServer01"
    }
    These data is based on the MBean's metadata, or "self description", but I need to add a filter, or some other mechanism, that filters out objects whose "PublicURL" attribute does not match a certain pattern.

    Since for this rule I have item prototypes that correctly create items by using keys like this:
    Code:
    jmx[{#JMXOBJ},"PublicURL"]
    I thought I could create a filter using something like this as the macro:

    Code:
    JMX[{#JMXOBJ},"PUBLICURL"]
    But I get an error telling me "Incorrect filter condition macro for discovery rule "HttpChannel Discovery ManagedServer01". Just for clarity: I have no problem creating filters based on the object's metadata (what comes in the JSON returned by the discovery rule, shown above).

    How can I filter discovered JMX objects based on the value of an attribute?

    I'm using Zabbix 5.2.5 on Centos 8 (The latest Zabbix ovf appliance).

    Thanks!
    Last edited by Carlosdlg; 17-03-2021, 19:06.
  • Carlosdlg
    Junior Member
    • Mar 2021
    • 2

    #2
    Any pointers appreciated

    Comment

    Working...