Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Zabbix Discovery queries #104

Open
dd00f opened this issue May 16, 2017 · 0 comments
Open

Add support for Zabbix Discovery queries #104

dd00f opened this issue May 16, 2017 · 0 comments

Comments

@dd00f
Copy link
Contributor

dd00f commented May 16, 2017

DiscoveryQuery : Used to discover a list of JMX beans matching a specific naming pattern.
Used with the Zabbix server.

For example, the following discovery rule :

<discoveryQuery 
   objectName="java.lang:type=GarbageCollector,name=*" 
   attributes="name,type" 
   resultAlias="discovery[garbageCollector]" 
   collectIntervalInSeconds="300"/>

<query objectName="java.lang:type=GarbageCollector,name=*"
   attributes="CollectionTime,CollectionCount"
   resultAlias="discovery[GarbageCollector.%name%.#attribute#]" />

May yield the following discovery output (formatted for readability) :

{"data":[
  {"{#NAME}":"PS Scavenge","{#TYPE}":"GarbageCollector"},
  {"{#NAME}":"PS MarkSweep","{#TYPE}":"GarbageCollector"}
]}

On the Zabbix side, create a "Discovery Rule" of type "Zabbix trapper"
with a "Key" that matches the result alias. You can then create "Item prototypes" that use the values.

Sample Zabbix configuration that matches the example above :

Discovery rule :
Name : Discover Garbage Collectors
Key : discovery[garbageCollector]

Item Prototype
Name : Object {#TYPE} named {#NAME}
Key : discovery[{#TYPE}.{#NAME}.CollectionTime]

Item Prototype
Name : Object {#TYPE} named {#NAME}
Key : discovery[{#TYPE}.{#NAME}.CollectionCount]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant