1
0
Fork 0
forked from infra/ansible

Zabbix: Allow for different mailq thresholds using macros

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
Greg Sutcliffe 2025-10-03 11:24:32 +01:00
commit de1a667f82
Signed by: gwmngilfen
SSH key fingerprint: SHA256:dNHcz65ApR68w2TkCIAXDBdt4oNL62Fyx48U7dXWuk0
3 changed files with 28 additions and 8 deletions

View file

@ -63,6 +63,11 @@ primary_auth_source: ipa
#
tcp_ports: [22, 1194]
udp_ports: [1194]
zabbix_macros:
# We don't care *too much* about mail here
POSTFIX.QUEUE.WARN: 10000
POSTFIX.QUEUE.AVG: 15000
POSTFIX.QUEUE.CRIT: 20000
notes: |
SSH proxy to access infrastructure not exposed to the web

View file

@ -24,3 +24,8 @@ primary_auth_source: ipa
# the host_vars/$hostname file
tcp_ports: [25]
vpn: true
zabbix_macros:
# We don't care *too much* about mail here
POSTFIX.QUEUE.WARN: 100
POSTFIX.QUEUE.AVG: 150
POSTFIX.QUEUE.CRIT: 200

View file

@ -21,33 +21,33 @@ zabbix_export:
value: queue
triggers:
- uuid: 2400e9f5e5174ae7a3cc1ced083f8431
expression: 'last(/Postfix Mail Queue/postfix.queue)>=2'
expression: 'last(/Postfix Mail Queue/postfix.queue)>={$POSTFIX.QUEUE.WARN}'
name: 'Postfix: potential stuck mails in mailq'
event_name: 'Postfix: potential stuck mails in mailq (2 mails in queue)'
event_name: 'Postfix: potential stuck mails in mailq
opdata: '{ITEM.LASTVALUE1} mails queued'
priority: WARNING
dependencies:
- name: 'Postfix: potential stuck mails in mailq'
expression: 'last(/Postfix Mail Queue/postfix.queue)>=5'
expression: 'last(/Postfix Mail Queue/postfix.queue)>={$POSTFIX.QUEUE.AVG}'
tags:
- tag: postfix
value: problem
- uuid: c8b44a6ad0e347a58ea8e51b20fedd82
expression: 'last(/Postfix Mail Queue/postfix.queue)>=5'
expression: 'last(/Postfix Mail Queue/postfix.queue)>={$POSTFIX.QUEUE.AVG}'
name: 'Postfix: potential stuck mails in mailq'
event_name: 'Postfix: potential stuck mails in mailq (5 mails in queue)'
event_name: 'Postfix: potential stuck mails in mailq (2nd warning)'
opdata: '{ITEM.LASTVALUE1} mails queued'
priority: AVERAGE
dependencies:
- name: 'Postfix: stuck mails in mailq'
expression: 'last(/Postfix Mail Queue/postfix.queue)>=10'
expression: 'last(/Postfix Mail Queue/postfix.queue)>={$POSTFIX.QUEUE.CRIT}'
tags:
- tag: postfix
value: problem
- uuid: 7b8e21a4900242edaca5be4e1c5b573e
expression: 'last(/Postfix Mail Queue/postfix.queue)>=10'
expression: 'last(/Postfix Mail Queue/postfix.queue)>={$POSTFIX.QUEUE.CRIT}'
name: 'Postfix: stuck mails in mailq'
event_name: 'Postfix: stuck mails in mailq (10+ mails in queue)'
event_name: 'Postfix: stuck mails in mailq (3rd warning)'
opdata: '{ITEM.LASTVALUE1} mails queued'
priority: HIGH
tags:
@ -55,3 +55,13 @@ zabbix_export:
value: problem
tags:
- tag: postfix
macros:
- macro: '{$POSTFIX.QUEUE.WARN}'
value: '2'
description: 'Warning-severity level for Postfix queue'
- macro: '{$POSTFIX.QUEUE.AVG}'
value: '5'
description: 'Average-severity level for Postfix queue'
- macro: '{$POSTFIX.QUEUE.CRIT}'
value: '10'
description: 'Critical-severity level for Postfix queue'