add check_pbs_backup

This commit is contained in:
Ludovic Cartier
2026-05-31 18:53:17 +02:00
parent 68b4fedeb9
commit b7a0575818
3 changed files with 181 additions and 0 deletions
+30
View File
@@ -34,6 +34,7 @@ This Ansible role installs and configures NRPE plugins for monitoring various sy
- pod restarts
- pv & pvc
- replicasets
- pbs (proxmox backup server)
- raid
- mdadm
- 3ware
@@ -66,6 +67,7 @@ The following checks are deployed to `/usr/lib/nagios/plugins/` (or configured p
- `check_needrestart`
- `check_nvme_smart`
- `check_nvme_temperature`
- `check_pbs_backup`
- `check_postfix_mailqueue`
- `check_postgresql`
- `check_proc_age`
@@ -135,6 +137,13 @@ The following checks are deployed to `/usr/lib/nagios/plugins/` (or configured p
| `nrpe_ntp_host` | `europe.pool.ntp.org` | `check_ntp` | NTP host to check. |
| `nrpe_ntp_warning` | `10` | `check_ntp` | Warning threshold for NTP offset. |
| `nrpe_ntp_critical` | `15` | `check_ntp` | Critical threshold for NTP offset. |
| `nrpe_pbs.host` | `-` | `check_pbs_backup` | Hôte PBS (IP ou FQDN). |
| `nrpe_pbs.token` | `-` | `check_pbs_backup` | API token PBS au format `user@realm!tokenid:secret`. |
| `nrpe_pbs.store` | `-` | `check_pbs_backup` | Nom du datastore PBS. |
| `nrpe_pbs.backups` | `-` | `check_pbs_backup` | Liste des backup-id à vérifier. |
| `nrpe_pbs.port` | `8007` | `check_pbs_backup` | Port de l'API PBS (optionnel). |
| `nrpe_pbs.namespace` | `-` | `check_pbs_backup` | Namespace PBS (optionnel). |
| `nrpe_pbs.ssl_insecure` | `false` | `check_pbs_backup` | Ignorer les erreurs de certificat SSL (optionnel). |
## Example Playbooks
@@ -165,6 +174,27 @@ The following checks are deployed to `/usr/lib/nagios/plugins/` (or configured p
nrpe_disk_usage_critical: 85
```
### PBS Backups
```yaml
---
- hosts: myserver
roles:
- role: nrpe
vars:
nrpe_pbs:
host: pbs.example.com
token: "backup@pbs!monitoring:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
store: main
backups:
- myhost
- otherhost
ssl_insecure: true # optionnel, si certificat auto-signé
namespace: mynamespace # optionnel
```
> L'API token doit avoir le privilege `DatastoreAudit` sur le datastore concerné.
## License
MIT