Skip to content
No description, website, or topics provided.
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Zabbix Generic Discovery


Zabbix Generic Discovery extends default zabbix discovery with use of API and external helper python application. Example (reference implementation) application that can be monitored with this application is WebSphere MQ (WMQ from now on).


Zabbix generic discovery will follow all item prototypes, trigger prototypes and graph prototypes with given logic and create copies with correct names for further secondary discovery reasons.


External requirements are:

  • pyzabbix python zabbix API implemented
  • requests "Requests is an Apache2 Licensed HTTP library, written in Python, for human beings."


Steps to be performed on zabbix server:

  • copy into /etc/zabbix/externalscripts (or what ever is set in your system as externalscripts location) as zabbix-generic-discovery (without .py extension)
  • create zabbix-generic.discovery.conf as this example (in same directory) :


; change this to production for example
server_type = test
zabbix_server = http://production.server.lan/zabbix
zapi_user = Admin
zapi_pass = hardcorepassword
zabbix_server = http://test.server.lan/zabbix
zapi_user = Admin
zapi_pass = zabbix

Example for WMQ monitoring (reference implementation):

scp wmq-monitoring.conf root@wmqserver:/etc/zabbix/zabbix-agentd.d/
ssh root@wmqserver -t visudo # look at example for it in wmq-monitoring.conf
ssh root@wmqserver mkdir /etc/zabbix/externalscripts
scp wmq-monitoring-exec root@wmqserver:/etc/zabbix/externalscripts
ssh root@wmqserver service zabbix-agentd restart

On zabbix frontend create host called "wmqserver" with normal system OS template and after importing wmq-monitoring.template.xml add just imported "Template WebSphere MQ" template to "wmqserver" server. After initial discovery new items will be created with special keys that should look something like: zabbix-generic-discovery[{HOST.HOST},WMQ_MANAGER_PLACEHOLDER,TESTMQMANAGER] Which will be disabled by default, so if you want it to be monitored enable it :-) After that all discovery rules will be copied and updated to real values (WMQ_MANAGER_PLACEHOLDER -> TESTMQMANAGER) so they should look like:


Again enable it and that is it graphs triggers and items should appear soon.


Current implementation of example WMQ monitoring is very unoptimized as everything is polled from zabbix server on each request. Future work will probably use trappers but for my use case this is sufficient and does not bother system too much (graphs on wmq machine do not show any significant raise of CPU Utilization).

More explanations how it works is in writing phase.


Apache 2.0

You can’t perform that action at this time.