From 23395779ee1600f54ddb4bfbe825841b6c4af7d7 Mon Sep 17 00:00:00 2001 From: hcornet Date: Fri, 11 Sep 2026 17:56:54 +0200 Subject: [PATCH] Catalogue range selon les categories des connecteurs Centreon --- CHANGELOG.md | 8 +++++++ CONTRIBUTING.md | 14 ++++++++++- .../app-apache.yml | 2 +- .../app-elasticsearch.yml | 2 +- .../app-nginx.yml | 2 +- .../app-rabbitmq.yml | 2 +- .../{application => database}/app-mongodb.yml | 2 +- .../{application => database}/app-mssql.yml | 2 +- .../{application => database}/app-mysql.yml | 2 +- .../{application => database}/app-oracle.yml | 2 +- .../app-postgresql.yml | 2 +- .../{application => database}/app-redis.yml | 2 +- .../hw-dell-idrac-snmp.yml | 2 +- .../hw-hp-proliant-snmp.yml | 2 +- .../hw-alcatel-omniswitch-snmp.yml | 2 +- .../hw-aruba-instant-snmp.yml | 2 +- .../{hardware => network}/hw-aruba-snmp.yml | 2 +- .../{hardware => network}/hw-cisco-snmp.yml | 2 +- .../hw-cisco-wlc-snmp.yml | 2 +- .../hw-dell-powerconnect-snmp.yml | 2 +- .../{hardware => network}/hw-extreme-snmp.yml | 2 +- .../hw-fortinet-fortigate-snmp.yml | 2 +- .../hw-hp-procurve-snmp.yml | 2 +- .../{hardware => network}/hw-huawei-snmp.yml | 2 +- .../hw-juniper-junos-snmp.yml | 2 +- .../hw-mikrotik-snmp.yml | 2 +- .../hw-paloalto-snmp.yml | 2 +- .../{hardware => network}/hw-pfsense-snmp.yml | 2 +- .../hw-ruckus-zonedirector-snmp.yml | 2 +- .../hw-stormshield-snmp.yml | 2 +- .../hw-ubiquiti-snmp.yml | 2 +- .../os-aix-snmp.yml | 2 +- .../os-freebsd-snmp.yml | 2 +- .../os-linux-nrpe.yml | 2 +- .../os-linux-snmp.yml | 2 +- .../os-solaris-snmp.yml | 2 +- .../os-windows-nsclient.yml | 2 +- .../os-windows-snmp.yml | 2 +- .../hw-printer-rfc3805.yml | 2 +- .../{application => protocol}/app-ldap.yml | 2 +- .../app-protocols.yml | 2 +- .../{system => protocol}/os-generic-snmp.yml | 2 +- .../hw-emc-unity-restapi.yml | 2 +- .../hw-hp-msa-xmlapi.yml | 2 +- .../hw-ibm-storwize-ssh.yml | 2 +- .../hw-netapp-ontap-snmp.yml | 2 +- .../hw-purestorage-restapi.yml | 2 +- .../{hardware => storage}/hw-qnap-snmp.yml | 2 +- .../hw-synology-snmp.yml | 2 +- .../{hardware => ups-pdu}/hw-apc-ups-snmp.yml | 2 +- .../{hardware => ups-pdu}/hw-ups-rfc1628.yml | 2 +- .../app-docker.yml | 2 +- .../app-proxmox.yml | 2 +- .../app-vmware-esx.yml | 2 +- enclume/catalog.py | 23 +++++++++++++++---- tests/test_generation.py | 18 +++++++++++++++ tests/test_services.py | 4 ++-- 57 files changed, 112 insertions(+), 59 deletions(-) rename catalog/{application => applications}/app-apache.yml (99%) rename catalog/{application => applications}/app-elasticsearch.yml (99%) rename catalog/{application => applications}/app-nginx.yml (99%) rename catalog/{application => applications}/app-rabbitmq.yml (99%) rename catalog/{application => database}/app-mongodb.yml (99%) rename catalog/{application => database}/app-mssql.yml (99%) rename catalog/{application => database}/app-mysql.yml (99%) rename catalog/{application => database}/app-oracle.yml (99%) rename catalog/{application => database}/app-postgresql.yml (99%) rename catalog/{application => database}/app-redis.yml (99%) rename catalog/{hardware => hardware-server}/hw-dell-idrac-snmp.yml (99%) rename catalog/{hardware => hardware-server}/hw-hp-proliant-snmp.yml (99%) rename catalog/{hardware => network}/hw-alcatel-omniswitch-snmp.yml (99%) rename catalog/{hardware => network}/hw-aruba-instant-snmp.yml (99%) rename catalog/{hardware => network}/hw-aruba-snmp.yml (99%) rename catalog/{hardware => network}/hw-cisco-snmp.yml (99%) rename catalog/{hardware => network}/hw-cisco-wlc-snmp.yml (99%) rename catalog/{hardware => network}/hw-dell-powerconnect-snmp.yml (99%) rename catalog/{hardware => network}/hw-extreme-snmp.yml (99%) rename catalog/{hardware => network}/hw-fortinet-fortigate-snmp.yml (99%) rename catalog/{hardware => network}/hw-hp-procurve-snmp.yml (99%) rename catalog/{hardware => network}/hw-huawei-snmp.yml (99%) rename catalog/{hardware => network}/hw-juniper-junos-snmp.yml (99%) rename catalog/{hardware => network}/hw-mikrotik-snmp.yml (99%) rename catalog/{hardware => network}/hw-paloalto-snmp.yml (99%) rename catalog/{hardware => network}/hw-pfsense-snmp.yml (99%) rename catalog/{hardware => network}/hw-ruckus-zonedirector-snmp.yml (99%) rename catalog/{hardware => network}/hw-stormshield-snmp.yml (99%) rename catalog/{hardware => network}/hw-ubiquiti-snmp.yml (99%) rename catalog/{system => operating-system}/os-aix-snmp.yml (99%) rename catalog/{system => operating-system}/os-freebsd-snmp.yml (99%) rename catalog/{system => operating-system}/os-linux-nrpe.yml (99%) rename catalog/{system => operating-system}/os-linux-snmp.yml (99%) rename catalog/{system => operating-system}/os-solaris-snmp.yml (99%) rename catalog/{system => operating-system}/os-windows-nsclient.yml (98%) rename catalog/{system => operating-system}/os-windows-snmp.yml (99%) rename catalog/{hardware => printer}/hw-printer-rfc3805.yml (99%) rename catalog/{application => protocol}/app-ldap.yml (99%) rename catalog/{application => protocol}/app-protocols.yml (99%) rename catalog/{system => protocol}/os-generic-snmp.yml (99%) rename catalog/{hardware => storage}/hw-emc-unity-restapi.yml (99%) rename catalog/{hardware => storage}/hw-hp-msa-xmlapi.yml (99%) rename catalog/{hardware => storage}/hw-ibm-storwize-ssh.yml (99%) rename catalog/{hardware => storage}/hw-netapp-ontap-snmp.yml (99%) rename catalog/{hardware => storage}/hw-purestorage-restapi.yml (99%) rename catalog/{hardware => storage}/hw-qnap-snmp.yml (99%) rename catalog/{hardware => storage}/hw-synology-snmp.yml (99%) rename catalog/{hardware => ups-pdu}/hw-apc-ups-snmp.yml (99%) rename catalog/{hardware => ups-pdu}/hw-ups-rfc1628.yml (99%) rename catalog/{application => virtualization}/app-docker.yml (99%) rename catalog/{application => virtualization}/app-proxmox.yml (99%) rename catalog/{application => virtualization}/app-vmware-esx.yml (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index df16d81..608080f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ 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.11.0 + +### Modifié +- Le catalogue adopte les catégories des connecteurs de supervision Centreon — + `operating-system`, `network`, `storage`, `database`, `virtualization`, `protocol`, + `ups-pdu`, `printer` et les autres — au lieu des trois familles maison. Les packs sont + reclassés et les répertoires renommés en conséquence. + ## 1.10.0 ### Ajouté diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6aba999..74383f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ immédiatement, et une demande de fusion est ouverte après relecture. ```yaml id: app-rabbitmq # minuscules, chiffres et tirets name: RabbitMQ # nom lisible, affiché dans le catalogue -category: application # system | hardware | application +category: applications # une des catégories ci-dessous status: to-verify # verified seulement si éprouvé sur un central réel plugin: centreon_rabbitmq_restapi.pl description: Supervision d'un broker RabbitMQ via son API de management. @@ -57,6 +57,18 @@ services: - {name: WARNING, value: "1000", description: "Seuil warning"} ``` +### Les catégories + +Ce sont celles des connecteurs de supervision Centreon, pour qu'un pack se range là où on +ira le chercher dans la documentation officielle : + +`operating-system`, `network`, `hardware-server`, `storage`, `database`, `applications`, +`virtualization`, `protocol`, `ups-pdu`, `printer`, `sensor`, `cloud`, `toip-voip`, +`blockchain`, `centreon`. + +Le fichier se dépose dans `catalog//.yml`, et le champ `category` porte la +même valeur. + ### Les règles - **Pas de point-virgule** dans une ligne de commande : c'est le séparateur CLAPI, il casserait diff --git a/catalog/application/app-apache.yml b/catalog/applications/app-apache.yml similarity index 99% rename from catalog/application/app-apache.yml rename to catalog/applications/app-apache.yml index 17a5ca2..90660ea 100644 --- a/catalog/application/app-apache.yml +++ b/catalog/applications/app-apache.yml @@ -1,6 +1,6 @@ id: app-apache name: Apache HTTP Server -category: application +category: applications status: verified plugin: centreon_apache_serverstatus.pl description: Supervision d'un serveur Apache via la page mod_status (charge CPU, requetes, slots, temps de reponse). diff --git a/catalog/application/app-elasticsearch.yml b/catalog/applications/app-elasticsearch.yml similarity index 99% rename from catalog/application/app-elasticsearch.yml rename to catalog/applications/app-elasticsearch.yml index 503221a..478a683 100644 --- a/catalog/application/app-elasticsearch.yml +++ b/catalog/applications/app-elasticsearch.yml @@ -1,6 +1,6 @@ id: app-elasticsearch name: Elasticsearch -category: application +category: applications status: to-verify plugin: centreon_elasticsearch_restapi.pl description: Supervision d'un cluster Elasticsearch via son API REST (sante du cluster, noeuds, index). diff --git a/catalog/application/app-nginx.yml b/catalog/applications/app-nginx.yml similarity index 99% rename from catalog/application/app-nginx.yml rename to catalog/applications/app-nginx.yml index 3a379e2..7631061 100644 --- a/catalog/application/app-nginx.yml +++ b/catalog/applications/app-nginx.yml @@ -1,6 +1,6 @@ id: app-nginx name: Nginx -category: application +category: applications status: verified plugin: centreon_nginx_serverstatus.pl description: Supervision d'un serveur Nginx via le module stub_status (connexions, requetes, temps de reponse). diff --git a/catalog/application/app-rabbitmq.yml b/catalog/applications/app-rabbitmq.yml similarity index 99% rename from catalog/application/app-rabbitmq.yml rename to catalog/applications/app-rabbitmq.yml index 8781b07..cdfeac9 100644 --- a/catalog/application/app-rabbitmq.yml +++ b/catalog/applications/app-rabbitmq.yml @@ -1,6 +1,6 @@ id: app-rabbitmq name: RabbitMQ -category: application +category: applications status: to-verify plugin: centreon_rabbitmq_restapi.pl description: Supervision d'un broker RabbitMQ via son API de management (files, noeuds, connexions). diff --git a/catalog/application/app-mongodb.yml b/catalog/database/app-mongodb.yml similarity index 99% rename from catalog/application/app-mongodb.yml rename to catalog/database/app-mongodb.yml index 8a8d7d3..d92b655 100644 --- a/catalog/application/app-mongodb.yml +++ b/catalog/database/app-mongodb.yml @@ -1,6 +1,6 @@ id: app-mongodb name: MongoDB -category: application +category: database status: to-verify plugin: centreon_mongodb.pl description: Supervision d'une instance MongoDB (connexion, operations, taille des bases, replication). diff --git a/catalog/application/app-mssql.yml b/catalog/database/app-mssql.yml similarity index 99% rename from catalog/application/app-mssql.yml rename to catalog/database/app-mssql.yml index 770a8b7..fb4901b 100644 --- a/catalog/application/app-mssql.yml +++ b/catalog/database/app-mssql.yml @@ -1,6 +1,6 @@ id: app-mssql name: Microsoft SQL Server -category: application +category: database status: verified plugin: centreon_mssql.pl description: Supervision d'une instance SQL Server (connexion, taille des bases, sauvegardes, jobs, sessions, verrous). diff --git a/catalog/application/app-mysql.yml b/catalog/database/app-mysql.yml similarity index 99% rename from catalog/application/app-mysql.yml rename to catalog/database/app-mysql.yml index da191c9..f76c0e4 100644 --- a/catalog/application/app-mysql.yml +++ b/catalog/database/app-mysql.yml @@ -1,6 +1,6 @@ id: app-mysql name: MySQL / MariaDB -category: application +category: database status: verified plugin: centreon_mysql.pl description: Supervision d'une instance MySQL ou MariaDB (connexion, requetes, threads, replication, taille des bases). diff --git a/catalog/application/app-oracle.yml b/catalog/database/app-oracle.yml similarity index 99% rename from catalog/application/app-oracle.yml rename to catalog/database/app-oracle.yml index 40d83f5..132bcc6 100644 --- a/catalog/application/app-oracle.yml +++ b/catalog/database/app-oracle.yml @@ -1,6 +1,6 @@ id: app-oracle name: Oracle Database -category: application +category: database status: to-verify plugin: centreon_oracle.pl description: Supervision d'une instance Oracle (connexion, tablespaces, sessions, processus, sauvegardes RMAN). Necessite un client Oracle sur le collecteur. diff --git a/catalog/application/app-postgresql.yml b/catalog/database/app-postgresql.yml similarity index 99% rename from catalog/application/app-postgresql.yml rename to catalog/database/app-postgresql.yml index 26c30b6..c250f38 100644 --- a/catalog/application/app-postgresql.yml +++ b/catalog/database/app-postgresql.yml @@ -1,6 +1,6 @@ id: app-postgresql name: PostgreSQL -category: application +category: database status: verified plugin: centreon_postgres.pl description: Supervision d'une instance PostgreSQL (connexion, sessions, taille des bases, verrous, temps de requete). diff --git a/catalog/application/app-redis.yml b/catalog/database/app-redis.yml similarity index 99% rename from catalog/application/app-redis.yml rename to catalog/database/app-redis.yml index e6b9416..e87efc5 100644 --- a/catalog/application/app-redis.yml +++ b/catalog/database/app-redis.yml @@ -1,6 +1,6 @@ id: app-redis name: Redis -category: application +category: database status: to-verify plugin: centreon_redis_cli.pl description: Supervision d'une instance Redis (clients, memoire, persistance, replication). diff --git a/catalog/hardware/hw-dell-idrac-snmp.yml b/catalog/hardware-server/hw-dell-idrac-snmp.yml similarity index 99% rename from catalog/hardware/hw-dell-idrac-snmp.yml rename to catalog/hardware-server/hw-dell-idrac-snmp.yml index cdfba4c..8bf4fee 100644 --- a/catalog/hardware/hw-dell-idrac-snmp.yml +++ b/catalog/hardware-server/hw-dell-idrac-snmp.yml @@ -1,6 +1,6 @@ id: hw-dell-idrac-snmp name: Serveur Dell (iDRAC SNMP) -category: hardware +category: hardware-server status: verified plugin: centreon_dell_idrac_snmp.pl description: Etat materiel d'un serveur Dell PowerEdge via la carte iDRAC en SNMP (global, alimentations, ventilateurs, temperatures, disques, memoire). diff --git a/catalog/hardware/hw-hp-proliant-snmp.yml b/catalog/hardware-server/hw-hp-proliant-snmp.yml similarity index 99% rename from catalog/hardware/hw-hp-proliant-snmp.yml rename to catalog/hardware-server/hw-hp-proliant-snmp.yml index f9b4f1e..93e9843 100644 --- a/catalog/hardware/hw-hp-proliant-snmp.yml +++ b/catalog/hardware-server/hw-hp-proliant-snmp.yml @@ -1,6 +1,6 @@ id: hw-hp-proliant-snmp name: Serveur HP ProLiant (iLO SNMP) -category: hardware +category: hardware-server status: verified plugin: centreon_hp_proliant_snmp.pl description: Etat materiel d'un serveur HP ProLiant via les agents Insight / iLO en SNMP. diff --git a/catalog/hardware/hw-alcatel-omniswitch-snmp.yml b/catalog/network/hw-alcatel-omniswitch-snmp.yml similarity index 99% rename from catalog/hardware/hw-alcatel-omniswitch-snmp.yml rename to catalog/network/hw-alcatel-omniswitch-snmp.yml index 7694d4b..96c9ee1 100644 --- a/catalog/hardware/hw-alcatel-omniswitch-snmp.yml +++ b/catalog/network/hw-alcatel-omniswitch-snmp.yml @@ -1,6 +1,6 @@ id: hw-alcatel-omniswitch-snmp name: Switch Alcatel OmniSwitch (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_alcatel_omniswitch_snmp.pl description: Supervision d'un commutateur Alcatel-Lucent OmniSwitch en SNMP. diff --git a/catalog/hardware/hw-aruba-instant-snmp.yml b/catalog/network/hw-aruba-instant-snmp.yml similarity index 99% rename from catalog/hardware/hw-aruba-instant-snmp.yml rename to catalog/network/hw-aruba-instant-snmp.yml index 672bdcd..ce003d5 100644 --- a/catalog/hardware/hw-aruba-instant-snmp.yml +++ b/catalog/network/hw-aruba-instant-snmp.yml @@ -1,6 +1,6 @@ id: hw-aruba-instant-snmp name: Bornes wifi Aruba Instant (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_aruba_instant_snmp.pl description: Supervision d'un cluster de bornes wifi Aruba Instant en SNMP (bornes, clients, radios). diff --git a/catalog/hardware/hw-aruba-snmp.yml b/catalog/network/hw-aruba-snmp.yml similarity index 99% rename from catalog/hardware/hw-aruba-snmp.yml rename to catalog/network/hw-aruba-snmp.yml index 4698c6b..8bd70e5 100644 --- a/catalog/hardware/hw-aruba-snmp.yml +++ b/catalog/network/hw-aruba-snmp.yml @@ -1,6 +1,6 @@ id: hw-aruba-snmp name: Switch Aruba (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_aruba_snmp.pl description: Supervision d'un commutateur Aruba en SNMP (CPU, memoire, materiel, interfaces). diff --git a/catalog/hardware/hw-cisco-snmp.yml b/catalog/network/hw-cisco-snmp.yml similarity index 99% rename from catalog/hardware/hw-cisco-snmp.yml rename to catalog/network/hw-cisco-snmp.yml index 72c8150..a1927a0 100644 --- a/catalog/hardware/hw-cisco-snmp.yml +++ b/catalog/network/hw-cisco-snmp.yml @@ -1,6 +1,6 @@ id: hw-cisco-snmp name: Switch / routeur Cisco (SNMP) -category: hardware +category: network status: verified plugin: centreon_cisco_standard_snmp.pl description: Supervision d'un equipement Cisco IOS / IOS-XE en SNMP (CPU, memoire, environnement materiel, interfaces). diff --git a/catalog/hardware/hw-cisco-wlc-snmp.yml b/catalog/network/hw-cisco-wlc-snmp.yml similarity index 99% rename from catalog/hardware/hw-cisco-wlc-snmp.yml rename to catalog/network/hw-cisco-wlc-snmp.yml index bc18e52..33f0532 100644 --- a/catalog/hardware/hw-cisco-wlc-snmp.yml +++ b/catalog/network/hw-cisco-wlc-snmp.yml @@ -1,6 +1,6 @@ id: hw-cisco-wlc-snmp name: Controleur wifi Cisco WLC (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_cisco_wlc_snmp.pl description: Supervision d'un controleur wifi Cisco WLC en SNMP (bornes rattachees, clients, CPU, memoire). diff --git a/catalog/hardware/hw-dell-powerconnect-snmp.yml b/catalog/network/hw-dell-powerconnect-snmp.yml similarity index 99% rename from catalog/hardware/hw-dell-powerconnect-snmp.yml rename to catalog/network/hw-dell-powerconnect-snmp.yml index 35dce34..a76421a 100644 --- a/catalog/hardware/hw-dell-powerconnect-snmp.yml +++ b/catalog/network/hw-dell-powerconnect-snmp.yml @@ -1,6 +1,6 @@ id: hw-dell-powerconnect-snmp name: Switch Dell PowerConnect et N-Series (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_dell_powerconnect_snmp.pl description: Supervision d'un commutateur Dell PowerConnect ou N-Series en SNMP. diff --git a/catalog/hardware/hw-extreme-snmp.yml b/catalog/network/hw-extreme-snmp.yml similarity index 99% rename from catalog/hardware/hw-extreme-snmp.yml rename to catalog/network/hw-extreme-snmp.yml index f56d498..1613b31 100644 --- a/catalog/hardware/hw-extreme-snmp.yml +++ b/catalog/network/hw-extreme-snmp.yml @@ -1,6 +1,6 @@ id: hw-extreme-snmp name: Switch Extreme Networks (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_extreme_snmp.pl description: Supervision d'un commutateur Extreme Networks en SNMP. diff --git a/catalog/hardware/hw-fortinet-fortigate-snmp.yml b/catalog/network/hw-fortinet-fortigate-snmp.yml similarity index 99% rename from catalog/hardware/hw-fortinet-fortigate-snmp.yml rename to catalog/network/hw-fortinet-fortigate-snmp.yml index 39b4a93..94cdf67 100644 --- a/catalog/hardware/hw-fortinet-fortigate-snmp.yml +++ b/catalog/network/hw-fortinet-fortigate-snmp.yml @@ -1,6 +1,6 @@ id: hw-fortinet-fortigate-snmp name: Firewall Fortinet FortiGate (SNMP) -category: hardware +category: network status: verified plugin: centreon_fortinet_fortigate.pl description: Supervision d'un FortiGate en SNMP (CPU, memoire, disque, sessions, tunnels VPN, cluster HA, interfaces). diff --git a/catalog/hardware/hw-hp-procurve-snmp.yml b/catalog/network/hw-hp-procurve-snmp.yml similarity index 99% rename from catalog/hardware/hw-hp-procurve-snmp.yml rename to catalog/network/hw-hp-procurve-snmp.yml index 9de9ca3..e52c5f4 100644 --- a/catalog/hardware/hw-hp-procurve-snmp.yml +++ b/catalog/network/hw-hp-procurve-snmp.yml @@ -1,6 +1,6 @@ id: hw-hp-procurve-snmp name: Switch HP ProCurve et Aruba (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_hp_procurve_snmp.pl description: Supervision d'un commutateur HP ProCurve ou Aruba en SNMP. diff --git a/catalog/hardware/hw-huawei-snmp.yml b/catalog/network/hw-huawei-snmp.yml similarity index 99% rename from catalog/hardware/hw-huawei-snmp.yml rename to catalog/network/hw-huawei-snmp.yml index 23abec2..4bad6ef 100644 --- a/catalog/hardware/hw-huawei-snmp.yml +++ b/catalog/network/hw-huawei-snmp.yml @@ -1,6 +1,6 @@ id: hw-huawei-snmp name: Switch et routeur Huawei (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_huawei_snmp.pl description: Supervision d'un equipement reseau Huawei en SNMP. diff --git a/catalog/hardware/hw-juniper-junos-snmp.yml b/catalog/network/hw-juniper-junos-snmp.yml similarity index 99% rename from catalog/hardware/hw-juniper-junos-snmp.yml rename to catalog/network/hw-juniper-junos-snmp.yml index 4c60f8c..55dacd5 100644 --- a/catalog/hardware/hw-juniper-junos-snmp.yml +++ b/catalog/network/hw-juniper-junos-snmp.yml @@ -1,6 +1,6 @@ id: hw-juniper-junos-snmp name: Juniper JunOS (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_juniper_junos_snmp.pl description: Supervision d'un equipement Juniper sous JunOS en SNMP. Verifier le nom du script (centreon_juniper_junos_snmp.pl) sur l'installation cible. diff --git a/catalog/hardware/hw-mikrotik-snmp.yml b/catalog/network/hw-mikrotik-snmp.yml similarity index 99% rename from catalog/hardware/hw-mikrotik-snmp.yml rename to catalog/network/hw-mikrotik-snmp.yml index fdd61af..2fe1490 100644 --- a/catalog/hardware/hw-mikrotik-snmp.yml +++ b/catalog/network/hw-mikrotik-snmp.yml @@ -1,6 +1,6 @@ id: hw-mikrotik-snmp name: MikroTik RouterOS (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_mikrotik_snmp.pl description: Supervision d'un equipement MikroTik sous RouterOS en SNMP. diff --git a/catalog/hardware/hw-paloalto-snmp.yml b/catalog/network/hw-paloalto-snmp.yml similarity index 99% rename from catalog/hardware/hw-paloalto-snmp.yml rename to catalog/network/hw-paloalto-snmp.yml index 130ad47..85f17a1 100644 --- a/catalog/hardware/hw-paloalto-snmp.yml +++ b/catalog/network/hw-paloalto-snmp.yml @@ -1,6 +1,6 @@ id: hw-paloalto-snmp name: Pare-feu Palo Alto (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_paloalto_snmp.pl description: Supervision d'un pare-feu Palo Alto en SNMP. diff --git a/catalog/hardware/hw-pfsense-snmp.yml b/catalog/network/hw-pfsense-snmp.yml similarity index 99% rename from catalog/hardware/hw-pfsense-snmp.yml rename to catalog/network/hw-pfsense-snmp.yml index f30dceb..c1bd7aa 100644 --- a/catalog/hardware/hw-pfsense-snmp.yml +++ b/catalog/network/hw-pfsense-snmp.yml @@ -1,6 +1,6 @@ id: hw-pfsense-snmp name: Pare-feu pfSense (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_pfsense_snmp.pl description: Supervision d'un pare-feu pfSense en SNMP (CPU, memoire, etat des regles, interfaces). diff --git a/catalog/hardware/hw-ruckus-zonedirector-snmp.yml b/catalog/network/hw-ruckus-zonedirector-snmp.yml similarity index 99% rename from catalog/hardware/hw-ruckus-zonedirector-snmp.yml rename to catalog/network/hw-ruckus-zonedirector-snmp.yml index f3abe86..3ca7dcb 100644 --- a/catalog/hardware/hw-ruckus-zonedirector-snmp.yml +++ b/catalog/network/hw-ruckus-zonedirector-snmp.yml @@ -1,6 +1,6 @@ id: hw-ruckus-zonedirector-snmp name: Controleur wifi Ruckus ZoneDirector (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_ruckus_zonedirector_snmp.pl description: Supervision d'un controleur wifi Ruckus ZoneDirector en SNMP (bornes, clients, systeme). diff --git a/catalog/hardware/hw-stormshield-snmp.yml b/catalog/network/hw-stormshield-snmp.yml similarity index 99% rename from catalog/hardware/hw-stormshield-snmp.yml rename to catalog/network/hw-stormshield-snmp.yml index 529883f..a29f13f 100644 --- a/catalog/hardware/hw-stormshield-snmp.yml +++ b/catalog/network/hw-stormshield-snmp.yml @@ -1,6 +1,6 @@ id: hw-stormshield-snmp name: Pare-feu Stormshield (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_stormshield_snmp.pl description: Supervision d'un pare-feu Stormshield SNS en SNMP. diff --git a/catalog/hardware/hw-ubiquiti-snmp.yml b/catalog/network/hw-ubiquiti-snmp.yml similarity index 99% rename from catalog/hardware/hw-ubiquiti-snmp.yml rename to catalog/network/hw-ubiquiti-snmp.yml index bbfa458..0176191 100644 --- a/catalog/hardware/hw-ubiquiti-snmp.yml +++ b/catalog/network/hw-ubiquiti-snmp.yml @@ -1,6 +1,6 @@ id: hw-ubiquiti-snmp name: Ubiquiti UniFi et EdgeMax (SNMP) -category: hardware +category: network status: to-verify plugin: centreon_ubnt_snmp.pl description: Supervision d'un equipement Ubiquiti en SNMP. diff --git a/catalog/system/os-aix-snmp.yml b/catalog/operating-system/os-aix-snmp.yml similarity index 99% rename from catalog/system/os-aix-snmp.yml rename to catalog/operating-system/os-aix-snmp.yml index c8e2e46..4b8fb6c 100644 --- a/catalog/system/os-aix-snmp.yml +++ b/catalog/operating-system/os-aix-snmp.yml @@ -1,6 +1,6 @@ id: os-aix-snmp name: AIX (SNMP) -category: system +category: operating-system status: to-verify plugin: centreon_aix_snmp.pl description: Supervision d'un serveur AIX via SNMP. Verifier le nom exact du plugin sur la version de centreon-plugins installee. diff --git a/catalog/system/os-freebsd-snmp.yml b/catalog/operating-system/os-freebsd-snmp.yml similarity index 99% rename from catalog/system/os-freebsd-snmp.yml rename to catalog/operating-system/os-freebsd-snmp.yml index 4974e24..260efdd 100644 --- a/catalog/system/os-freebsd-snmp.yml +++ b/catalog/operating-system/os-freebsd-snmp.yml @@ -1,6 +1,6 @@ id: os-freebsd-snmp name: FreeBSD (SNMP) -category: system +category: operating-system status: to-verify plugin: centreon_freebsd_snmp.pl description: Supervision d'un serveur FreeBSD via SNMP. Verifier le nom exact du plugin sur la version de centreon-plugins installee. diff --git a/catalog/system/os-linux-nrpe.yml b/catalog/operating-system/os-linux-nrpe.yml similarity index 99% rename from catalog/system/os-linux-nrpe.yml rename to catalog/operating-system/os-linux-nrpe.yml index 427e141..6cd2467 100644 --- a/catalog/system/os-linux-nrpe.yml +++ b/catalog/operating-system/os-linux-nrpe.yml @@ -1,6 +1,6 @@ id: os-linux-nrpe name: Linux (NRPE) -category: system +category: operating-system status: verified plugin: check_centreon_nrpe description: Supervision Linux par agent NRPE (commandes definies cote client dans nrpe.cfg). diff --git a/catalog/system/os-linux-snmp.yml b/catalog/operating-system/os-linux-snmp.yml similarity index 99% rename from catalog/system/os-linux-snmp.yml rename to catalog/operating-system/os-linux-snmp.yml index 611634c..5da72c0 100644 --- a/catalog/system/os-linux-snmp.yml +++ b/catalog/operating-system/os-linux-snmp.yml @@ -1,6 +1,6 @@ id: os-linux-snmp name: Linux (SNMP) -category: system +category: operating-system status: verified plugin: centreon_linux_snmp.pl description: Supervision d'un serveur Linux via SNMP avec centreon-plugins (CPU, memoire, swap, systemes de fichiers, charge, interfaces, uptime). diff --git a/catalog/system/os-solaris-snmp.yml b/catalog/operating-system/os-solaris-snmp.yml similarity index 99% rename from catalog/system/os-solaris-snmp.yml rename to catalog/operating-system/os-solaris-snmp.yml index 387b62a..dddabf4 100644 --- a/catalog/system/os-solaris-snmp.yml +++ b/catalog/operating-system/os-solaris-snmp.yml @@ -1,6 +1,6 @@ id: os-solaris-snmp name: Solaris (SNMP) -category: system +category: operating-system status: to-verify plugin: centreon_solaris_snmp.pl description: Supervision d'un serveur Solaris via SNMP. Verifier le nom exact du plugin sur la version de centreon-plugins installee. diff --git a/catalog/system/os-windows-nsclient.yml b/catalog/operating-system/os-windows-nsclient.yml similarity index 98% rename from catalog/system/os-windows-nsclient.yml rename to catalog/operating-system/os-windows-nsclient.yml index bf88bac..b503570 100644 --- a/catalog/system/os-windows-nsclient.yml +++ b/catalog/operating-system/os-windows-nsclient.yml @@ -1,6 +1,6 @@ id: os-windows-nsclient name: Windows (NSClient++ / check_nt) -category: system +category: operating-system status: verified plugin: check_nt description: Supervision Windows par l'agent NSClient++ en protocole NSC (check_nt), utile quand SNMP n'est pas ouvert. diff --git a/catalog/system/os-windows-snmp.yml b/catalog/operating-system/os-windows-snmp.yml similarity index 99% rename from catalog/system/os-windows-snmp.yml rename to catalog/operating-system/os-windows-snmp.yml index e229347..f6aadec 100644 --- a/catalog/system/os-windows-snmp.yml +++ b/catalog/operating-system/os-windows-snmp.yml @@ -1,6 +1,6 @@ id: os-windows-snmp name: Windows (SNMP) -category: system +category: operating-system status: verified plugin: centreon_windows_snmp.pl description: Supervision d'un serveur Windows via SNMP (CPU, memoire, disques, services, interfaces, uptime). diff --git a/catalog/hardware/hw-printer-rfc3805.yml b/catalog/printer/hw-printer-rfc3805.yml similarity index 99% rename from catalog/hardware/hw-printer-rfc3805.yml rename to catalog/printer/hw-printer-rfc3805.yml index 5fdaa47..345be2a 100644 --- a/catalog/hardware/hw-printer-rfc3805.yml +++ b/catalog/printer/hw-printer-rfc3805.yml @@ -1,6 +1,6 @@ id: hw-printer-rfc3805 name: Imprimante reseau (RFC 3805) -category: hardware +category: printer status: to-verify plugin: centreon_printer_standard_rfc3805.pl description: Supervision d'une imprimante compatible RFC 3805 (niveaux de consommables, bacs papier, etat general). Verifier les modes disponibles. diff --git a/catalog/application/app-ldap.yml b/catalog/protocol/app-ldap.yml similarity index 99% rename from catalog/application/app-ldap.yml rename to catalog/protocol/app-ldap.yml index c21afe6..f87643f 100644 --- a/catalog/application/app-ldap.yml +++ b/catalog/protocol/app-ldap.yml @@ -1,6 +1,6 @@ id: app-ldap name: Annuaire LDAP -category: application +category: protocol status: to-verify plugin: centreon_ldap.pl description: Supervision d'un annuaire LDAP ou Active Directory (temps de reponse d'une recherche, disponibilite). diff --git a/catalog/application/app-protocols.yml b/catalog/protocol/app-protocols.yml similarity index 99% rename from catalog/application/app-protocols.yml rename to catalog/protocol/app-protocols.yml index 9ee2443..f1b7a0e 100644 --- a/catalog/application/app-protocols.yml +++ b/catalog/protocol/app-protocols.yml @@ -1,6 +1,6 @@ id: app-protocols name: Services reseau standards (HTTP, TCP, DNS, NTP, SSH) -category: application +category: protocol status: verified plugin: check_http description: Sondes generiques basees sur les plugins Nagios livres avec Centreon. Utile pour tout service expose sans pack dedie. diff --git a/catalog/system/os-generic-snmp.yml b/catalog/protocol/os-generic-snmp.yml similarity index 99% rename from catalog/system/os-generic-snmp.yml rename to catalog/protocol/os-generic-snmp.yml index 909dd73..551aa01 100644 --- a/catalog/system/os-generic-snmp.yml +++ b/catalog/protocol/os-generic-snmp.yml @@ -1,6 +1,6 @@ id: os-generic-snmp name: Equipement generique (SNMP standard) -category: system +category: protocol status: verified plugin: centreon_generic_snmp.pl description: Supervision de tout equipement repondant aux MIB standard (HOST-RESOURCES, UCD, IF-MIB). Base de repli quand aucun pack constructeur ne correspond. diff --git a/catalog/hardware/hw-emc-unity-restapi.yml b/catalog/storage/hw-emc-unity-restapi.yml similarity index 99% rename from catalog/hardware/hw-emc-unity-restapi.yml rename to catalog/storage/hw-emc-unity-restapi.yml index da92989..18ddb95 100644 --- a/catalog/hardware/hw-emc-unity-restapi.yml +++ b/catalog/storage/hw-emc-unity-restapi.yml @@ -1,6 +1,6 @@ id: hw-emc-unity-restapi name: Baie Dell EMC Unity (API REST) -category: hardware +category: storage status: to-verify plugin: centreon_emc_unity_restapi.pl description: Supervision d'une baie Dell EMC Unity via son API REST (materiel, pools, disques, alertes). diff --git a/catalog/hardware/hw-hp-msa-xmlapi.yml b/catalog/storage/hw-hp-msa-xmlapi.yml similarity index 99% rename from catalog/hardware/hw-hp-msa-xmlapi.yml rename to catalog/storage/hw-hp-msa-xmlapi.yml index 150baa2..ddfd7ae 100644 --- a/catalog/hardware/hw-hp-msa-xmlapi.yml +++ b/catalog/storage/hw-hp-msa-xmlapi.yml @@ -1,6 +1,6 @@ id: hw-hp-msa-xmlapi name: Baie HPE MSA et P2000 (API XML) -category: hardware +category: storage status: to-verify plugin: centreon_hp_p2000_xmlapi.pl description: Supervision d'une baie HPE MSA ou P2000 via son API XML (materiel, volumes, disques). diff --git a/catalog/hardware/hw-ibm-storwize-ssh.yml b/catalog/storage/hw-ibm-storwize-ssh.yml similarity index 99% rename from catalog/hardware/hw-ibm-storwize-ssh.yml rename to catalog/storage/hw-ibm-storwize-ssh.yml index e3030a5..a44f923 100644 --- a/catalog/hardware/hw-ibm-storwize-ssh.yml +++ b/catalog/storage/hw-ibm-storwize-ssh.yml @@ -1,6 +1,6 @@ id: hw-ibm-storwize-ssh name: Baie IBM Storwize et FlashSystem (SSH) -category: hardware +category: storage status: to-verify plugin: centreon_ibm_storwize_ssh.pl description: Supervision d'une baie IBM Storwize ou FlashSystem par SSH (materiel, pools, evenements). diff --git a/catalog/hardware/hw-netapp-ontap-snmp.yml b/catalog/storage/hw-netapp-ontap-snmp.yml similarity index 99% rename from catalog/hardware/hw-netapp-ontap-snmp.yml rename to catalog/storage/hw-netapp-ontap-snmp.yml index 6f4a8e7..d172561 100644 --- a/catalog/hardware/hw-netapp-ontap-snmp.yml +++ b/catalog/storage/hw-netapp-ontap-snmp.yml @@ -1,6 +1,6 @@ id: hw-netapp-ontap-snmp name: Baie NetApp ONTAP (SNMP) -category: hardware +category: storage status: to-verify plugin: centreon_netapp_ontap_snmp.pl description: Supervision d'une baie NetApp ONTAP en SNMP (etat global, volumes, disques, replication). Verifier les modes selon la version ONTAP. diff --git a/catalog/hardware/hw-purestorage-restapi.yml b/catalog/storage/hw-purestorage-restapi.yml similarity index 99% rename from catalog/hardware/hw-purestorage-restapi.yml rename to catalog/storage/hw-purestorage-restapi.yml index b60ec59..5f65e1d 100644 --- a/catalog/hardware/hw-purestorage-restapi.yml +++ b/catalog/storage/hw-purestorage-restapi.yml @@ -1,6 +1,6 @@ id: hw-purestorage-restapi name: Baie Pure Storage (API REST) -category: hardware +category: storage status: to-verify plugin: centreon_purestorage_restapi.pl description: Supervision d'une baie Pure Storage via son API REST (materiel, occupation, alertes). diff --git a/catalog/hardware/hw-qnap-snmp.yml b/catalog/storage/hw-qnap-snmp.yml similarity index 99% rename from catalog/hardware/hw-qnap-snmp.yml rename to catalog/storage/hw-qnap-snmp.yml index 262a74f..ee5b8e6 100644 --- a/catalog/hardware/hw-qnap-snmp.yml +++ b/catalog/storage/hw-qnap-snmp.yml @@ -1,6 +1,6 @@ id: hw-qnap-snmp name: NAS QNAP (SNMP) -category: hardware +category: storage status: to-verify plugin: centreon_qnap_snmp.pl description: Supervision d'un NAS QNAP en SNMP (disques, volumes, ventilateurs, temperatures). diff --git a/catalog/hardware/hw-synology-snmp.yml b/catalog/storage/hw-synology-snmp.yml similarity index 99% rename from catalog/hardware/hw-synology-snmp.yml rename to catalog/storage/hw-synology-snmp.yml index 465f808..1347c00 100644 --- a/catalog/hardware/hw-synology-snmp.yml +++ b/catalog/storage/hw-synology-snmp.yml @@ -1,6 +1,6 @@ id: hw-synology-snmp name: NAS Synology (SNMP) -category: hardware +category: storage status: to-verify plugin: centreon_synology_snmp.pl description: Supervision d'un NAS Synology en SNMP (composants materiels, CPU, memoire, volumes). Verifier les modes selon la version DSM. diff --git a/catalog/hardware/hw-apc-ups-snmp.yml b/catalog/ups-pdu/hw-apc-ups-snmp.yml similarity index 99% rename from catalog/hardware/hw-apc-ups-snmp.yml rename to catalog/ups-pdu/hw-apc-ups-snmp.yml index 192a275..87446df 100644 --- a/catalog/hardware/hw-apc-ups-snmp.yml +++ b/catalog/ups-pdu/hw-apc-ups-snmp.yml @@ -1,6 +1,6 @@ id: hw-apc-ups-snmp name: Onduleur APC (SNMP) -category: hardware +category: ups-pdu status: to-verify plugin: centreon_apc_ups_snmp.pl description: Supervision d'un onduleur APC en SNMP (batterie, lignes d'entree et de sortie). Verifier les modes disponibles selon le modele. diff --git a/catalog/hardware/hw-ups-rfc1628.yml b/catalog/ups-pdu/hw-ups-rfc1628.yml similarity index 99% rename from catalog/hardware/hw-ups-rfc1628.yml rename to catalog/ups-pdu/hw-ups-rfc1628.yml index 7b0db7c..ed5a6fe 100644 --- a/catalog/hardware/hw-ups-rfc1628.yml +++ b/catalog/ups-pdu/hw-ups-rfc1628.yml @@ -1,6 +1,6 @@ id: hw-ups-rfc1628 name: Onduleur standard (RFC 1628) -category: hardware +category: ups-pdu status: to-verify plugin: centreon_ups_standard_rfc1628_snmp.pl description: Supervision de tout onduleur respectant la MIB standard UPS-MIB. Repli utile quand aucun pack constructeur ne correspond. diff --git a/catalog/application/app-docker.yml b/catalog/virtualization/app-docker.yml similarity index 99% rename from catalog/application/app-docker.yml rename to catalog/virtualization/app-docker.yml index 942f12f..91f60f1 100644 --- a/catalog/application/app-docker.yml +++ b/catalog/virtualization/app-docker.yml @@ -1,6 +1,6 @@ id: app-docker name: Docker (API REST) -category: application +category: virtualization status: to-verify plugin: centreon_docker_restapi.pl description: Supervision d'un hote Docker via son API REST (etat des conteneurs, consommation CPU et memoire). Verifier le nom du plugin selon la version installee. diff --git a/catalog/application/app-proxmox.yml b/catalog/virtualization/app-proxmox.yml similarity index 99% rename from catalog/application/app-proxmox.yml rename to catalog/virtualization/app-proxmox.yml index c0dea69..f02e091 100644 --- a/catalog/application/app-proxmox.yml +++ b/catalog/virtualization/app-proxmox.yml @@ -1,6 +1,6 @@ id: app-proxmox name: Proxmox VE (API REST) -category: application +category: virtualization status: to-verify plugin: centreon_proxmox_ve_api.pl description: Supervision d'un cluster Proxmox VE via son API REST (noeuds, machines virtuelles, stockage, quorum). diff --git a/catalog/application/app-vmware-esx.yml b/catalog/virtualization/app-vmware-esx.yml similarity index 99% rename from catalog/application/app-vmware-esx.yml rename to catalog/virtualization/app-vmware-esx.yml index 484d8bf..4767eb1 100644 --- a/catalog/application/app-vmware-esx.yml +++ b/catalog/virtualization/app-vmware-esx.yml @@ -1,6 +1,6 @@ id: app-vmware-esx name: VMware ESXi (connecteur Centreon VMware) -category: application +category: virtualization status: to-verify plugin: centreon_vmware_connector_client.pl description: Supervision d'un hote ESXi via le connecteur Centreon VMware. Le connecteur doit etre installe et configure avec l'acces vCenter. diff --git a/enclume/catalog.py b/enclume/catalog.py index 60b9a44..1acba2d 100644 --- a/enclume/catalog.py +++ b/enclume/catalog.py @@ -16,10 +16,25 @@ from typing import Any import yaml +# Les categories sont celles des connecteurs de supervision Centreon : un pack +# Enclume se range la ou l'utilisateur ira le chercher dans la documentation +# officielle. L'ordre est celui de l'affichage. CATEGORIES = { - "system": "Systemes d'exploitation", - "hardware": "Materiel", - "application": "Applications", + "operating-system": "Systemes d'exploitation", + "network": "Reseau", + "hardware-server": "Serveurs", + "storage": "Stockage", + "database": "Bases de donnees", + "applications": "Applications", + "virtualization": "Virtualisation", + "protocol": "Protocoles", + "ups-pdu": "Onduleurs et PDU", + "printer": "Imprimantes", + "sensor": "Capteurs", + "cloud": "Cloud", + "toip-voip": "ToIP et VoIP", + "blockchain": "Blockchain", + "centreon": "Centreon", } @@ -126,7 +141,7 @@ class Pack: return cls( id=str(raw["id"]).strip(), name=str(raw["name"]).strip(), - category=str(raw.get("category", "system")).strip(), + category=str(raw.get("category", "applications")).strip(), description=str(raw.get("description", "")), plugin=str(raw.get("plugin", "")), status=str(raw.get("status", "to-verify")), diff --git a/tests/test_generation.py b/tests/test_generation.py index 43d9310..824f3bc 100644 --- a/tests/test_generation.py +++ b/tests/test_generation.py @@ -150,3 +150,21 @@ def test_chaque_pack_produit_un_plan_valide(): if erreurs: fautifs[pack.id] = erreurs assert not fautifs, fautifs + + +def test_les_categories_sont_celles_de_centreon(): + """Un pack doit se ranger la ou on ira le chercher dans la documentation Centreon.""" + from enclume.catalog import CATEGORIES + + catalogue = Catalog("catalog") + inconnues = {p.id: p.category for p in catalogue.packs.values() if p.category not in CATEGORIES} + assert not inconnues, inconnues + + +def test_le_repertoire_correspond_a_la_categorie(): + """Les soumissions ecrivent dans catalog// : l'arborescence doit suivre.""" + import os + + for pack in Catalog("catalog").packs.values(): + repertoire = os.path.basename(os.path.dirname(pack.source_file)) + assert repertoire == pack.category, f"{pack.id} : {repertoire} != {pack.category}" diff --git a/tests/test_services.py b/tests/test_services.py index be0183b..6efd5cd 100644 --- a/tests/test_services.py +++ b/tests/test_services.py @@ -15,7 +15,7 @@ import pytest PACK_VALIDE = """ id: app-rabbitmq name: RabbitMQ -category: application +category: applications status: to-verify plugin: centreon_rabbitmq_restapi.pl description: Supervision d'un broker RabbitMQ via son API de management. @@ -237,7 +237,7 @@ def test_publication_ouvre_une_demande_de_fusion(app, monkeypatch): assert resultat["url_pr"].endswith("/pulls/7") creation, demande = appels - assert creation[1].endswith("catalog/application/app-rabbitmq.yml") + assert creation[1].endswith("catalog/applications/app-rabbitmq.yml") assert creation[2]["new_branch"].startswith("pack/app-rabbitmq-") assert demande[2]["head"] == creation[2]["new_branch"] assert demande[2]["base"] == "main"