Chaque pack apporte son propre calendrier de notification
build / Garde-fou (push) Successful in 10m45s
build / Images Harbor (catalog-sync, Dockerfile.catalog-sync) (push) Successful in 9m52s
build / Images Harbor (web, Dockerfile) (push) Successful in 10m0s

This commit is contained in:
hcornet committed 2026-09-12 11:02:02 +02:00
1 parent 032982cb28
commit 9debdcdf9c
57 files changed
+315 -108

No files matched your search

+7
View File
@@ -3,6 +3,13 @@
Format : [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/).
Versionnement sémantique, comme décrit dans [docs/CONVENTIONS.md](docs/CONVENTIONS.md).
## 1.18.0
### Modifié
- Chaque pack apporte désormais **son propre** calendrier — `TP-App-Apache-24x7`,
`TP-App-Nginx-24x7`, `TP-HW-Printer-RFC3805-Heures-Ouvrees` — au lieu de pointer celui du
central : ajuster les plages d'une technologie ne modifie plus celles de tout le parc
## 1.17.0
### Modifié
+6 -2
View File
@@ -43,7 +43,10 @@ groupe_hote: # le groupe dans lequel ranger les hôtes
notification: # la chaîne d'alerte livrée avec le pack
perimetre: RabbitMQ
calendrier: 24x7 # 24x7 et Heures-Ouvrees sont reconnus
calendrier: # le pack apporte le sien, il ne réutilise pas celui du central
name: TP-App-RabbitMQ-24x7
modele: 24x7 # 24x7 ou Heures-Ouvrees : le rythme copié
alias: RabbitMQ, en permanence
groupe: CG-App-RabbitMQ # CG-<Famille>-<Techno>
criticite: Majeure
impact: "Échanges entre applications interrompus"
@@ -86,7 +89,8 @@ même valeur.
- **Une chaîne de notification.** Un pack qui supervise sans prévenir personne n'a pas
d'intérêt : `calendrier`, `groupe` et `impact` sont attendus. Choisissez `24x7` pour ce
dont la panne réveille quelqu'un, `Heures-Ouvrees` sinon. Les calendriers livrés par
Centreon — `24x7`, `workhours`, `nonworkhours`, `none` — sont référencés, jamais recréés.
Centreon. Chaque pack apporte **son propre** calendrier, nommé `TP-<Famille>-<Techno>-<rythme>` :
ajuster les plages d'une technologie ne doit pas modifier celles de tout le central.
- **`status: verified`** uniquement si vous avez exécuté ces commandes sur un Centreon. Sinon
`to-verify`, c'est honnête et c'est utile.
- `$CENTREONPLUGINS$` est remplacé par le répertoire de plugins choisi par l'utilisateur.
+4 -1
View File
@@ -18,7 +18,10 @@ groupe_hote:
alias: Apache HTTP Server
notification:
perimetre: Apache HTTP Server
calendrier: 24x7
calendrier:
name: TP-App-Apache-24x7
modele: 24x7
alias: Apache HTTP Server, en permanence
groupe: CG-App-Apache
criticite: Majeure
impact: "Sites et applications web indisponibles"
+4 -1
View File
@@ -25,7 +25,10 @@ groupe_hote:
alias: Elasticsearch
notification:
perimetre: Elasticsearch
calendrier: 24x7
calendrier:
name: TP-App-Elasticsearch-24x7
modele: 24x7
alias: Elasticsearch, en permanence
groupe: CG-App-Elasticsearch
criticite: Majeure
impact: "Recherche et journalisation degradees"
+4 -1
View File
@@ -18,7 +18,10 @@ groupe_hote:
alias: Nginx
notification:
perimetre: Nginx
calendrier: 24x7
calendrier:
name: TP-App-Nginx-24x7
modele: 24x7
alias: Nginx, en permanence
groupe: CG-App-Nginx
criticite: Majeure
impact: "Sites et applications web indisponibles"
+4 -1
View File
@@ -26,7 +26,10 @@ groupe_hote:
alias: RabbitMQ
notification:
perimetre: RabbitMQ
calendrier: 24x7
calendrier:
name: TP-App-RabbitMQ-24x7
modele: 24x7
alias: RabbitMQ, en permanence
groupe: CG-App-RabbitMQ
criticite: Majeure
impact: "Echanges entre applications interrompus"
+4 -1
View File
@@ -25,7 +25,10 @@ groupe_hote:
alias: MongoDB
notification:
perimetre: MongoDB
calendrier: 24x7
calendrier:
name: TP-App-MongoDB-24x7
modele: 24x7
alias: MongoDB, en permanence
groupe: CG-App-MongoDB
criticite: Majeure
impact: "Bases de donnees inaccessibles"
+4 -1
View File
@@ -27,7 +27,10 @@ groupe_hote:
alias: Microsoft SQL Server
notification:
perimetre: Microsoft SQL Server
calendrier: 24x7
calendrier:
name: TP-App-DB-MSSQL-24x7
modele: 24x7
alias: Microsoft SQL Server, en permanence
groupe: CG-App-DB-MSSQL
criticite: Majeure
impact: "Bases de donnees inaccessibles"
+4 -1
View File
@@ -28,7 +28,10 @@ groupe_hote:
alias: MySQL / MariaDB
notification:
perimetre: MySQL / MariaDB
calendrier: 24x7
calendrier:
name: TP-App-DB-MySQL-24x7
modele: 24x7
alias: MySQL / MariaDB, en permanence
groupe: CG-App-DB-MySQL
criticite: Majeure
impact: "Bases de donnees inaccessibles"
+4 -1
View File
@@ -26,7 +26,10 @@ groupe_hote:
alias: Oracle Database
notification:
perimetre: Oracle Database
calendrier: 24x7
calendrier:
name: TP-App-DB-Oracle-24x7
modele: 24x7
alias: Oracle Database, en permanence
groupe: CG-App-DB-Oracle
criticite: Majeure
impact: "Bases de donnees inaccessibles"
+4 -1
View File
@@ -29,7 +29,10 @@ groupe_hote:
alias: PostgreSQL
notification:
perimetre: PostgreSQL
calendrier: 24x7
calendrier:
name: TP-App-DB-PostgreSQL-24x7
modele: 24x7
alias: PostgreSQL, en permanence
groupe: CG-App-DB-PostgreSQL
criticite: Majeure
impact: "Bases de donnees inaccessibles"
+4 -1
View File
@@ -24,7 +24,10 @@ groupe_hote:
alias: Redis
notification:
perimetre: Redis
calendrier: 24x7
calendrier:
name: TP-App-Redis-24x7
modele: 24x7
alias: Redis, en permanence
groupe: CG-App-Redis
criticite: Majeure
impact: "Cache applicatif indisponible, degradation des temps de reponse"
@@ -17,7 +17,10 @@ groupe_hote:
alias: Serveur Dell (iDRAC SNMP)
notification:
perimetre: Serveur Dell (iDRAC SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Dell-iDRAC-SNMP-24x7
modele: 24x7
alias: Serveur Dell (iDRAC SNMP), en permanence
groupe: CG-HW-Dell-iDRAC-SNMP
criticite: Majeure
impact: "Materiel serveur en defaut"
@@ -17,7 +17,10 @@ groupe_hote:
alias: Serveur HP ProLiant (iLO SNMP)
notification:
perimetre: Serveur HP ProLiant (iLO SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-HP-Proliant-SNMP-24x7
modele: 24x7
alias: Serveur HP ProLiant (iLO SNMP), en permanence
groupe: CG-HW-HP-Proliant-SNMP
criticite: Majeure
impact: "Materiel serveur en defaut"
@@ -17,7 +17,10 @@ groupe_hote:
alias: Switch Alcatel OmniSwitch (SNMP)
notification:
perimetre: Switch Alcatel OmniSwitch (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Alcatel-OmniSwitch-24x7
modele: 24x7
alias: Switch Alcatel OmniSwitch (SNMP), en permanence
groupe: CG-HW-Alcatel-OmniSwitch
criticite: Critique
impact: "Coupure reseau sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Bornes wifi Aruba Instant (SNMP)
notification:
perimetre: Bornes wifi Aruba Instant
calendrier: 24x7
calendrier:
name: TP-HW-Aruba-Instant-24x7
modele: 24x7
alias: Bornes wifi Aruba Instant (SNMP), en permanence
groupe: CG-HW-Aruba-Instant
criticite: Majeure
impact: "Couverture wifi degradee ou absente sur le site"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Switch Aruba (SNMP)
notification:
perimetre: Switch Aruba (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Aruba-SNMP-24x7
modele: 24x7
alias: Switch Aruba (SNMP), en permanence
groupe: CG-HW-Aruba-SNMP
criticite: Critique
impact: "Coupure reseau sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Switch / routeur Cisco (SNMP)
notification:
perimetre: Switch / routeur Cisco (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Cisco-SNMP-24x7
modele: 24x7
alias: Switch / routeur Cisco (SNMP), en permanence
groupe: CG-HW-Cisco-SNMP
criticite: Critique
impact: "Coupure reseau sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Controleur wifi Cisco WLC (SNMP)
notification:
perimetre: Controleur wifi Cisco WLC
calendrier: 24x7
calendrier:
name: TP-HW-Cisco-WLC-24x7
modele: 24x7
alias: Controleur wifi Cisco WLC (SNMP), en permanence
groupe: CG-HW-Cisco-WLC
criticite: Majeure
impact: "Couverture wifi degradee ou absente sur le site"
@@ -17,7 +17,10 @@ groupe_hote:
alias: Switch Dell PowerConnect et N-Series (SNMP)
notification:
perimetre: Switch Dell PowerConnect et N-Series (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Dell-PowerConnect-24x7
modele: 24x7
alias: Switch Dell PowerConnect et N-Series (SNMP), en permanence
groupe: CG-HW-Dell-PowerConnect
criticite: Critique
impact: "Coupure reseau sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Switch Extreme Networks (SNMP)
notification:
perimetre: Switch Extreme Networks (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Extreme-SNMP-24x7
modele: 24x7
alias: Switch Extreme Networks (SNMP), en permanence
groupe: CG-HW-Extreme-SNMP
criticite: Critique
impact: "Coupure reseau sur le perimetre desservi"
@@ -17,7 +17,10 @@ groupe_hote:
alias: Firewall Fortinet FortiGate (SNMP)
notification:
perimetre: Firewall Fortinet FortiGate (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Fortinet-FortiGate-SNMP-24x7
modele: 24x7
alias: Firewall Fortinet FortiGate (SNMP), en permanence
groupe: CG-HW-Fortinet-FortiGate-SNMP
criticite: Critique
impact: "Pare-feu en defaut, acces reseau compromis"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Switch HP ProCurve et Aruba (SNMP)
notification:
perimetre: Switch HP ProCurve et Aruba (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-HP-Procurve-SNMP-24x7
modele: 24x7
alias: Switch HP ProCurve et Aruba (SNMP), en permanence
groupe: CG-HW-HP-Procurve-SNMP
criticite: Critique
impact: "Coupure reseau sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Switch et routeur Huawei (SNMP)
notification:
perimetre: Switch et routeur Huawei (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Huawei-SNMP-24x7
modele: 24x7
alias: Switch et routeur Huawei (SNMP), en permanence
groupe: CG-HW-Huawei-SNMP
criticite: Critique
impact: "Coupure reseau sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Juniper JunOS (SNMP)
notification:
perimetre: Juniper JunOS (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Juniper-JunOS-SNMP-24x7
modele: 24x7
alias: Juniper JunOS (SNMP), en permanence
groupe: CG-HW-Juniper-JunOS-SNMP
criticite: Critique
impact: "Coupure reseau sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: MikroTik RouterOS (SNMP)
notification:
perimetre: MikroTik RouterOS (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-MikroTik-SNMP-24x7
modele: 24x7
alias: MikroTik RouterOS (SNMP), en permanence
groupe: CG-HW-MikroTik-SNMP
criticite: Majeure
impact: "Coupure reseau sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Pare-feu Palo Alto (SNMP)
notification:
perimetre: Pare-feu Palo Alto (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-PaloAlto-SNMP-24x7
modele: 24x7
alias: Pare-feu Palo Alto (SNMP), en permanence
groupe: CG-HW-PaloAlto-SNMP
criticite: Critique
impact: "Pare-feu en defaut, acces reseau compromis"
+4 -1
View File
@@ -21,7 +21,10 @@ groupe_hote:
alias: Pare-feu pfSense (SNMP)
notification:
perimetre: Pare-feu pfSense (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-pfSense-SNMP-24x7
modele: 24x7
alias: Pare-feu pfSense (SNMP), en permanence
groupe: CG-HW-pfSense-SNMP
criticite: Critique
impact: "Pare-feu en defaut, acces reseau compromis"
@@ -17,7 +17,10 @@ groupe_hote:
alias: Controleur wifi Ruckus ZoneDirector (SNMP)
notification:
perimetre: Controleur wifi Ruckus
calendrier: 24x7
calendrier:
name: TP-HW-Ruckus-ZoneDirector-24x7
modele: 24x7
alias: Controleur wifi Ruckus ZoneDirector (SNMP), en permanence
groupe: CG-HW-Ruckus-ZoneDirector
criticite: Majeure
impact: "Couverture wifi degradee ou absente sur le site"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Pare-feu Stormshield (SNMP)
notification:
perimetre: Pare-feu Stormshield (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Stormshield-SNMP-24x7
modele: 24x7
alias: Pare-feu Stormshield (SNMP), en permanence
groupe: CG-HW-Stormshield-SNMP
criticite: Critique
impact: "Pare-feu en defaut, acces reseau compromis"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Ubiquiti UniFi et EdgeMax (SNMP)
notification:
perimetre: Ubiquiti UniFi et EdgeMax (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Ubiquiti-SNMP-24x7
modele: 24x7
alias: Ubiquiti UniFi et EdgeMax (SNMP), en permanence
groupe: CG-HW-Ubiquiti-SNMP
criticite: Majeure
impact: "Coupure reseau ou wifi sur le perimetre desservi"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: AIX (SNMP)
notification:
perimetre: AIX (SNMP)
calendrier: 24x7
calendrier:
name: TP-OS-AIX-SNMP-24x7
modele: 24x7
alias: AIX (SNMP), en permanence
groupe: CG-OS-AIX-SNMP
criticite: Majeure
impact: "Serveur indisponible ou degrade"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: FreeBSD (SNMP)
notification:
perimetre: FreeBSD (SNMP)
calendrier: 24x7
calendrier:
name: TP-OS-FreeBSD-SNMP-24x7
modele: 24x7
alias: FreeBSD (SNMP), en permanence
groupe: CG-OS-FreeBSD-SNMP
criticite: Majeure
impact: "Serveur indisponible ou degrade"
+4 -1
View File
@@ -24,7 +24,10 @@ groupe_hote:
alias: Linux (NRPE)
notification:
perimetre: Linux (NRPE)
calendrier: 24x7
calendrier:
name: TP-OS-Linux-NRPE-24x7
modele: 24x7
alias: Linux (NRPE), en permanence
groupe: CG-OS-Linux-NRPE
criticite: Majeure
impact: "Serveur indisponible ou degrade"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Linux (SNMP)
notification:
perimetre: Linux (SNMP)
calendrier: 24x7
calendrier:
name: TP-OS-Linux-SNMP-24x7
modele: 24x7
alias: Linux (SNMP), en permanence
groupe: CG-OS-Linux-SNMP
criticite: Majeure
impact: "Serveur indisponible ou degrade"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Solaris (SNMP)
notification:
perimetre: Solaris (SNMP)
calendrier: 24x7
calendrier:
name: TP-OS-Solaris-SNMP-24x7
modele: 24x7
alias: Solaris (SNMP), en permanence
groupe: CG-OS-Solaris-SNMP
criticite: Majeure
impact: "Serveur indisponible ou degrade"
@@ -18,7 +18,10 @@ groupe_hote:
alias: Windows (NSClient++ / check_nt)
notification:
perimetre: Windows (NSClient++ / check_nt)
calendrier: 24x7
calendrier:
name: TP-OS-Windows-NSClient-24x7
modele: 24x7
alias: Windows (NSClient++ / check_nt), en permanence
groupe: CG-OS-Windows-NSClient
criticite: Majeure
impact: "Serveur indisponible ou degrade"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Windows (SNMP)
notification:
perimetre: Windows (SNMP)
calendrier: 24x7
calendrier:
name: TP-OS-Windows-SNMP-24x7
modele: 24x7
alias: Windows (SNMP), en permanence
groupe: CG-OS-Windows-SNMP
criticite: Majeure
impact: "Serveur indisponible ou degrade"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Imprimante reseau (RFC 3805)
notification:
perimetre: Imprimante reseau (RFC 3805)
calendrier: Heures-Ouvrees
calendrier:
name: TP-HW-Printer-RFC3805-Heures-Ouvrees
modele: Heures-Ouvrees
alias: Imprimante reseau (RFC 3805), heures ouvrees
groupe: CG-HW-Printer-RFC3805
criticite: Mineure
impact: "Impression indisponible ou consommable epuise"
+4 -1
View File
@@ -25,7 +25,10 @@ groupe_hote:
alias: Annuaire LDAP
notification:
perimetre: Annuaire LDAP
calendrier: 24x7
calendrier:
name: TP-App-LDAP-24x7
modele: 24x7
alias: Annuaire LDAP, en permanence
groupe: CG-App-LDAP
criticite: Critique
impact: "Authentification et annuaire indisponibles, la plupart des applications s'arretent"
+4 -1
View File
@@ -14,7 +14,10 @@ groupe_hote:
alias: Services reseau standards (HTTP, TCP, DNS, NTP, SSH)
notification:
perimetre: Services reseau standards (HTTP, TCP, DNS, NTP, SSH)
calendrier: 24x7
calendrier:
name: TP-App-Protocols-24x7
modele: 24x7
alias: Services reseau standards (HTTP, TCP, DNS, NTP, SSH), en permanence
groupe: CG-App-Protocols
criticite: Majeure
impact: "Service reseau expose indisponible"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Equipement generique (SNMP standard)
notification:
perimetre: Equipement generique (SNMP standard)
calendrier: 24x7
calendrier:
name: TP-OS-Generic-SNMP-24x7
modele: 24x7
alias: Equipement generique (SNMP standard), en permanence
groupe: CG-OS-Generic-SNMP
criticite: Majeure
impact: "Serveur indisponible ou degrade"
+4 -1
View File
@@ -24,7 +24,10 @@ groupe_hote:
alias: Baie Dell EMC Unity (API REST)
notification:
perimetre: Baie Dell EMC Unity
calendrier: 24x7
calendrier:
name: TP-HW-EMC-Unity-24x7
modele: 24x7
alias: Baie Dell EMC Unity (API REST), en permanence
groupe: CG-HW-EMC-Unity
criticite: Critique
impact: "Stockage partage en defaut, machines et applications menacees"
+4 -1
View File
@@ -24,7 +24,10 @@ groupe_hote:
alias: Baie HPE MSA et P2000 (API XML)
notification:
perimetre: Baie HPE MSA
calendrier: 24x7
calendrier:
name: TP-HW-HP-MSA-24x7
modele: 24x7
alias: Baie HPE MSA et P2000 (API XML), en permanence
groupe: CG-HW-HP-MSA
criticite: Critique
impact: "Stockage partage en defaut, machines et applications menacees"
+4 -1
View File
@@ -23,7 +23,10 @@ groupe_hote:
alias: Baie IBM Storwize et FlashSystem (SSH)
notification:
perimetre: Baie IBM Storwize
calendrier: 24x7
calendrier:
name: TP-HW-IBM-Storwize-24x7
modele: 24x7
alias: Baie IBM Storwize et FlashSystem (SSH), en permanence
groupe: CG-HW-IBM-Storwize
criticite: Critique
impact: "Stockage partage en defaut, machines et applications menacees"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Baie NetApp ONTAP (SNMP)
notification:
perimetre: Baie NetApp ONTAP (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-NetApp-ONTAP-SNMP-24x7
modele: 24x7
alias: Baie NetApp ONTAP (SNMP), en permanence
groupe: CG-HW-NetApp-ONTAP-SNMP
criticite: Critique
impact: "Stockage partage en defaut"
+4 -1
View File
@@ -22,7 +22,10 @@ groupe_hote:
alias: Baie Pure Storage (API REST)
notification:
perimetre: Baie Pure Storage
calendrier: 24x7
calendrier:
name: TP-HW-PureStorage-24x7
modele: 24x7
alias: Baie Pure Storage (API REST), en permanence
groupe: CG-HW-PureStorage
criticite: Critique
impact: "Stockage partage en defaut, machines et applications menacees"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: NAS QNAP (SNMP)
notification:
perimetre: NAS QNAP
calendrier: 24x7
calendrier:
name: TP-HW-QNAP-SNMP-24x7
modele: 24x7
alias: NAS QNAP (SNMP), en permanence
groupe: CG-HW-QNAP-SNMP
criticite: Majeure
impact: "Stockage et sauvegardes en defaut"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: NAS Synology (SNMP)
notification:
perimetre: NAS Synology (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-Synology-SNMP-24x7
modele: 24x7
alias: NAS Synology (SNMP), en permanence
groupe: CG-HW-Synology-SNMP
criticite: Majeure
impact: "Stockage et sauvegardes en defaut"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Onduleur APC (SNMP)
notification:
perimetre: Onduleur APC (SNMP)
calendrier: 24x7
calendrier:
name: TP-HW-APC-UPS-SNMP-24x7
modele: 24x7
alias: Onduleur APC (SNMP), en permanence
groupe: CG-HW-APC-UPS-SNMP
criticite: Critique
impact: "Alimentation electrique menacee"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Onduleur standard (RFC 1628)
notification:
perimetre: Onduleur standard (RFC 1628)
calendrier: 24x7
calendrier:
name: TP-HW-UPS-RFC1628-24x7
modele: 24x7
alias: Onduleur standard (RFC 1628), en permanence
groupe: CG-HW-UPS-RFC1628
criticite: Critique
impact: "Alimentation electrique menacee"
+4 -1
View File
@@ -17,7 +17,10 @@ groupe_hote:
alias: Docker (API REST)
notification:
perimetre: Docker (API REST)
calendrier: 24x7
calendrier:
name: TP-App-Docker-24x7
modele: 24x7
alias: Docker (API REST), en permanence
groupe: CG-App-Docker
criticite: Majeure
impact: "Conteneurs applicatifs arretes ou degrades"
+4 -1
View File
@@ -26,7 +26,10 @@ groupe_hote:
alias: Proxmox VE (API REST)
notification:
perimetre: Proxmox VE (API REST)
calendrier: 24x7
calendrier:
name: TP-App-Proxmox-24x7
modele: 24x7
alias: Proxmox VE (API REST), en permanence
groupe: CG-App-Proxmox
criticite: Critique
impact: "Hyperviseur en defaut, machines virtuelles menacees"
+4 -1
View File
@@ -26,7 +26,10 @@ groupe_hote:
alias: VMware ESXi (connecteur Centreon VMware)
notification:
perimetre: VMware ESXi (connecteur Centreon VMware)
calendrier: 24x7
calendrier:
name: TP-App-VMware-ESX-24x7
modele: 24x7
alias: VMware ESXi (connecteur Centreon VMware), en permanence
groupe: CG-App-VMware-ESX
criticite: Critique
impact: "Hyperviseur en defaut, machines virtuelles menacees"
+11 -6
View File
@@ -15,14 +15,19 @@ indisponibles ».
Il reste une chose à faire de votre côté : **mettre des contacts dans le groupe**. Enclume
crée le groupe vide, faute de connaître vos utilisateurs.
### Les calendriers livrés par Centreon
### Chaque pack apporte son calendrier
`24x7`, `workhours`, `nonworkhours` et `none` existent dès l'installation. Ils apparaissent
dans le projet, avec leurs plages, pour qu'on voie à quoi les périmètres se réfèrent — mais
ils portent la mention « Centreon » et ne sont pas recréés : `TP;ADD` échouerait sur un objet
existant et interromprait le déploiement.
Un pack ne réutilise pas les calendriers du central : il crée le sien,
`TP-App-Apache-24x7`, `TP-HW-Printer-RFC3805-Heures-Ouvrees`. Ajuster les plages d'une
technologie ne touche alors qu'elle, et non tout ce qui pointait `24x7`.
Si votre central les a perdus, un bouton permet de forcer leur création.
Le rythme copié à la création est `24x7` pour ce dont la panne réveille quelqu'un,
`Heures-Ouvrees` sinon. Les plages restent modifiables ensuite, comme n'importe quel objet
du projet.
Si vous préférez viser un calendrier existant sur votre central — `24x7`, `workhours` —
saisissez-le dans le périmètre : il apparaîtra dans le projet marqué « Centreon » et ne sera
pas recréé, `TP;ADD` échouant sur un objet existant.
## Le principe
+22 -8
View File
@@ -92,20 +92,34 @@ def pack_to_project(
notification = pack.notification or {}
perimetre_nom = ""
if notification:
calendrier_nom = str(notification.get("calendrier") or "24x7")
modele = CALENDRIERS_STANDARD.get(calendrier_nom)
if modele:
# Le calendrier figure toujours dans le projet, pour qu'on voie a
# quoi le perimetre se refere. Ceux livres par Centreon portent une
# marque et ne seront pas recrees.
calendrier = notification.get("calendrier")
if isinstance(calendrier, dict):
# Le pack apporte son propre calendrier : modifier les plages
# d'Apache ne doit pas toucher celles de tout le central.
calendrier_nom = str(calendrier.get("name") or "")
modele = CALENDRIERS_STANDARD.get(str(calendrier.get("modele") or "24x7"))
project.calendriers = [
Calendrier(
name=calendrier_nom,
alias=str(modele["alias"]),
alias=str(calendrier.get("alias") or modele["alias"]),
jours=dict(modele["jours"]),
creer=calendrier_nom not in CALENDRIERS_CENTREON,
creer=True,
)
]
else:
# Ancienne forme : une reference a un calendrier existant.
calendrier_nom = str(calendrier or "24x7")
modele = CALENDRIERS_STANDARD.get(calendrier_nom)
if modele:
project.calendriers = [
Calendrier(
name=calendrier_nom,
alias=str(modele["alias"]),
jours=dict(modele["jours"]),
creer=calendrier_nom not in CALENDRIERS_CENTREON,
)
]
perimetre_nom = str(notification.get("perimetre") or pack.name)
project.perimetres = [
+61 -40
View File
@@ -397,29 +397,48 @@ def test_import_d_un_pack_rattache_ses_modeles():
projet = pack_to_project(Catalog("catalog").get("app-ldap"))
perimetre = projet.perimetres[0]
assert perimetre.calendrier == "24x7"
assert perimetre.calendrier == "TP-App-LDAP-24x7"
assert perimetre.groupe == "CG-App-LDAP"
assert perimetre.criticite == "Critique"
assert projet.host_templates[0].perimetre == perimetre.name
assert all(s.perimetre == perimetre.name for s in projet.service_templates)
def test_les_calendriers_livres_par_centreon_ne_sont_pas_recrees():
"""24x7 figure au projet pour qu'on le voie, mais TP;ADD echouerait sur un
objet existant : il n'est pas recree."""
def test_chaque_pack_apporte_son_propre_calendrier():
"""Modifier les plages d'un pack ne doit pas toucher celles de tout le central."""
from enclume.catalog import Catalog
from enclume.packs import pack_to_project
projet = pack_to_project(Catalog("catalog").get("app-ldap"))
assert [c.name for c in projet.calendriers] == ["24x7"]
assert projet.calendriers[0].creer is False
assert not [o for o in build_plan(projet).ops if o.obj == "TP"]
assert projet.perimetres[0].calendrier == "24x7"
calendrier = projet.calendriers[0]
# Un calendrier qui n'est pas livre, lui, doit etre cree.
assert calendrier.name == "TP-App-LDAP-24x7"
assert calendrier.creer is True
assert len(calendrier.jours) == 7
assert projet.perimetres[0].calendrier == calendrier.name
lignes = [o.import_line() for o in build_plan(projet).ops if o.obj == "TP"]
assert lignes[0].startswith("TP;ADD;TP-App-LDAP-24x7;")
assert any("monday;00:00-24:00" in ligne for ligne in lignes)
# Une imprimante ne reveille personne la nuit : cinq jours ouvres.
imprimante = pack_to_project(Catalog("catalog").get("hw-printer-rfc3805"))
assert [c.name for c in imprimante.calendriers] == ["Heures-Ouvrees"]
assert imprimante.calendriers[0].creer is True
assert imprimante.calendriers[0].name == "TP-HW-Printer-RFC3805-Heures-Ouvrees"
assert len(imprimante.calendriers[0].jours) == 5
def test_le_calendrier_d_un_pack_suit_le_prefixe():
"""Comme les autres objets du projet, il porte le prefixe demande."""
from enclume.catalog import Catalog
from enclume.packs import pack_to_project
projet = pack_to_project(Catalog("catalog").get("app-apache"))
projet.prefix = "ACME-"
lignes = [o.import_line() for o in build_plan(projet).ops]
assert any(ligne.startswith("TP;ADD;ACME-TP-App-Apache-24x7;") for ligne in lignes)
periode = next(ligne for ligne in lignes if "notification_period" in ligne)
assert periode.endswith(";ACME-TP-App-Apache-24x7")
def test_un_pack_importe_produit_le_cablage_complet():
@@ -435,7 +454,7 @@ def test_un_pack_importe_produit_le_cablage_complet():
for ligne in lignes
)
assert any("STPL;setcontactgroup;" in ligne for ligne in lignes)
assert any("notification_period;24x7" in ligne for ligne in lignes)
assert any("notification_period;TP-App-DB-MySQL-24x7" in ligne for ligne in lignes)
def test_la_fusion_d_un_pack_apporte_tout(app):
@@ -463,8 +482,10 @@ def test_la_fusion_d_un_pack_apporte_tout(app):
assert len(suite["perimetres"]) == 2
# MySQL apporte 24x7, reference mais non recree ; l'imprimante son propre
# calendrier, qui sera cree.
assert [c["name"] for c in suite["calendriers"]] == ["24x7", "Heures-Ouvrees"]
assert [c["creer"] for c in suite["calendriers"]] == [False, True]
assert [c["name"] for c in suite["calendriers"]] == [
"TP-App-DB-MySQL-24x7",
"TP-HW-Printer-RFC3805-Heures-Ouvrees",
]
assert len(suite["host_templates"]) == 2
@@ -484,38 +505,38 @@ def test_fusion_d_un_pack_inconnu(app):
assert reponse.status_code == 404
def test_le_calendrier_livre_par_centreon_figure_au_projet():
"""Il doit se voir dans l'editeur, sans etre recree a l'identique."""
from enclume.catalog import Catalog
from enclume.packs import pack_to_project
def test_un_calendrier_du_central_est_reference_sans_etre_recree():
"""Quand l'utilisateur vise un calendrier existant, TP;ADD echouerait dessus."""
projet = Project.from_dict(
{
"calendriers": [
{
"name": "24x7",
"alias": "Livre par Centreon",
"jours": {"monday": "00:00-24:00"},
"creer": False,
}
],
"perimetres": [{"name": "Systeme", "calendrier": "24x7", "contacts": ["hcornet"]}],
"prefix": "ACME-",
}
)
plan = build_plan(projet)
projet = pack_to_project(Catalog("catalog").get("app-apache"))
calendrier = projet.calendriers[0]
assert calendrier.name == "24x7"
assert calendrier.creer is False
assert calendrier.jours, "ses plages doivent rester lisibles"
# Aucune operation TP : l'objet existe deja sur le central.
assert not [o for o in build_plan(projet).ops if o.obj == "TP"]
assert not [o for o in build_plan(projet).rollback_ops if o.obj == "TP"]
# Le perimetre s'y refere sans prefixe, meme quand le projet en porte un.
projet.prefix = "ACME-"
assert not [o for o in plan.ops if o.obj == "TP"]
assert not [o for o in plan.rollback_ops if o.obj == "TP"]
# Il porte le nom du central, donc sans prefixe.
periode = next(
o.import_line() for o in build_plan(projet).ops if "notification_period" in o.import_line()
o.import_line() for o in plan.ops if "hostnotifperiod" in o.import_line()
)
assert periode.endswith(";24x7")
def test_un_calendrier_du_central_peut_etre_force():
"""Une installation peut avoir perdu ses calendriers par defaut."""
from enclume.catalog import Catalog
from enclume.packs import pack_to_project
projet = pack_to_project(Catalog("catalog").get("app-apache"))
projet.calendriers[0].creer = True
projet = Project.from_dict(
{"calendriers": [{"name": "24x7", "jours": {"monday": "00:00-24:00"}, "creer": True}]}
)
lignes = [o.import_line() for o in build_plan(projet).ops if o.obj == "TP"]
assert "TP;ADD;24x7;Tous les jours, toute la journee" in lignes
assert any("monday;00:00-24:00" in ligne for ligne in lignes)
assert lignes[0].startswith("TP;ADD;24x7;")
assert "TP;setparam;24x7;monday;00:00-24:00" in lignes