Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

pyjmx-discovery

Based on https://github.com/RiotGamesMinions/zabbix_jmxdiscovery/.

I write this project for two reasons:

  1. I Don't know java to contribute with RiotGamesMinions project.
  2. I needed more customs macros to use in prototypes for LLD

Works with ActivemQ Artemis > 1.2.0. For HornetQ see hornetq branch

Requirements

jython

  • Tested on jython version 2.7
  • Minimal installation: core and mod

Usage

  • Set {$JMX_DISCOVERY_CONFIG} macro with the config.ini path file, on each host of the cluster(or on hostgroup).

    Example:

{$JMX_DISCOVERY_CONFIG} = /etc/zabbix/pyjmx-discovery.ini
  • Import the template file on zabbix server.
  • Move the artemis.conf to /etc/zabbix/zabbix_agent.d/ and restart the zabbix-agent service.
  • Link the "Template ActiveMQ Artemis" on each host of the Artemis cluster.

List of LLD discovery macros:

Macro Description
{#QUEUE_NAME} The name of the queue. (case sensitive)
{#CONS_THRESHOLD} Threshold for the minimum consumer connected.
{#QUEUE_MAX} Threshold for the maximum message queued.
{#QUEUE_MIN} Threshold for the minimum message queued.
{#ARTEMIS_BROKER} The name of artemis broker.
{#PROC_URL} For the urls on triggers. (This field started to support discovery macros on zabbix 3.0)
disable by default on template

Minimal configuration

[main]
host = localhost
port = 8100
search_query = org.apache.activemq.artemis:brokerName=*,module=JMS,name=*,serviceType=Queue,type=Broker

[DEFAULTS]
queue_max_messages = 5000
queue_min_messages = 0
consumers_threshold = 5000
proc_url = http://www.google.com.br

Output Format

{
	"data": [{
		"{#CONS_THRESHOLD}": "10",
		"{#QUEUE_MAX}": "5000",
		"{#QUEUE_MIN}": "0",
		"{#QUEUE_NAME}": "DLQ",
        "{#ARTEMIS_BROKER}": "localhost",
		"{#PROC_URL}": "http://www.google.com.br"
	}, {
		"{#CONS_THRESHOLD}": "10",
		"{#QUEUE_MAX}": "5000",
		"{#QUEUE_MIN}": "0",
		"{#QUEUE_NAME}": "ExampleQueue",
        "{#ARTEMIS_BROKER}": "localhost",
		"{#PROC_URL}": "http://www.google.com.br"
	}, {
		"{#CONS_THRESHOLD}": "10",
		"{#QUEUE_MAX}": "5000",
		"{#QUEUE_MIN}": "0",
		"{#QUEUE_NAME}": "ExpiryQueue",
        "{#ARTEMIS_BROKER}": "localhost",
		"{#PROC_URL}": "http://www.google.com.br"
	}]
}

About

No description, website, or topics provided.

Resources

Releases

No releases published

Languages

You can’t perform that action at this time.