You've already forked nrpe
pbs - put inventory_hostname by default
This commit is contained in:
@@ -140,7 +140,7 @@ The following checks are deployed to `/usr/lib/nagios/plugins/` (or configured p
|
||||
| `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_backups` | `[inventory_hostname]` | `check_pbs_backup` | Liste des backup-id à vérifier. |
|
||||
| `nrpe_pbs_type` | `host` | `check_pbs_backup` | Type de backup : `host`, `vm` ou `ct` (optionnel). |
|
||||
| `nrpe_pbs_port` | `8007` | `check_pbs_backup` | Port de l'API PBS (optionnel). |
|
||||
| `nrpe_pbs_namespace` | `-` | `check_pbs_backup` | Namespace PBS (optionnel). |
|
||||
@@ -185,11 +185,8 @@ The following checks are deployed to `/usr/lib/nagios/plugins/` (or configured p
|
||||
vars:
|
||||
nrpe_pbs_host: pbs01.example.com
|
||||
nrpe_pbs_token: "backup@pbs!monitoring:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
nrpe_pbs_store: main
|
||||
nrpe_pbs_backups:
|
||||
- myhost
|
||||
- otherhost
|
||||
nrpe_pbs_ssl_insecure: true # optionnel, cert auto-signé
|
||||
nrpe_pbs_datastore: main
|
||||
nrpe_pbs_ssl_insecure: true
|
||||
# nrpe_pbs_type: host # optionnel, défaut : host (vm, ct)
|
||||
# nrpe_pbs_namespace: ns # optionnel
|
||||
```
|
||||
|
||||
@@ -67,3 +67,7 @@ nrpe_ssl_critical: 14
|
||||
nrpe_ntp_host: 'europe.pool.ntp.org'
|
||||
nrpe_ntp_warning: 10
|
||||
nrpe_ntp_critical: 15
|
||||
|
||||
# nrpe_pbs_host: pbs01.example.com
|
||||
# nrpe_pbs_token: "backup@pbs!monitoring:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
# nrpe_pbs_datastore: main
|
||||
+2
-4
@@ -163,9 +163,7 @@ command[check_ceph_cap]=/usr/lib/nagios/plugins/check_ceph cap
|
||||
command[check_ceph_pg]=/usr/lib/nagios/plugins/check_ceph pg
|
||||
{% endif %}
|
||||
|
||||
{% if nrpe_pbs_backups is defined %}
|
||||
{% if nrpe_pbs_host is defined %}
|
||||
# pbs backups
|
||||
{% for backup_id in nrpe_pbs_backups %}
|
||||
command[check_pbs_backup_{{ backup_id }}]=/usr/lib/nagios/plugins/check_pbs_backup -H {{ nrpe_pbs_host }} -T {{ nrpe_pbs_token }} -s {{ nrpe_pbs_datastore }} -n {{ backup_id }}{{ ' -t ' + nrpe_pbs_type if nrpe_pbs_type is defined else '' }}{{ ' -P ' + nrpe_pbs_port|string if nrpe_pbs_port is defined else '' }}{{ ' -N ' + nrpe_pbs_namespace if nrpe_pbs_namespace is defined else '' }}{{ ' -k' if nrpe_pbs_ssl_insecure | default(false) else '' }}
|
||||
{% endfor %}
|
||||
command[check_pbs_backup]=/usr/lib/nagios/plugins/check_pbs_backup -H {{ nrpe_pbs_host }} -T {{ nrpe_pbs_token }} -s {{ nrpe_pbs_datastore }} -n {{ backup_id | default(inventory_hostname) }}{{ ' -t ' + nrpe_pbs_type if nrpe_pbs_type is defined else '' }}{{ ' -P ' + nrpe_pbs_port|string if nrpe_pbs_port is defined else '' }}{{ ' -N ' + nrpe_pbs_namespace if nrpe_pbs_namespace is defined else '' }}{{ ' -k' if nrpe_pbs_ssl_insecure | default(false) else '' }}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user