forked from infra/ansible
Zabbix: fixes infra/tickets#12992 - add IPA backup monitoring
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This commit is contained in:
parent
daf6c8871e
commit
01ab35531a
3 changed files with 51 additions and 1 deletions
1
roles/ipa/server/files/zabbix/agent-ipa-backup.conf
Normal file
1
roles/ipa/server/files/zabbix/agent-ipa-backup.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
UserParameter=ipa.backup.age,find "/var/lib/ipa/backup/" -maxdepth 1 -type d -printf '%T@ %p\n' | sort -rn | head -1 | awk '{print int($1)}'
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
zabbix_export:
|
||||
version: '7.0'
|
||||
template_groups:
|
||||
- uuid: 372f19ba622745aaa43b4fa0b5168262
|
||||
- uuid: a333cbd6a3ad44baaa4eee4b0c0b1bec
|
||||
name: Fedora
|
||||
templates:
|
||||
- uuid: 53c9d098429a4ee7bdacbee414494f8b
|
||||
|
|
@ -10,6 +10,27 @@ zabbix_export:
|
|||
groups:
|
||||
- name: Fedora
|
||||
items:
|
||||
- uuid: 0aad17a172924c3384ff50742b15e53a
|
||||
name: 'IPA Backup Age'
|
||||
type: ZABBIX_ACTIVE
|
||||
key: ipa.backup.age
|
||||
delay: 1h
|
||||
units: unixtime
|
||||
preprocessing:
|
||||
- type: DISCARD_UNCHANGED_HEARTBEAT
|
||||
parameters:
|
||||
- 12h
|
||||
tags:
|
||||
- tag: component
|
||||
value: ipa
|
||||
- tag: type
|
||||
value: backup
|
||||
triggers:
|
||||
- uuid: b1b2653b6f8e461f9dcfa58a3df35f6e
|
||||
expression: 'now() - last(/IPA Monitoring/ipa.backup.age) > 26*60*60'
|
||||
name: 'IPA Backups out of date'
|
||||
opdata: 'Last IPA backup: {ITEM.LASTVALUE}'
|
||||
priority: HIGH
|
||||
- uuid: b6f2575965414e9b8a50e7e2a2aec586
|
||||
name: 'http-ipa-internal check'
|
||||
type: ZABBIX_ACTIVE
|
||||
|
|
@ -17,6 +38,11 @@ zabbix_export:
|
|||
value_type: CHAR
|
||||
trends: '0'
|
||||
timeout: 5s
|
||||
tags:
|
||||
- tag: component
|
||||
value: ipa
|
||||
- tag: type
|
||||
value: availability
|
||||
triggers:
|
||||
- uuid: 5a3acfcf5a5a4e32b15884ec8156c59a
|
||||
expression: 'last(/IPA Monitoring/web.page.regexp[localhost,/ipa/ui/,80,Identity Management])<>"Identity Management"'
|
||||
|
|
|
|||
|
|
@ -762,6 +762,18 @@
|
|||
- ipa/server
|
||||
- config
|
||||
|
||||
# This has group=zabbix so that the monitoring can check the backups ran
|
||||
- name: Create IPA backup directory
|
||||
ansible.builtin.file:
|
||||
path: /var/lib/ipa/backup
|
||||
state: directory
|
||||
owner: root
|
||||
group: zabbix
|
||||
mode: "0750"
|
||||
tags:
|
||||
- ipa/server
|
||||
- config
|
||||
|
||||
- name: Copy sweeper script to /usr/local/bin/
|
||||
ansible.builtin.copy:
|
||||
src: sweeper.py
|
||||
|
|
@ -783,6 +795,17 @@
|
|||
- config
|
||||
|
||||
# Zabbix monitoring of the internal IPA server
|
||||
- name: Install Zabbix agent config drop-in
|
||||
ansible.builtin.copy:
|
||||
src: zabbix/agent-ipa-backup.conf
|
||||
dest: /etc/zabbix/zabbix_agentd.d/ipa-backup.conf
|
||||
mode: '0644'
|
||||
notify:
|
||||
- Restart zabbix agent
|
||||
tags:
|
||||
- ipa/server
|
||||
- zabbix_agent
|
||||
|
||||
- name: Zabbix API Block
|
||||
vars:
|
||||
ansible_zabbix_auth_key: "{{ zabbix_auth_key }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue