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:
And it correctly discovers ServerChannelRuntime instances whose name includes the *http* pattern. For each discovered object, I get data like these:
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:
I thought I could create a filter using something like this as the macro:
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!
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"]
Code:
{
"{#JMXDOMAIN}": "com.bea",
"{#JMXTYPE}": "ServerChannelRuntime",
"{#JMXOBJ}": "com.bea:ServerRuntime=ManagedServer01,Name=Default[http],Type=ServerChannelRuntime",
"{#JMXNAME}": "Default[http]",
"{#JMXSERVERRUNTIME}": "ManagedServer01"
}
Since for this rule I have item prototypes that correctly create items by using keys like this:
Code:
jmx[{#JMXOBJ},"PublicURL"]
Code:
JMX[{#JMXOBJ},"PUBLICURL"]
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!
Comment