1
0
Fork 0
forked from infra/ansible

Update the RabbitMQ cluster monitoring on staging

- split off the template into a node template and a cluster template
  (that only needs to be instanciated on one node)
- add certificate expiration monitoring in the cluster template

This is only on staging for now.

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2026-06-19 13:37:35 +02:00
commit f550f61788
Signed by untrusted user: abompard
GPG key ID: 31584CFEB9BF64AD
4 changed files with 1714 additions and 2 deletions

View file

@ -0,0 +1,694 @@
zabbix_export:
version: '7.0'
template_groups:
- uuid: a333cbd6a3ad44baaa4eee4b0c0b1bec
name: Fedora
templates:
- uuid: 3287cd090d2b4255890721074718d703
template: 'RabbitMQ Cluster'
name: 'RabbitMQ Cluster'
description: |
This template is developed to monitor the messaging broker RabbitMQ cluster by Zabbix.
Most of the queue metrics are collected in one go, thanks to Zabbix bulk data collection.
The template collects queue metrics by running the get_queues script on the Zabbix agent.
The certificate expiration data is collected using the HTTP-accessible expiration JSON file, that a script on batcave produces.
groups:
- name: Fedora
items:
- uuid: 49401dc3832d406fbd89352f0ecf8eca
name: 'Get queues'
type: ZABBIX_ACTIVE
key: rabbitmq.get_queues
history: 1h
value_type: TEXT
trends: '0'
description: 'The agent script that returns the queues metrics.'
preprocessing:
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1h
tags:
- tag: application
value: rabbitmq
- tag: component
value: raw
discovery_rules:
- uuid: d6d757c90d0b41caae115aa47117ebe2
name: 'Certificates discovery'
type: HTTP_AGENT
key: rabbitmq.certificates.discovery
delay: 1h
item_prototypes:
- uuid: 76c08faa10f2435e89518ac219866cd2
name: 'Certificates: expiration date for {#CERTNAME}'
type: CALCULATED
key: 'rabbitmq.certificates.expiration[{#CERTNAME}]'
delay: 1h
history: 2h
trends: '0'
units: unixtime
params: '{#EXPIRATION}'
preprocessing:
- type: JAVASCRIPT
parameters:
- 'return Date.parse(value) / 1000'
trigger_prototypes:
- uuid: 11ceaeb6daeb4864bf6dc76647b37e45
expression: '(last(/RabbitMQ Cluster/rabbitmq.certificates.expiration[{#CERTNAME}]) - now()) < ({$RABBITMQ.CERT.EXPIRATION.HIGH} * 86400)'
name: 'RabbitMQ Certificate: expiration of {#CERTNAME} is on {#EXPIRATION}'
priority: HIGH
tags:
- tag: contact
value: '{#CONTACT}'
- tag: fedora_group
value: '{#ORG_GROUP}'
- uuid: 5bedd09b12bc415fbfe6d96e84031078
expression: '(last(/RabbitMQ Cluster/rabbitmq.certificates.expiration[{#CERTNAME}]) - now()) < ({$RABBITMQ.CERT.EXPIRATION.WARN} * 86400)'
name: 'RabbitMQ Certificate: expiration of {#CERTNAME} is on {#EXPIRATION}'
priority: WARNING
tags:
- tag: contact
value: '{#CONTACT}'
- tag: fedora_group
value: '{#ORG_GROUP}'
url: 'https://infrastructure.fedoraproject.org/infra/rabbitmq-certs/staging/expiration.json'
- uuid: 3601184cd0cd428b9b94a2a660ecf925
name: 'Queues discovery'
type: DEPENDENT
key: rabbitmq.queues.discovery
delay: '0'
filter:
evaltype: AND
conditions:
- macro: '{#NODE}'
value: '{$RABBITMQ.CLUSTER.NAME}@{HOST.NAME}'
formulaid: A
- macro: '{#QUEUE}'
value: '{$RABBITMQ.LLD.FILTER.QUEUE.MATCHES}'
formulaid: B
- macro: '{#QUEUE}'
value: '{$RABBITMQ.LLD.FILTER.QUEUE.NOT_MATCHES}'
operator: NOT_MATCHES_REGEX
formulaid: C
description: 'The metrics for an individual queue.'
item_prototypes:
- uuid: bb68abd5db1c47ca83e674430bbf4dbd
name: 'Queue [{#VHOST}][{#QUEUE}]: Get data'
type: DEPENDENT
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
delay: '0'
history: '0'
value_type: TEXT
trends: '0'
description: 'The HTTP API endpoint that returns [{#VHOST}][{#QUEUE}] queue metrics'
preprocessing:
- type: JSONPATH
parameters:
- '$[?(@.name == "{#QUEUE}" && @.vhost == "{#VHOST}")].first()'
master_item:
key: rabbitmq.get_queues
tags:
- tag: application
value: rabbitmq
- tag: component
value: raw
- uuid: ba309535119c4a38896e1f8c9cc33602
name: 'Queue [{#VHOST}][{#QUEUE}]: Consumers'
type: DEPENDENT
key: 'rabbitmq.queue.consumers["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The number of consumers.'
preprocessing:
- type: JSONPATH
parameters:
- $.consumers
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: consumers
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 7c18e85bb64445aa96129ea9d405d8f5
name: 'Queue [{#VHOST}][{#QUEUE}]: Memory'
type: DEPENDENT
key: 'rabbitmq.queue.memory["{#VHOST}/{#QUEUE}"]'
delay: '0'
units: B
description: 'The bytes of memory consumed by the Erlang process associated with the queue, including stack, heap and internal structures.'
preprocessing:
- type: JSONPATH
parameters:
- $.memory
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: memory
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: bee87565b48b447dad43b9b2b6dd40f7
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages acknowledged per second'
type: DEPENDENT
key: 'rabbitmq.queue.messages.ack.rate["{#VHOST}/{#QUEUE}"]'
delay: '0'
value_type: FLOAT
description: 'The number of messages (per second) delivered to clients and acknowledged.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.ack_details.rate
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: e145ea6a63384bf6a4081f2c492dd8f0
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages acknowledged'
type: DEPENDENT
key: 'rabbitmq.queue.messages.ack["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The number of messages delivered to clients and acknowledged.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.ack
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 3c563fa5be614656bdd15f4780401cc9
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages delivered per second'
type: DEPENDENT
key: 'rabbitmq.queue.messages.deliver.rate["{#VHOST}/{#QUEUE}"]'
delay: '0'
value_type: FLOAT
description: 'The count of messages (per second) delivered to consumers in acknowledgement mode.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.deliver_details.rate
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: c3c69f96e0ad4778aba9aa700b598fd4
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages delivered'
type: DEPENDENT
key: 'rabbitmq.queue.messages.deliver["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The count of messages delivered to consumers in acknowledgement mode.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.deliver
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: ae0d0f1cc1cc4fe8ba578f68e7d726e2
name: 'Queue [{#VHOST}][{#QUEUE}]: Sum of messages delivered per second'
type: DEPENDENT
key: 'rabbitmq.queue.messages.deliver_get.rate["{#VHOST}/{#QUEUE}"]'
delay: '0'
value_type: FLOAT
description: 'The rate of delivery per second. The sum of messages delivered (per second) to consumers: in acknowledgement mode and in no-acknowledgement mode; delivered to consumers in response to `basic.get`: in acknowledgement mode and in no-acknowledgement mode.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.deliver_get_details.rate
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: e56aec97701548c58842cc1068e827c6
name: 'Queue [{#VHOST}][{#QUEUE}]: Sum of messages delivered'
type: DEPENDENT
key: 'rabbitmq.queue.messages.deliver_get["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The sum of messages delivered to consumers: in acknowledgement mode and in no-acknowledgement mode; delivered to consumers in response to the `basic.get`: in acknowledgement mode and in no-acknowledgement mode.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.deliver_get
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 46d8607c06d7467c8783cc6945d592bb
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages published per second'
type: DEPENDENT
key: 'rabbitmq.queue.messages.publish.rate["{#VHOST}/{#QUEUE}"]'
delay: '0'
value_type: FLOAT
description: 'The rate of published messages per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.publish_details.rate
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 8eae1f87c27c4490906843deac00ecaf
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages published'
type: DEPENDENT
key: 'rabbitmq.queue.messages.publish["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The count of published messages.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.publish
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 84647b4690254e7baa318fa90429eced
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages per second'
type: DEPENDENT
key: 'rabbitmq.queue.messages.rate["{#VHOST}/{#QUEUE}"]'
delay: '0'
value_type: FLOAT
description: 'The count of total messages per second in the queue.'
preprocessing:
- type: JSONPATH
parameters:
- $.messages_details.rate
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 618d16d6a87446f79cec1b2639d65bba
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages redelivered per second'
type: DEPENDENT
key: 'rabbitmq.queue.messages.redeliver.rate["{#VHOST}/{#QUEUE}"]'
delay: '0'
value_type: FLOAT
description: 'The rate of messages redelivered per second.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.redeliver_details.rate
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 93359cf3057b4875b1fcc3008d7178be
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages redelivered'
type: DEPENDENT
key: 'rabbitmq.queue.messages.redeliver["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The count of subset of messages in the `deliver_get` queue with the `redelivered` flag set.'
preprocessing:
- type: JSONPATH
parameters:
- $.message_stats.redeliver
error_handler: CUSTOM_VALUE
error_handler_params: '0'
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 448656f7e5b54cd2880202c89321c79f
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages total'
type: DEPENDENT
key: 'rabbitmq.queue.messages["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The count of total messages in the queue.'
preprocessing:
- type: JSONPATH
parameters:
- $.messages
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
trigger_prototypes:
- uuid: 07445c0786674dd78642412e99e063df
expression: 'min(/RabbitMQ Cluster/rabbitmq.queue.messages["{#VHOST}/{#QUEUE}"],5m)>{$RABBITMQ.MESSAGES.MAX.HIGH:"{#QUEUE}"}'
name: 'RabbitMQ node: Too many messages in queue [{#VHOST}][{#QUEUE}]'
event_name: 'RabbitMQ node: Too many messages in queue [{#VHOST}][{#QUEUE}] (over {$RABBITMQ.MESSAGES.MAX.HIGH:"{#QUEUE}"} for 5m)'
opdata: 'Current value: {ITEM.LASTVALUE1}'
priority: HIGH
tags:
- tag: scope
value: performance
- uuid: ccbe86d9b6ae496ea00f6cd6fdb4299f
expression: 'min(/RabbitMQ Cluster/rabbitmq.queue.messages["{#VHOST}/{#QUEUE}"],5m)>{$RABBITMQ.MESSAGES.MAX.WARN:"{#QUEUE}"}'
name: 'RabbitMQ node: Too many messages in queue [{#VHOST}][{#QUEUE}]'
event_name: 'RabbitMQ node: Too many messages in queue [{#VHOST}][{#QUEUE}] (over {$RABBITMQ.MESSAGES.MAX.WARN:"{#QUEUE}"} for 5m)'
opdata: 'Current value: {ITEM.LASTVALUE1}'
priority: WARNING
tags:
- tag: scope
value: performance
- uuid: 0f670ddb1407450995e7a71f5f6f05b9
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages ready per second'
type: DEPENDENT
key: 'rabbitmq.queue.messages_ready.rate["{#VHOST}/{#QUEUE}"]'
delay: '0'
value_type: FLOAT
description: 'The number of messages per second ready to be delivered to clients.'
preprocessing:
- type: JSONPATH
parameters:
- $.messages_ready_details.rate
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 40cd9a662e51422b99ed8ff3777b0063
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages ready'
type: DEPENDENT
key: 'rabbitmq.queue.messages_ready["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The number of messages ready to be delivered to clients.'
preprocessing:
- type: JSONPATH
parameters:
- $.messages_ready
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: 3b57a1f79b4e444e98065d61fb51c0e3
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages unacknowledged per second'
type: DEPENDENT
key: 'rabbitmq.queue.messages_unacknowledged.rate["{#VHOST}/{#QUEUE}"]'
delay: '0'
value_type: FLOAT
description: 'The number of messages per second delivered to clients but not yet acknowledged.'
preprocessing:
- type: JSONPATH
parameters:
- $.messages_unacknowledged_details.rate
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
- uuid: c4158815d3704af3b2da50c73fe48745
name: 'Queue [{#VHOST}][{#QUEUE}]: Messages unacknowledged'
type: DEPENDENT
key: 'rabbitmq.queue.messages_unacknowledged["{#VHOST}/{#QUEUE}"]'
delay: '0'
description: 'The number of messages delivered to clients but not yet acknowledged.'
preprocessing:
- type: JSONPATH
parameters:
- $.messages_unacknowledged
master_item:
key: 'rabbitmq.get_exchanges["{#VHOST}/{#QUEUE}"]'
tags:
- tag: application
value: rabbitmq
- tag: component
value: messages
- tag: queue
value: '{#QUEUE}'
- tag: vhost
value: '{#VHOST}'
graph_prototypes:
- uuid: f884c169929a444b9b708f20f54c96af
name: 'RabbitMQ: Queue [{#VHOST}][{#QUEUE}]: Messages per second'
graph_items:
- color: 199C0D
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.rate["{#VHOST}/{#QUEUE}"]'
- sortorder: '1'
color: F63100
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.ack.rate["{#VHOST}/{#QUEUE}"]'
- sortorder: '2'
color: 00611C
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.deliver.rate["{#VHOST}/{#QUEUE}"]'
- sortorder: '3'
color: F7941D
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.deliver_get.rate["{#VHOST}/{#QUEUE}"]'
- sortorder: '4'
color: FC6EA3
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.publish.rate["{#VHOST}/{#QUEUE}"]'
- sortorder: '5'
color: 6C59DC
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages_ready.rate["{#VHOST}/{#QUEUE}"]'
- sortorder: '6'
color: C7A72D
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.redeliver.rate["{#VHOST}/{#QUEUE}"]'
- sortorder: '7'
color: BA2A5D
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages_unacknowledged.rate["{#VHOST}/{#QUEUE}"]'
- uuid: 2bbe5839dc864fddb74e5c011db4eb4a
name: 'RabbitMQ: Queue [{#VHOST}][{#QUEUE}]: Messages status'
graph_items:
- color: 199C0D
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages["{#VHOST}/{#QUEUE}"]'
- sortorder: '1'
color: F63100
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.ack["{#VHOST}/{#QUEUE}"]'
- sortorder: '2'
color: 00611C
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.deliver["{#VHOST}/{#QUEUE}"]'
- sortorder: '3'
color: F7941D
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.deliver_get["{#VHOST}/{#QUEUE}"]'
- sortorder: '4'
color: FC6EA3
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.publish["{#VHOST}/{#QUEUE}"]'
- sortorder: '5'
color: 6C59DC
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages_ready["{#VHOST}/{#QUEUE}"]'
- sortorder: '6'
color: C7A72D
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages.redeliver["{#VHOST}/{#QUEUE}"]'
- sortorder: '7'
color: BA2A5D
item:
host: 'RabbitMQ Cluster'
key: 'rabbitmq.queue.messages_unacknowledged["{#VHOST}/{#QUEUE}"]'
master_item:
key: rabbitmq.get_queues
lld_macro_paths:
- lld_macro: '{#NODE}'
path: $.node
- lld_macro: '{#QUEUE}'
path: $.name
- lld_macro: '{#VHOST}'
path: $.vhost
preprocessing:
- type: JAVASCRIPT
parameters:
- 'return JSON.stringify(JSON.parse(value),[''node'',''name'',''vhost'']);'
- type: DISCARD_UNCHANGED_HEARTBEAT
parameters:
- 1h
tags:
- tag: class
value: software
- tag: target
value: rabbitmq
macros:
- macro: '{$RABBITMQ.CERT.EXPIRATION.HIGH}'
value: '7'
description: 'Number of days before alerting at high level that a certificate will expire'
- macro: '{$RABBITMQ.CERT.EXPIRATION.WARN}'
value: '30'
description: 'Number of days before warning a certificate will expire'
- macro: '{$RABBITMQ.CLUSTER.NAME}'
value: rabbit
description: 'The name of the RabbitMQ cluster.'
- macro: '{$RABBITMQ.LLD.FILTER.QUEUE.MATCHES}'
value: '.*'
description: 'This macro is used in the discovery of queues. It can be overridden at host level or its linked template level.'
- macro: '{$RABBITMQ.LLD.FILTER.QUEUE.NOT_MATCHES}'
value: CHANGE_IF_NEEDED
description: 'This macro is used in the discovery of queues. It can be overridden at host level or its linked template level.'
- macro: '{$RABBITMQ.MESSAGES.MAX.HIGH}'
value: '2000'
description: 'The maximum number of messages in the queue for a Matrix alert.'
- macro: '{$RABBITMQ.MESSAGES.MAX.WARN}'
value: '1000'
description: 'The maximum number of messages in the queue for a trigger expression.'
valuemaps:
- uuid: 7a1d687ee23040168abd208a5f4d6663
name: 'Alarm state'
mappings:
- value: '0'
newvalue: Ok
- value: '1'
newvalue: Alarm
- uuid: 332a2293bba04080b6ebd4bd74cc4b4e
name: 'RabbitMQ healthcheck'
mappings:
- value: '0'
newvalue: Failed
- value: '1'
newvalue: Ok
- value: '2'
newvalue: Error
- uuid: 961c095642cc418ab3b3e78e836ea143
name: 'Service state'
mappings:
- value: '0'
newvalue: Down
- value: '1'
newvalue: Up

File diff suppressed because it is too large Load diff

View file

@ -60,10 +60,15 @@
- rabbitmq_cluster
- zabbix_api
block:
- name: Import RabbitMQ template file
- name: Import RabbitMQ node template file
community.zabbix.zabbix_template:
template_yaml: "{{ lookup('file', 'zabbix/template-rabbitmq.yml') }}"
template_yaml: "{{ lookup('file', 'zabbix/template-rabbitmq-node' + env_suffix + '.yml') }}"
state: present
- name: Import RabbitMQ cluster template file
community.zabbix.zabbix_template:
template_yaml: "{{ lookup('file', 'zabbix/template-rabbitmq-cluster.yml') }}"
state: present
when: "env == 'staging'"
- name: Ensure RabbitMQ hostgroup is present
community.zabbix.zabbix_group:
host_groups: