diff --git a/CHANGELOG.md b/CHANGELOG.md index 19671e8..08b0042 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # CHANGELOG +## v0.2 + +POC mock-first fonctionnelle. + +Ajouts et corrections : + +- ajout d'un plugin mock `check_life_noc_mock.sh` +- ajout d'une commande Icinga `check_life_noc_mock` +- complétion du template `service_echeance` +- enrichissement de la génération des services avec `mock_state` et `mock_message` +- comportement par défaut fixé à `OK` +- conservation des métadonnées d'échéance dans les services générés +- ajout d'un vrai rôle Ansible `life_noc` +- génération automatique des artefacts sur l'hôte cible +- validation Icinga avant reload +- documentation conceptuelle et architecturale complétée + ## v0.1 Initialisation du projet Life-NOC diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..14fda4a --- /dev/null +++ b/Makefile @@ -0,0 +1,100 @@ +SHELL := /bin/bash +.DEFAULT_GOAL := help + +PYTHON ?= python3 +ANSIBLE_PLAYBOOK ?= ansible-playbook +INVENTORY ?= ansible/inventory +PLAYBOOK ?= ansible/deploy_life_noc.yml +ARCHIVE ?= life-noc-poc-mock-first.zip +PROJECT_NAME ?= life-noc + +GENERATORS := scripts/generate_services.py scripts/generate_bpm.py +CHECKS := checks/check_life_noc_mock.sh checks/check_echeance_vie.sh +ICINGA_FILES := $(wildcard icinga/commands/*.conf) $(wildcard icinga/hosts/*.conf) $(wildcard icinga/templates/*.conf) $(wildcard icinga/services/*.conf) + +.PHONY: help all generate regen services bpm validate validate-yaml validate-python validate-shell validate-generated check mock-ok mock-warning mock-critical clean deploy deploy-no-bpm deploy-with-bpm package inventory-example info + +help: + @echo "Life-NOC - cibles disponibles" + @echo + @echo " make generate Génère services Icinga + BPM" + @echo " make regen Alias de generate" + @echo " make validate Valide YAML, Python, shell et artefacts générés" + @echo " make check Génère puis valide" + @echo " make mock-ok Teste la sonde mock en état OK" + @echo " make mock-warning Teste la sonde mock en état WARNING" + @echo " make mock-critical Teste la sonde mock en état CRITICAL" + @echo " make deploy Déploie via Ansible (BPM désactivé)" + @echo " make deploy-with-bpm Déploie via Ansible avec BPM activé" + @echo " make package Crée une archive zip du dépôt" + @echo " make clean Supprime l'archive générée" + @echo " make info Affiche les variables utiles" + @echo + @echo "Variables surchargables : INVENTORY=..., PLAYBOOK=..., ARCHIVE=..." + +all: check + +regen: generate + +generate: services bpm + +services: domains.yaml scripts/generate_services.py + $(PYTHON) scripts/generate_services.py + +bpm: domains.yaml scripts/generate_bpm.py + $(PYTHON) scripts/generate_bpm.py + +validate: validate-yaml validate-python validate-shell validate-generated + +validate-yaml: domains.yaml + @$(PYTHON) -c 'import yaml, pathlib; p = pathlib.Path("domains.yaml"); data = yaml.safe_load(p.read_text(encoding="utf-8")); assert isinstance(data, dict) and isinstance(data.get("domains"), dict), "domains.yaml invalide: clé racine domains requise"; print("YAML valide: domains.yaml")' + +validate-python: $(GENERATORS) + @$(PYTHON) -m py_compile $(GENERATORS) + @echo "Python OK" + +validate-shell: $(CHECKS) + @bash -n $(CHECKS) + @echo "Shell OK" + +validate-generated: $(ICINGA_FILES) bpm/life-noc.json + @grep -R 'check_life_noc_mock' icinga/templates icinga/commands icinga/services >/dev/null + @$(PYTHON) -c 'import json, pathlib; p = pathlib.Path("bpm/life-noc.json"); data = json.loads(p.read_text(encoding="utf-8")); assert isinstance(data.get("processes"), list) and data["processes"], "bpm/life-noc.json invalide: processes absent ou vide"; print("Artefacts générés valides")' + +check: generate validate + +mock-ok: + @bash checks/check_life_noc_mock.sh --state OK --message "Sous contrôle" --item-name "demo" --date "2026-03-13" + +mock-warning: + @bash checks/check_life_noc_mock.sh --state WARNING --message "Attention requise" --item-name "demo" --date "2026-03-13"; test $$? -eq 1 + +mock-critical: + @bash checks/check_life_noc_mock.sh --state CRITICAL --message "Action requise" --item-name "demo" --date "2026-03-13"; test $$? -eq 2 + +deploy: check + $(ANSIBLE_PLAYBOOK) -i $(INVENTORY) $(PLAYBOOK) -e life_noc_bpm_deploy_enabled=false + +deploy-no-bpm: deploy + +deploy-with-bpm: check + $(ANSIBLE_PLAYBOOK) -i $(INVENTORY) $(PLAYBOOK) -e life_noc_bpm_deploy_enabled=true + +package: check + @rm -f $(ARCHIVE) + @zip -qr $(ARCHIVE) . -x '*.git*' -x '__pycache__/*' -x '*.pyc' -x '$(ARCHIVE)' + @echo "Archive créée: $(ARCHIVE)" + +clean: + rm -f $(ARCHIVE) + +inventory-example: + @echo "Copier ansible/inventory.example vers ansible/inventory puis ajuster les hôtes." + +info: + @echo "PROJECT_NAME=$(PROJECT_NAME)" + @echo "PYTHON=$(PYTHON)" + @echo "ANSIBLE_PLAYBOOK=$(ANSIBLE_PLAYBOOK)" + @echo "INVENTORY=$(INVENTORY)" + @echo "PLAYBOOK=$(PLAYBOOK)" + @echo "ARCHIVE=$(ARCHIVE)" diff --git a/README.md b/README.md index 7840f24..29ffd00 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,135 @@ -## Origine du projet +# Life-NOC -Le concept Life-NOC est né d’une réflexion sur la surcharge mentale produite par la complexité du monde moderne. +Life-NOC applique la logique d'un centre d'opérations (NOC) à la vie quotidienne. -L’idée centrale est d’appliquer les principes de supervision des centres d’opérations (NOC) à la gestion du quotidien : +Le but du projet est de transformer la charge mentale invisible en état observable, afin de savoir rapidement ce qui est sous contrôle, ce qui approche d'une échéance et ce qui mérite de l'attention. -- transformer la charge mentale invisible en état observable. +## État actuel du dépôt -Le projet est développé et partagé par Chezlepro Inc. afin d’aider les personnes qui souhaitent retrouver de la clarté et de la sérénité dans leur organisation personnelle. \ No newline at end of file +Cette version est une **POC fonctionnelle mock-first**. + +Cela signifie que : + +- la structure métier est réelle ; +- les domaines et éléments de vie sont décrits dans `domains.yaml` ; +- les services Icinga sont générés automatiquement ; +- le BPM est généré automatiquement ; +- les sondes sont **mockées** par défaut et retournent **OK** tant qu'aucun état simulé n'est forcé. + +Autrement dit, la POC valide : + +- le modèle déclaratif ; +- la génération des artefacts ; +- le déploiement automatisé par Ansible ; +- la visualisation Icinga/BPM ; +- le remplacement futur des mocks par de vraies sondes. + +## Structure du dépôt + +```text +life-noc/ +├── ansible/ +│ ├── deploy_life_noc.yml +│ └── roles/life_noc/ +├── bpm/ +├── checks/ +├── docs/ +├── icinga/ +│ ├── commands/ +│ ├── hosts/ +│ ├── services/ +│ └── templates/ +├── scripts/ +└── domains.yaml +``` + +## Source of truth + +Le fichier central est : + +- `domains.yaml` + +Chaque entrée décrit un élément Life-NOC avec : + +- `name` : identifiant lisible +- `date` : métadonnée d'échéance ou de repère +- `notes` : contexte humain +- `mock_state` : état simulé (`OK`, `WARNING`, `CRITICAL`) — optionnel +- `mock_message` : message simulé — optionnel + +Par défaut : + +- `mock_state = OK` +- `mock_message = Sous contrôle` + +## Génération + +### Générer les services Icinga + +```bash +python3 scripts/generate_services.py +``` + +### Générer le BPM + +```bash +python3 scripts/generate_bpm.py +``` + + +## Makefile + +Le dépôt fournit un `Makefile` pour les gestes courants. + +Exemples : + +```bash +make generate +make validate +make check +make deploy +make deploy-with-bpm +make package +``` + +```bash +make help +``` + +affiche la liste complète des cibles disponibles. + +## Déploiement Ansible + +Le déploiement repose sur le rôle `life_noc`. + +Exemple : + +```bash +cd ansible +ansible-playbook -i inventory deploy_life_noc.yml +``` + +Variables importantes : + +- `life_noc_project_root` : chemin de déploiement du projet sur l'hôte cible +- `life_noc_icinga_conf_root` : racine de configuration Icinga pour Life-NOC +- `life_noc_plugin_dir` : répertoire des plugins Icinga +- `life_noc_validate_icinga` : valide la configuration avant reload +- `life_noc_reload_icinga` : recharge Icinga après déploiement +- `life_noc_bpm_deploy_enabled` : active le déploiement BPM vers le module Icinga Web 2 +- `life_noc_bpm_target_file` : destination du fichier BPM généré + +## Philosophie de cette POC + +Cette POC ne prétend pas encore mesurer le réel. + +Elle sert à construire proprement : + +- l'ossature du système ; +- la hiérarchie des domaines ; +- les conventions de nommage ; +- la chaîne de génération ; +- le déploiement ; +- l'intégration visuelle Icinga/BPM. + +Les vraies sondes viendront plus tard, en remplacement progressif des mocks. diff --git a/ansible/deploy_life_noc.yml b/ansible/deploy_life_noc.yml index a06a702..40b79cc 100644 --- a/ansible/deploy_life_noc.yml +++ b/ansible/deploy_life_noc.yml @@ -1,5 +1,5 @@ - hosts: icinga - become: yes + become: true roles: - life_noc diff --git a/ansible/inventory.example b/ansible/inventory.example new file mode 100644 index 0000000..7735e91 --- /dev/null +++ b/ansible/inventory.example @@ -0,0 +1,2 @@ +[icinga] +localhost ansible_connection=local diff --git a/ansible/roles/life_noc/defaults/main.yml b/ansible/roles/life_noc/defaults/main.yml new file mode 100644 index 0000000..c4d22fd --- /dev/null +++ b/ansible/roles/life_noc/defaults/main.yml @@ -0,0 +1,9 @@ +life_noc_project_root: /opt/life-noc +life_noc_icinga_conf_root: /etc/icinga2/conf.d/life-noc +life_noc_plugin_dir: /usr/lib/nagios/plugins +life_noc_validate_icinga: true +life_noc_reload_icinga: true +life_noc_bpm_deploy_enabled: false +life_noc_bpm_target_file: /var/lib/icingaweb2/modules/bpm/config/life-noc.json +life_noc_owner: root +life_noc_group: root diff --git a/ansible/roles/life_noc/handlers/main.yml b/ansible/roles/life_noc/handlers/main.yml new file mode 100644 index 0000000..cd19a24 --- /dev/null +++ b/ansible/roles/life_noc/handlers/main.yml @@ -0,0 +1,11 @@ +- name: validate icinga + ansible.builtin.command: icinga2 daemon -C + when: life_noc_validate_icinga | bool + listen: validate and reload icinga + +- name: reload icinga + ansible.builtin.service: + name: icinga2 + state: reloaded + when: life_noc_reload_icinga | bool + listen: validate and reload icinga diff --git a/ansible/roles/life_noc/tasks/main.yml b/ansible/roles/life_noc/tasks/main.yml index 197185a..b671ae0 100644 --- a/ansible/roles/life_noc/tasks/main.yml +++ b/ansible/roles/life_noc/tasks/main.yml @@ -1,15 +1,124 @@ -- name: installer script check - copy: - src: check_echeance_vie.sh - dest: /usr/lib/nagios/plugins/check_echeance_vie.sh - mode: '0755' +- name: install minimal dependencies + ansible.builtin.package: + name: + - python3 + - python3-yaml + state: present -- name: déployer configuration icinga - copy: - src: ../../icinga/ - dest: /etc/icinga2/conf.d/life-noc/ +- name: create project root + ansible.builtin.file: + path: "{{ life_noc_project_root }}" + state: directory + owner: "{{ life_noc_owner }}" + group: "{{ life_noc_group }}" + mode: "0755" -- name: recharger icinga - service: - name: icinga2 - state: reloaded +- name: copy project files + ansible.builtin.copy: + src: "{{ playbook_dir }}/../" + dest: "{{ life_noc_project_root }}/" + owner: "{{ life_noc_owner }}" + group: "{{ life_noc_group }}" + +- name: ensure icinga config tree exists + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: root + group: root + mode: "0755" + loop: + - "{{ life_noc_icinga_conf_root }}" + - "{{ life_noc_icinga_conf_root }}/commands" + - "{{ life_noc_icinga_conf_root }}/hosts" + - "{{ life_noc_icinga_conf_root }}/services" + - "{{ life_noc_icinga_conf_root }}/templates" + +- name: generate icinga services from domains + ansible.builtin.command: python3 scripts/generate_services.py + args: + chdir: "{{ life_noc_project_root }}" + +- name: generate bpm from domains + ansible.builtin.command: python3 scripts/generate_bpm.py + args: + chdir: "{{ life_noc_project_root }}" + +- name: deploy icinga commands + ansible.builtin.copy: + src: "{{ life_noc_project_root }}/icinga/commands/" + dest: "{{ life_noc_icinga_conf_root }}/commands/" + remote_src: true + owner: root + group: root + mode: "0644" + notify: validate and reload icinga + +- name: deploy icinga hosts + ansible.builtin.copy: + src: "{{ life_noc_project_root }}/icinga/hosts/" + dest: "{{ life_noc_icinga_conf_root }}/hosts/" + remote_src: true + owner: root + group: root + mode: "0644" + notify: validate and reload icinga + +- name: deploy icinga templates + ansible.builtin.copy: + src: "{{ life_noc_project_root }}/icinga/templates/" + dest: "{{ life_noc_icinga_conf_root }}/templates/" + remote_src: true + owner: root + group: root + mode: "0644" + notify: validate and reload icinga + +- name: deploy icinga services + ansible.builtin.copy: + src: "{{ life_noc_project_root }}/icinga/services/" + dest: "{{ life_noc_icinga_conf_root }}/services/" + remote_src: true + owner: root + group: root + mode: "0644" + notify: validate and reload icinga + +- name: install mock plugin + ansible.builtin.copy: + src: "{{ life_noc_project_root }}/checks/check_life_noc_mock.sh" + dest: "{{ life_noc_plugin_dir }}/check_life_noc_mock.sh" + remote_src: true + owner: root + group: root + mode: "0755" + notify: validate and reload icinga + +- name: install compatibility wrapper plugin + ansible.builtin.copy: + src: "{{ life_noc_project_root }}/checks/check_echeance_vie.sh" + dest: "{{ life_noc_plugin_dir }}/check_echeance_vie.sh" + remote_src: true + owner: root + group: root + mode: "0755" + notify: validate and reload icinga + +- name: ensure bpm destination directory exists + ansible.builtin.file: + path: "{{ life_noc_bpm_target_file | dirname }}" + state: directory + owner: root + group: root + mode: "0755" + when: life_noc_bpm_deploy_enabled | bool + +- name: deploy bpm json + ansible.builtin.copy: + src: "{{ life_noc_project_root }}/bpm/life-noc.json" + dest: "{{ life_noc_bpm_target_file }}" + remote_src: true + owner: root + group: root + mode: "0644" + when: life_noc_bpm_deploy_enabled | bool diff --git a/checks/check_echeance_vie.sh b/checks/check_echeance_vie.sh old mode 100644 new mode 100755 index 26eabac..edd433d --- a/checks/check_echeance_vie.sh +++ b/checks/check_echeance_vie.sh @@ -1,24 +1,5 @@ #!/bin/bash - -DATE=$1 -WARN=$2 -CRIT=$3 - -NOW=$(date +%s) -DUE=$(date -d "$DATE" +%s) - -DELTA=$((DUE - NOW)) -DAYS=$((DELTA / 86400)) - -if [ "$DAYS" -le "$CRIT" ]; then - echo "CRITICAL - échéance imminente" - exit 2 -fi - -if [ "$DAYS" -le "$WARN" ]; then - echo "WARNING - échéance proche" - exit 1 -fi - -echo "OK - sous contrôle" -exit 0 +# Compatibilité transitoire. +# Cette ancienne sonde d'échéance est conservée comme wrapper vers la sonde mock. +SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) +exec "$SCRIPT_DIR/check_life_noc_mock.sh" "$@" diff --git a/checks/check_life_noc_mock.sh b/checks/check_life_noc_mock.sh new file mode 100755 index 0000000..d13b8a5 --- /dev/null +++ b/checks/check_life_noc_mock.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -u + +STATE="OK" +MESSAGE="Sous contrôle" +ITEM_NAME="" +DATE_ECHEANCE="" + +while [ "$#" -gt 0 ]; do + case "$1" in + --state) + STATE="$2" + shift 2 + ;; + --message) + MESSAGE="$2" + shift 2 + ;; + --item-name) + ITEM_NAME="$2" + shift 2 + ;; + --date) + DATE_ECHEANCE="$2" + shift 2 + ;; + *) + echo "UNKNOWN - argument non reconnu: $1" + exit 3 + ;; + esac +done + +STATE_UPPER=$(printf '%s' "$STATE" | tr '[:lower:]' '[:upper:]') +OUTPUT_SUFFIX="" + +[ -n "$ITEM_NAME" ] && OUTPUT_SUFFIX="$OUTPUT_SUFFIX | item=$ITEM_NAME" +[ -n "$DATE_ECHEANCE" ] && OUTPUT_SUFFIX="$OUTPUT_SUFFIX date=$DATE_ECHEANCE" + +case "$STATE_UPPER" in + OK) + echo "OK - $MESSAGE$OUTPUT_SUFFIX" + exit 0 + ;; + WARNING) + echo "WARNING - $MESSAGE$OUTPUT_SUFFIX" + exit 1 + ;; + CRITICAL) + echo "CRITICAL - $MESSAGE$OUTPUT_SUFFIX" + exit 2 + ;; + *) + echo "UNKNOWN - état mock invalide: $STATE" + exit 3 + ;; +esac diff --git a/docs/architecture.md b/docs/architecture.md index e69de29..8e36a6c 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -0,0 +1,85 @@ +# Architecture + +## Vue d'ensemble + +Le dépôt repose sur une architecture déclarative simple : + +```text +domains.yaml + ├── scripts/generate_services.py -> icinga/services/*.conf + └── scripts/generate_bpm.py -> bpm/life-noc.json +``` + +Le déploiement Ansible transfère le projet sur l'hôte Icinga, régénère les artefacts, installe le plugin mock, valide la configuration puis recharge Icinga. + +## Composants + +### 1. `domains.yaml` + +Source de vérité métier. + +Chaque domaine contient une liste d'éléments. Chaque élément peut inclure : + +- `name` +- `date` +- `notes` +- `notes_url` +- `action_url` +- `mock_state` +- `mock_message` + +### 2. `scripts/generate_services.py` + +Produit un fichier `.conf` par domaine pour Icinga. + +Les services générés : + +- importent le template `service_echeance` ; +- conservent les métadonnées utiles ; +- définissent un comportement mock par défaut. + +### 3. `checks/check_life_noc_mock.sh` + +Plugin de sonde mockée. + +Il accepte un état simulé et un message simulé. + +Mappage : + +- `OK` -> code 0 +- `WARNING` -> code 1 +- `CRITICAL` -> code 2 +- autre valeur -> `UNKNOWN` + +### 4. `icinga/templates/service_echeance.conf` + +Template de service par défaut pour les éléments Life-NOC. + +Il référence le check mock et fournit des valeurs par défaut cohérentes. + +### 5. `scripts/generate_bpm.py` + +Construit le BPM à partir du même modèle YAML afin de conserver la cohérence de la hiérarchie. + +### 6. `ansible/roles/life_noc` + +Rôle de déploiement automatisé. + +Responsabilités : + +- copier le projet ; +- installer les dépendances Python minimales ; +- générer les services Icinga ; +- générer le BPM ; +- déployer la configuration Icinga ; +- installer le plugin mock ; +- valider Icinga ; +- recharger Icinga. + +## Principes de conception + +- une seule source de vérité ; +- génération automatique plutôt que duplication ; +- mocks explicites plutôt que fausse logique réelle ; +- déploiement reproductible ; +- remplacement futur progressif des mocks. diff --git a/docs/concept.md b/docs/concept.md index e69de29..5a557f0 100644 --- a/docs/concept.md +++ b/docs/concept.md @@ -0,0 +1,52 @@ +# Concept Life-NOC + +Life-NOC transpose la logique d'un NOC à la vie réelle. + +## Intention + +Le projet vise à réduire la charge mentale en rendant visibles des éléments qui, autrement, encombrent la mémoire, l'attention et la motivation. + +L'idée n'est pas de transformer la vie en machine bureaucratique. + +L'idée est de disposer d'un tableau de bord qui permet de répondre rapidement à trois questions : + +- Qu'est-ce qui est sous contrôle ? +- Qu'est-ce qui approche d'une limite ? +- Qu'est-ce qui exige une action ? + +## Principe + +Chaque élément de vie important devient un service observable. + +Exemples : + +- renouvellement d'un document ; +- entretien d'un équipement ; +- revue périodique ; +- vérification financière ; +- rituel d'organisation ; +- tâche de résilience. + +Ces éléments sont regroupés en domaines, puis agrégés dans un BPM de type "worst" afin de faire remonter les points de tension. + +## Statuts + +Dans la POC actuelle, les états sont simulés : + +- `OK` +- `WARNING` +- `CRITICAL` + +Par défaut, tout est `OK`. + +Cela permet de construire et tester tout le système sans dépendre immédiatement de vraies sondes. + +## Évolution prévue + +Le chemin prévu est le suivant : + +1. modèle stable dans `domains.yaml` ; +2. génération Icinga et BPM ; +3. déploiement automatisé ; +4. validation ergonomique et structurelle ; +5. remplacement progressif des mocks par des sondes réelles. diff --git a/icinga/commands/check_echeance_vie.conf b/icinga/commands/check_echeance_vie.conf index 29faf2c..891a985 100644 --- a/icinga/commands/check_echeance_vie.conf +++ b/icinga/commands/check_echeance_vie.conf @@ -3,11 +3,10 @@ object CheckCommand "check_echeance_vie" { command = [ PluginDir + "/check_echeance_vie.sh" ] arguments = { - + "--state" = "$mock_state$" + "--message" = "$mock_message$" + "--item-name" = "$service.name$" "--date" = "$date_echeance$" - "--warn" = "$warning_days$" - "--crit" = "$critical_days$" - } } diff --git a/icinga/commands/check_life_noc_mock.conf b/icinga/commands/check_life_noc_mock.conf new file mode 100644 index 0000000..980cb37 --- /dev/null +++ b/icinga/commands/check_life_noc_mock.conf @@ -0,0 +1,12 @@ +object CheckCommand "check_life_noc_mock" { + + command = [ PluginDir + "/check_life_noc_mock.sh" ] + + arguments = { + "--state" = "$mock_state$" + "--message" = "$mock_message$" + "--item-name" = "$service.name$" + "--date" = "$date_echeance$" + } + +} diff --git a/icinga/services/actifs-chezlepro.conf b/icinga/services/actifs-chezlepro.conf index e657eea..5140568 100644 --- a/icinga/services/actifs-chezlepro.conf +++ b/icinga/services/actifs-chezlepro.conf @@ -7,6 +7,8 @@ apply Service "actifs-chezlepro-revision-inventaire-materiel" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revoir l'inventaire du matériel de Chezlepro" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "actifs-chezlepro-revision-inventaire-materiel" { apply Service "actifs-chezlepro-verification-amortissables" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier le registre des biens amortissables" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "actifs-chezlepro-verification-amortissables" { apply Service "actifs-chezlepro-verification-serveurs-et-composants" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'état des serveurs et composants matériels" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "actifs-chezlepro-verification-serveurs-et-composants" { apply Service "actifs-chezlepro-verification-reserve-pieces" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les pièces de rechange critiques" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "actifs-chezlepro-verification-reserve-pieces" { apply Service "actifs-chezlepro-revision-actifs-transferts" { import "service_echeance" vars.date_echeance = "2026-06-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Réviser les actifs transférés ou à transférer à l'entreprise" assign where host.name == "life-noc" } diff --git a/icinga/services/animaux.conf b/icinga/services/animaux.conf index 9ad1f8d..7458fe9 100644 --- a/icinga/services/animaux.conf +++ b/icinga/services/animaux.conf @@ -7,6 +7,8 @@ apply Service "animaux-verification-stock-nourriture-chats" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du stock de nourriture pour chats" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "animaux-verification-stock-nourriture-chats" { apply Service "animaux-verification-friandises-et-litiere" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des stocks de friandises et de litière" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "animaux-verification-friandises-et-litiere" { apply Service "animaux-revision-routine-soins-animaux" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue de la routine de soins et des besoins matériels des chats" assign where host.name == "life-noc" } diff --git a/icinga/services/communaute.conf b/icinga/services/communaute.conf index aa406b3..a93296a 100644 --- a/icinga/services/communaute.conf +++ b/icinga/services/communaute.conf @@ -7,6 +7,8 @@ apply Service "communaute-verification-outils-aa" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les outils numériques liés aux activités communautaires" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "communaute-verification-outils-aa" { apply Service "communaute-verification-espace-87-16" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'espace Nextcloud du district" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "communaute-verification-espace-87-16" { apply Service "communaute-verification-salles-visio-groupes" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les salles de visioconférence des groupes" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "communaute-verification-salles-visio-groupes" { apply Service "communaute-verification-depots-rapports-rsg" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les dépôts de rapports RSG" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "communaute-verification-depots-rapports-rsg" { apply Service "communaute-revision-outils-communication-communaute" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Réviser les moyens de communication communautaires" assign where host.name == "life-noc" } diff --git a/icinga/services/documentation.conf b/icinga/services/documentation.conf index 5e84627..bb609e5 100644 --- a/icinga/services/documentation.conf +++ b/icinga/services/documentation.conf @@ -7,6 +7,8 @@ apply Service "documentation-revue-docs-personnelles-importantes" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revoir l'organisation des documents personnels importants" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "documentation-revue-docs-personnelles-importantes" { apply Service "documentation-revue-wiki-technique" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revoir le wiki technique et sa cohérence" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "documentation-revue-wiki-technique" { apply Service "documentation-revue-base-connaissances" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revoir la base de connaissances globale" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "documentation-revue-base-connaissances" { apply Service "documentation-verification-sauvegarde-docs-cles" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier la sauvegarde des documents clés" assign where host.name == "life-noc" } diff --git a/icinga/services/energie.conf b/icinga/services/energie.conf index 23efd0d..d635684 100644 --- a/icinga/services/energie.conf +++ b/icinga/services/energie.conf @@ -7,6 +7,8 @@ apply Service "energie-inspection-batteries-lifepo4" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection physique et logique des batteries LiFePO4" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "energie-inspection-batteries-lifepo4" { apply Service "energie-verification-tension-batteries" { import "service_echeance" vars.date_echeance = "2026-03-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des tensions et cohérence des batteries" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "energie-verification-tension-batteries" { apply Service "energie-verification-smartshunt" { import "service_echeance" vars.date_echeance = "2026-03-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification SmartShunt et cohérence du monitoring" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "energie-verification-smartshunt" { apply Service "energie-verification-cerbo-gx" { import "service_echeance" vars.date_echeance = "2026-03-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification Cerbo GX et remontée des données" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "energie-verification-cerbo-gx" { apply Service "energie-verification-can-rs485" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des communications CAN ou RS485" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "energie-verification-can-rs485" { apply Service "energie-inspection-cablage-energie" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection du câblage et des connexions énergétiques" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "energie-inspection-cablage-energie" { apply Service "energie-verification-busbars" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du serrage, corrosion et échauffement des busbars" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "energie-verification-busbars" { apply Service "energie-verification-parametres-charge" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des paramètres de charge et float" assign where host.name == "life-noc" } @@ -63,6 +79,8 @@ apply Service "energie-verification-parametres-charge" { apply Service "energie-test-charge-batteries" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Test de comportement en charge des batteries" assign where host.name == "life-noc" } @@ -70,6 +88,8 @@ apply Service "energie-test-charge-batteries" { apply Service "energie-test-comportement-onduleur" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier le comportement du Multiplus sous charge légère" assign where host.name == "life-noc" } @@ -77,6 +97,8 @@ apply Service "energie-test-comportement-onduleur" { apply Service "energie-verification-journal-evenements-victron" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des événements et anomalies Victron" assign where host.name == "life-noc" } diff --git a/icinga/services/exploitation-chezlepro.conf b/icinga/services/exploitation-chezlepro.conf index 082de8c..b5b6927 100644 --- a/icinga/services/exploitation-chezlepro.conf +++ b/icinga/services/exploitation-chezlepro.conf @@ -7,6 +7,8 @@ apply Service "exploitation-chezlepro-revision-playbooks-ansible" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue des playbooks Ansible" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "exploitation-chezlepro-revision-playbooks-ansible" { apply Service "exploitation-chezlepro-verification-inventaires-ansible" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des inventaires Ansible" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "exploitation-chezlepro-verification-inventaires-ansible" { apply Service "exploitation-chezlepro-revision-documentation-technique" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue de la documentation technique Chezlepro" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "exploitation-chezlepro-revision-documentation-technique" { apply Service "exploitation-chezlepro-verification-procedures-reprise" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les procédures de reprise et restauration" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "exploitation-chezlepro-verification-procedures-reprise" { apply Service "exploitation-chezlepro-revue-capacite-ressources" { import "service_echeance" vars.date_echeance = "2026-06-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue CPU RAM stockage et charge de l'infrastructure" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "exploitation-chezlepro-revue-capacite-ressources" { apply Service "exploitation-chezlepro-verification-jobs-automatises" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des jobs automatisés et scripts périodiques" assign where host.name == "life-noc" } diff --git a/icinga/services/finances-personnelles.conf b/icinga/services/finances-personnelles.conf index bee8d79..5cee14e 100644 --- a/icinga/services/finances-personnelles.conf +++ b/icinga/services/finances-personnelles.conf @@ -7,6 +7,8 @@ apply Service "finances-personnelles-revision-comptes-bancaires" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Révision mensuelle des comptes bancaires personnels" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "finances-personnelles-revision-comptes-bancaires" { apply Service "finances-personnelles-verification-cartes-credit" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des soldes et transactions des cartes de crédit" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "finances-personnelles-verification-cartes-credit" { apply Service "finances-personnelles-paiement-cartes-credit" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Paiement des cartes de crédit personnelles" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "finances-personnelles-paiement-cartes-credit" { apply Service "finances-personnelles-revision-budget-personnel" { import "service_echeance" vars.date_echeance = "2026-04-05" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Révision mensuelle du budget personnel" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "finances-personnelles-revision-budget-personnel" { apply Service "finances-personnelles-verification-prelevements-automatiques" { import "service_echeance" vars.date_echeance = "2026-04-03" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des prélèvements automatiques personnels" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "finances-personnelles-verification-prelevements-automatiques" { apply Service "finances-personnelles-verification-placements" { import "service_echeance" vars.date_echeance = "2026-06-30" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification périodique des placements et comptes enregistrés" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "finances-personnelles-verification-placements" { apply Service "finances-personnelles-verification-cotisations-reer" { import "service_echeance" vars.date_echeance = "2026-02-28" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des cotisations REER" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "finances-personnelles-verification-cotisations-reer" { apply Service "finances-personnelles-verification-celi" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de l'espace CELI et de son utilisation" assign where host.name == "life-noc" } @@ -63,6 +79,8 @@ apply Service "finances-personnelles-verification-celi" { apply Service "finances-personnelles-preparation-dossier-financier-annuel" { import "service_echeance" vars.date_echeance = "2026-01-31" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Préparer le dossier financier annuel personnel" assign where host.name == "life-noc" } diff --git a/icinga/services/fiscalite-personnelle.conf b/icinga/services/fiscalite-personnelle.conf index f0dbf3d..4a5f7db 100644 --- a/icinga/services/fiscalite-personnelle.conf +++ b/icinga/services/fiscalite-personnelle.conf @@ -7,6 +7,8 @@ apply Service "fiscalite-personnelle-preparation-documents-impots" { import "service_echeance" vars.date_echeance = "2026-03-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Rassembler tous les documents fiscaux personnels" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "fiscalite-personnelle-preparation-documents-impots" { apply Service "fiscalite-personnelle-production-impots-federal" { import "service_echeance" vars.date_echeance = "2026-04-30" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Produire la déclaration de revenus fédérale" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "fiscalite-personnelle-production-impots-federal" { apply Service "fiscalite-personnelle-production-impots-quebec" { import "service_echeance" vars.date_echeance = "2026-04-30" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Produire la déclaration de revenus Québec" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "fiscalite-personnelle-production-impots-quebec" { apply Service "fiscalite-personnelle-paiement-solde-impots" { import "service_echeance" vars.date_echeance = "2026-04-30" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Payer tout solde d'impôt exigible" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "fiscalite-personnelle-paiement-solde-impots" { apply Service "fiscalite-personnelle-verification-avis-cotisation" { import "service_echeance" vars.date_echeance = "2026-05-31" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les avis de cotisation ARC et Revenu Québec" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "fiscalite-personnelle-verification-avis-cotisation" { apply Service "fiscalite-personnelle-archivage-documents-fiscaux" { import "service_echeance" vars.date_echeance = "2026-06-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Archiver les documents fiscaux personnels" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "fiscalite-personnelle-archivage-documents-fiscaux" { apply Service "fiscalite-personnelle-verification-acomptes-provisionnels" { import "service_echeance" vars.date_echeance = "2026-03-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier si des acomptes provisionnels sont requis" assign where host.name == "life-noc" } diff --git a/icinga/services/focus.conf b/icinga/services/focus.conf index f3b2148..245b0bf 100644 --- a/icinga/services/focus.conf +++ b/icinga/services/focus.conf @@ -7,6 +7,8 @@ apply Service "focus-entretien-processus-focus" { import "service_echeance" vars.date_echeance = "2026-03-09" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier que les cartouches FOCUS sont à jour" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "focus-entretien-processus-focus" { apply Service "focus-nettoyage-inbox-mentale" { import "service_echeance" vars.date_echeance = "2026-03-09" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vider et clarifier les éléments capturés hors système" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "focus-nettoyage-inbox-mentale" { apply Service "focus-revue-limitation-engagements" { import "service_echeance" vars.date_echeance = "2026-03-31" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier que les engagements actifs demeurent réalistes" assign where host.name == "life-noc" } diff --git a/icinga/services/garage-et-rangement.conf b/icinga/services/garage-et-rangement.conf index 19bdd6f..198983b 100644 --- a/icinga/services/garage-et-rangement.conf +++ b/icinga/services/garage-et-rangement.conf @@ -7,6 +7,8 @@ apply Service "garage-et-rangement-inspection-rangement-plafond" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des supports suspendus au plafond du garage" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "garage-et-rangement-inspection-rangement-plafond" { apply Service "garage-et-rangement-revue-inventaire-garage" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue de l'inventaire et de l'ordre du garage" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "garage-et-rangement-revue-inventaire-garage" { apply Service "garage-et-rangement-verification-rouille-outillage" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la corrosion sur les outils et équipements" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "garage-et-rangement-verification-rouille-outillage" { apply Service "garage-et-rangement-inspection-securite-garage" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des conditions de sécurité du garage" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "garage-et-rangement-inspection-securite-garage" { apply Service "garage-et-rangement-rotation-stockage-bacs" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue des contenus de bacs de rangement" assign where host.name == "life-noc" } diff --git a/icinga/services/informatique-personnelle.conf b/icinga/services/informatique-personnelle.conf index cceb2df..47fde9d 100644 --- a/icinga/services/informatique-personnelle.conf +++ b/icinga/services/informatique-personnelle.conf @@ -7,6 +7,8 @@ apply Service "informatique-personnelle-verification-sauvegardes-personnelles" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des sauvegardes personnelles" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "informatique-personnelle-verification-sauvegardes-personnelles" { apply Service "informatique-personnelle-nettoyage-stockage-personnel" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Nettoyage du stockage numérique personnel" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "informatique-personnelle-nettoyage-stockage-personnel" { apply Service "informatique-personnelle-verification-comptes-importants" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des comptes numériques personnels importants" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "informatique-personnelle-verification-comptes-importants" { apply Service "informatique-personnelle-revue-mots-de-passe-personnels" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue des mots de passe personnels critiques" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "informatique-personnelle-revue-mots-de-passe-personnels" { apply Service "informatique-personnelle-verification-documents-cloud-personnels" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier la cohérence des documents personnels sauvegardés" assign where host.name == "life-noc" } diff --git a/icinga/services/infrastructure-chezlepro.conf b/icinga/services/infrastructure-chezlepro.conf index f525cdb..470b202 100644 --- a/icinga/services/infrastructure-chezlepro.conf +++ b/icinga/services/infrastructure-chezlepro.conf @@ -7,6 +7,8 @@ apply Service "infrastructure-chezlepro-verification-proxmox" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification générale de l'environnement Proxmox" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "infrastructure-chezlepro-verification-proxmox" { apply Service "infrastructure-chezlepro-verification-ceph" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification générale de l'état Ceph" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "infrastructure-chezlepro-verification-ceph" { apply Service "infrastructure-chezlepro-test-restauration-backups" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Test de restauration des sauvegardes" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "infrastructure-chezlepro-test-restauration-backups" { apply Service "infrastructure-chezlepro-verification-pbs-truenas" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des solutions de sauvegarde et synchronisation" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "infrastructure-chezlepro-verification-pbs-truenas" { apply Service "infrastructure-chezlepro-verification-ups-infrastructure" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des UPS de l'infrastructure" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "infrastructure-chezlepro-verification-ups-infrastructure" { apply Service "infrastructure-chezlepro-verification-capacite-stockage" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier capacité et croissance du stockage" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "infrastructure-chezlepro-verification-capacite-stockage" { apply Service "infrastructure-chezlepro-verification-apt-cacher-ng" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du bon fonctionnement d'apt-cacher-ng" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "infrastructure-chezlepro-verification-apt-cacher-ng" { apply Service "infrastructure-chezlepro-verification-icinga2" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la supervision Icinga2" assign where host.name == "life-noc" } @@ -63,6 +79,8 @@ apply Service "infrastructure-chezlepro-verification-icinga2" { apply Service "infrastructure-chezlepro-verification-keycloak-openldap" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de l'identité et de l'authentification centralisées" assign where host.name == "life-noc" } @@ -70,6 +88,8 @@ apply Service "infrastructure-chezlepro-verification-keycloak-openldap" { apply Service "infrastructure-chezlepro-verification-nextcloud" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de l'état Nextcloud" assign where host.name == "life-noc" } @@ -77,6 +97,8 @@ apply Service "infrastructure-chezlepro-verification-nextcloud" { apply Service "infrastructure-chezlepro-verification-mailcow" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de l'infrastructure Mailcow" assign where host.name == "life-noc" } @@ -84,6 +106,8 @@ apply Service "infrastructure-chezlepro-verification-mailcow" { apply Service "infrastructure-chezlepro-verification-openvas" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la plateforme OpenVAS" assign where host.name == "life-noc" } @@ -91,6 +115,8 @@ apply Service "infrastructure-chezlepro-verification-openvas" { apply Service "infrastructure-chezlepro-verification-journaux-systemes" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue des journaux systèmes critiques" assign where host.name == "life-noc" } diff --git a/icinga/services/jardin.conf b/icinga/services/jardin.conf index 16bf4fe..3560794 100644 --- a/icinga/services/jardin.conf +++ b/icinga/services/jardin.conf @@ -7,6 +7,8 @@ apply Service "jardin-inspection-vignes" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection et entretien des vignes" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "jardin-inspection-vignes" { apply Service "jardin-entretien-bleuetiers" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Entretien des bleuetiers" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "jardin-entretien-bleuetiers" { apply Service "jardin-entretien-framboisiers" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Entretien des framboisiers" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "jardin-entretien-framboisiers" { apply Service "jardin-inspection-kiwis-nordiques" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des kiwis nordiques" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "jardin-inspection-kiwis-nordiques" { apply Service "jardin-entretien-rhubarbe" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Entretien de la rhubarbe" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "jardin-entretien-rhubarbe" { apply Service "jardin-inspection-groseillier" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection du groseillier" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "jardin-inspection-groseillier" { apply Service "jardin-inspection-muriers" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection des mûriers" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "jardin-inspection-muriers" { apply Service "jardin-entretien-houblon" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification et entretien du houblon" assign where host.name == "life-noc" } @@ -63,6 +79,8 @@ apply Service "jardin-entretien-houblon" { apply Service "jardin-revision-pharmacopée-jardin" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du stock de soins pour végétaux" assign where host.name == "life-noc" } @@ -70,6 +88,8 @@ apply Service "jardin-revision-pharmacopée-jardin" { apply Service "jardin-revision-armoire-produits-jardin" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification et ordre de l'armoire des produits pour végétaux" assign where host.name == "life-noc" } diff --git a/icinga/services/maison.conf b/icinga/services/maison.conf index 2aba7e5..5cc97dd 100644 --- a/icinga/services/maison.conf +++ b/icinga/services/maison.conf @@ -7,6 +7,8 @@ apply Service "maison-remplacement-filtre-fournaise" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Remplacer le filtre de la fournaise" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "maison-remplacement-filtre-fournaise" { apply Service "maison-inspection-fournaise" { import "service_echeance" vars.date_echeance = "2026-09-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection générale de la fournaise avant saison froide" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "maison-inspection-fournaise" { apply Service "maison-inspection-thermopompe" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection et entretien de la thermopompe" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "maison-inspection-thermopompe" { apply Service "maison-nettoyage-unites-exterieures" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Nettoyer les unités extérieures et vérifier le dégagement" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "maison-nettoyage-unites-exterieures" { apply Service "maison-inspection-toiture" { import "service_echeance" vars.date_echeance = "2026-10-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection annuelle de la toiture" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "maison-inspection-toiture" { apply Service "maison-inspection-gouttieres" { import "service_echeance" vars.date_echeance = "2026-11-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection et nettoyage des gouttières" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "maison-inspection-gouttieres" { apply Service "maison-inspection-fondation" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection de la fondation et des fissures" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "maison-inspection-fondation" { apply Service "maison-verification-drainage-terrain" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du drainage autour de la maison" assign where host.name == "life-noc" } @@ -63,6 +79,8 @@ apply Service "maison-verification-drainage-terrain" { apply Service "maison-test-detecteurs-fumee" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Test des détecteurs de fumée" assign where host.name == "life-noc" } @@ -70,6 +88,8 @@ apply Service "maison-test-detecteurs-fumee" { apply Service "maison-test-detecteurs-co" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Test des détecteurs de monoxyde de carbone" assign where host.name == "life-noc" } @@ -77,6 +97,8 @@ apply Service "maison-test-detecteurs-co" { apply Service "maison-remplacement-piles-detecteurs" { import "service_echeance" vars.date_echeance = "2026-10-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Remplacement préventif des piles des détecteurs" assign where host.name == "life-noc" } @@ -84,6 +106,8 @@ apply Service "maison-remplacement-piles-detecteurs" { apply Service "maison-verification-plomberie-visible" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification visuelle de la plomberie accessible" assign where host.name == "life-noc" } @@ -91,6 +115,8 @@ apply Service "maison-verification-plomberie-visible" { apply Service "maison-inspection-sump-pump" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la pompe de puisard si applicable" assign where host.name == "life-noc" } @@ -98,6 +124,8 @@ apply Service "maison-inspection-sump-pump" { apply Service "maison-verification-calfetrage" { import "service_echeance" vars.date_echeance = "2026-10-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du calfeutrage portes et fenêtres" assign where host.name == "life-noc" } @@ -105,6 +133,8 @@ apply Service "maison-verification-calfetrage" { apply Service "maison-inspection-portes-garage" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification mécanique et sécurité des portes de garage" assign where host.name == "life-noc" } @@ -112,6 +142,8 @@ apply Service "maison-inspection-portes-garage" { apply Service "maison-verification-extincteurs" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des extincteurs" assign where host.name == "life-noc" } diff --git a/icinga/services/obligations-chezlepro.conf b/icinga/services/obligations-chezlepro.conf index 4329907..a52248e 100644 --- a/icinga/services/obligations-chezlepro.conf +++ b/icinga/services/obligations-chezlepro.conf @@ -7,6 +7,8 @@ apply Service "obligations-chezlepro-verification-registraire-entreprise" { import "service_echeance" vars.date_echeance = "2026-06-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les obligations au Registraire des entreprises" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "obligations-chezlepro-verification-registraire-entreprise" { apply Service "obligations-chezlepro-verification-declarations-taxes" { import "service_echeance" vars.date_echeance = "2026-04-30" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les obligations de taxes de l'entreprise si applicables" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "obligations-chezlepro-verification-declarations-taxes" { apply Service "obligations-chezlepro-verification-dossier-comptable-entreprise" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'ordre du dossier comptable Chezlepro" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "obligations-chezlepro-verification-dossier-comptable-entreprise" apply Service "obligations-chezlepro-verification-facturation-clients" { import "service_echeance" vars.date_echeance = "2026-04-10" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier la facturation et son suivi" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "obligations-chezlepro-verification-facturation-clients" { apply Service "obligations-chezlepro-verification-paiements-fournisseurs" { import "service_echeance" vars.date_echeance = "2026-04-10" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les paiements fournisseurs" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "obligations-chezlepro-verification-paiements-fournisseurs" { apply Service "obligations-chezlepro-verification-contrats-ententes" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier contrats, ententes et obligations associées" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "obligations-chezlepro-verification-contrats-ententes" { apply Service "obligations-chezlepro-verification-assurances-entreprise" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les assurances de l'entreprise" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "obligations-chezlepro-verification-assurances-entreprise" { apply Service "obligations-chezlepro-archivage-documents-entreprise" { import "service_echeance" vars.date_echeance = "2026-05-31" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Archiver les documents administratifs et financiers de l'entreprise" assign where host.name == "life-noc" } diff --git a/icinga/services/obligations-legales-personnelles.conf b/icinga/services/obligations-legales-personnelles.conf index bda143e..bfdb5b5 100644 --- a/icinga/services/obligations-legales-personnelles.conf +++ b/icinga/services/obligations-legales-personnelles.conf @@ -7,6 +7,8 @@ apply Service "obligations-legales-personnelles-verification-testament" { import "service_echeance" vars.date_echeance = "2026-07-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier la pertinence et l'actualité du testament" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "obligations-legales-personnelles-verification-testament" { apply Service "obligations-legales-personnelles-verification-mandat-inaptitude" { import "service_echeance" vars.date_echeance = "2026-07-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier le mandat de protection et documents connexes" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "obligations-legales-personnelles-verification-mandat-inaptitude" apply Service "obligations-legales-personnelles-verification-directives-medicales" { import "service_echeance" vars.date_echeance = "2026-07-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les directives médicales anticipées" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "obligations-legales-personnelles-verification-directives-medicale apply Service "obligations-legales-personnelles-verification-papiers-identite" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'expiration des papiers d'identité" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "obligations-legales-personnelles-verification-papiers-identite" { apply Service "obligations-legales-personnelles-renouvellement-permis-conduire" { import "service_echeance" vars.date_echeance = "2027-01-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier le renouvellement du permis de conduire" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "obligations-legales-personnelles-renouvellement-permis-conduire" apply Service "obligations-legales-personnelles-verification-carte-assurance-maladie" { import "service_echeance" vars.date_echeance = "2026-10-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'expiration de la carte d'assurance maladie" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "obligations-legales-personnelles-verification-carte-assurance-mal apply Service "obligations-legales-personnelles-verification-passeport" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'expiration du passeport" assign where host.name == "life-noc" } diff --git a/icinga/services/outils-et-equipements.conf b/icinga/services/outils-et-equipements.conf index b4ae8c1..5e910f4 100644 --- a/icinga/services/outils-et-equipements.conf +++ b/icinga/services/outils-et-equipements.conf @@ -7,6 +7,8 @@ apply Service "outils-et-equipements-entretien-outils-jardin" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Nettoyage et entretien des outils de jardin" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "outils-et-equipements-entretien-outils-jardin" { apply Service "outils-et-equipements-inspection-outils-electriques" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des outils électriques" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "outils-et-equipements-inspection-outils-electriques" { apply Service "outils-et-equipements-verification-rallonges-et-connecteurs" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des rallonges et connecteurs" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "outils-et-equipements-verification-rallonges-et-connecteurs" { apply Service "outils-et-equipements-verification-compresseur-et-accessoires" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du compresseur et accessoires" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "outils-et-equipements-verification-compresseur-et-accessoires" { apply Service "outils-et-equipements-revision-inventaire-outillage" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue de l'inventaire d'outillage" assign where host.name == "life-noc" } diff --git a/icinga/services/projets.conf b/icinga/services/projets.conf index dc8bd50..a0e64b9 100644 --- a/icinga/services/projets.conf +++ b/icinga/services/projets.conf @@ -7,6 +7,8 @@ apply Service "projets-revision-life-noc" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Révision du projet Life-NOC" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "projets-revision-life-noc" { apply Service "projets-revision-alliance-boreale" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Révision du projet Alliance Boréale" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "projets-revision-alliance-boreale" { apply Service "projets-revision-erplibre" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Révision du projet ERPLibre" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "projets-revision-erplibre" { apply Service "projets-revision-semence-numerique" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Révision du projet semence numérique" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "projets-revision-semence-numerique" { apply Service "projets-revision-ortrux-1" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Révision du système Ortrux-1" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "projets-revision-ortrux-1" { apply Service "projets-revision-district16" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Révision du projet DISTRICT16" assign where host.name == "life-noc" } diff --git a/icinga/services/reseau-chezlepro.conf b/icinga/services/reseau-chezlepro.conf index aa4bb95..01843a4 100644 --- a/icinga/services/reseau-chezlepro.conf +++ b/icinga/services/reseau-chezlepro.conf @@ -7,6 +7,8 @@ apply Service "reseau-chezlepro-verification-firewalls" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des firewalls" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "reseau-chezlepro-verification-firewalls" { apply Service "reseau-chezlepro-verification-vpn-openvpn" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des tunnels OpenVPN" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "reseau-chezlepro-verification-vpn-openvpn" { apply Service "reseau-chezlepro-verification-crl-certificats" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la CRL et des certificats" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "reseau-chezlepro-verification-crl-certificats" { apply Service "reseau-chezlepro-verification-switches" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des switches et uplinks" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "reseau-chezlepro-verification-switches" { apply Service "reseau-chezlepro-verification-vlans-segmentation" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la segmentation réseau" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "reseau-chezlepro-verification-vlans-segmentation" { apply Service "reseau-chezlepro-verification-dns" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification DNS interne et externe" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "reseau-chezlepro-verification-dns" { apply Service "reseau-chezlepro-verification-dynamic-dns" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du DNS dynamique si utilisé" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "reseau-chezlepro-verification-dynamic-dns" { apply Service "reseau-chezlepro-audit-regles-firewall" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Audit périodique des règles de firewall" assign where host.name == "life-noc" } @@ -63,6 +79,8 @@ apply Service "reseau-chezlepro-audit-regles-firewall" { apply Service "reseau-chezlepro-verification-geoblocking" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier le geoblocking et son effet attendu" assign where host.name == "life-noc" } @@ -70,6 +88,8 @@ apply Service "reseau-chezlepro-verification-geoblocking" { apply Service "reseau-chezlepro-verification-certificats-publics" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les expirations de certificats publics" assign where host.name == "life-noc" } diff --git a/icinga/services/resilience.conf b/icinga/services/resilience.conf index 4422b03..27b883f 100644 --- a/icinga/services/resilience.conf +++ b/icinga/services/resilience.conf @@ -7,6 +7,8 @@ apply Service "resilience-test-generatrice-propane" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Test mensuel de la génératrice au propane" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "resilience-test-generatrice-propane" { apply Service "resilience-verification-carburant-generatrice" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de l'approvisionnement propane lié à la génératrice" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "resilience-verification-carburant-generatrice" { apply Service "resilience-verification-procedure-bascule" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Réviser la procédure de bascule en mode secours" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "resilience-verification-procedure-bascule" { apply Service "resilience-verification-stock-lampes-piles" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des lampes, piles et éclairage d'urgence" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "resilience-verification-stock-lampes-piles" { apply Service "resilience-verification-trousses-urgence" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des trousses d'urgence" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "resilience-verification-trousses-urgence" { apply Service "resilience-revision-plan-urgence" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Réviser le plan d'urgence domestique" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "resilience-revision-plan-urgence" { apply Service "resilience-test-autonomie-base" { import "service_echeance" vars.date_echeance = "2026-06-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'autonomie énergétique minimale attendue" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "resilience-test-autonomie-base" { apply Service "resilience-verification-moyens-cuisson-secours" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des moyens de cuisson de secours" assign where host.name == "life-noc" } diff --git a/icinga/services/revue.conf b/icinga/services/revue.conf index 21cd9a2..bce7daa 100644 --- a/icinga/services/revue.conf +++ b/icinga/services/revue.conf @@ -7,6 +7,8 @@ apply Service "revue-revue-quotidienne-life-noc" { import "service_echeance" vars.date_echeance = "2026-03-07" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue quotidienne du tableau Life-NOC" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "revue-revue-quotidienne-life-noc" { apply Service "revue-revue-hebdomadaire-priorites" { import "service_echeance" vars.date_echeance = "2026-03-08" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue hebdomadaire des priorités personnelles et professionnelles" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "revue-revue-hebdomadaire-priorites" { apply Service "revue-revue-mensuelle-systeme-vie" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue mensuelle de l'ensemble du système Life-NOC" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "revue-revue-mensuelle-systeme-vie" { apply Service "revue-revue-trimestrielle-orientation" { import "service_echeance" vars.date_echeance = "2026-06-30" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue trimestrielle des orientations de vie et de Chezlepro" assign where host.name == "life-noc" } diff --git a/icinga/services/sante.conf b/icinga/services/sante.conf index 10df342..17521c0 100644 --- a/icinga/services/sante.conf +++ b/icinga/services/sante.conf @@ -7,6 +7,8 @@ apply Service "sante-verification-trousse-premiers-soins" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la trousse de premiers soins" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "sante-verification-trousse-premiers-soins" { apply Service "sante-verification-expiration-medicaments" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des dates d'expiration des médicaments" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "sante-verification-expiration-medicaments" { apply Service "sante-revision-rendez-vous-medicaux" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revoir les rendez-vous médicaux requis" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "sante-revision-rendez-vous-medicaux" { apply Service "sante-verification-lunettes-prescriptions" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les prescriptions et besoins de renouvellement" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "sante-verification-lunettes-prescriptions" { apply Service "sante-verification-dossier-sante" { import "service_echeance" vars.date_echeance = "2026-06-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'ordre et l'accessibilité des documents de santé" assign where host.name == "life-noc" } diff --git a/icinga/services/securite-chezlepro.conf b/icinga/services/securite-chezlepro.conf index f2305a4..9ef897f 100644 --- a/icinga/services/securite-chezlepro.conf +++ b/icinga/services/securite-chezlepro.conf @@ -7,6 +7,8 @@ apply Service "securite-chezlepro-verification-mises-a-jour-securite" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des mises à jour de sécurité" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "securite-chezlepro-verification-mises-a-jour-securite" { apply Service "securite-chezlepro-audit-comptes-acces" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Audit des comptes et accès privilégiés" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "securite-chezlepro-audit-comptes-acces" { apply Service "securite-chezlepro-verification-ids-snort" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des IDS et de leur état" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "securite-chezlepro-verification-ids-snort" { apply Service "securite-chezlepro-revue-pki-privee" { import "service_echeance" vars.date_echeance = "2026-05-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue de la PKI privée et des autorités intermédiaires" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "securite-chezlepro-revue-pki-privee" { apply Service "securite-chezlepro-revue-politiques-securite" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue des politiques et pratiques de sécurité numérique" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "securite-chezlepro-revue-politiques-securite" { apply Service "securite-chezlepro-verification-sauvegardes-configuration" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier les sauvegardes des configurations critiques" assign where host.name == "life-noc" } diff --git a/icinga/services/stock-alimentaire.conf b/icinga/services/stock-alimentaire.conf index 060c0cf..c8a68a0 100644 --- a/icinga/services/stock-alimentaire.conf +++ b/icinga/services/stock-alimentaire.conf @@ -7,6 +7,8 @@ apply Service "stock-alimentaire-rotation-nourriture-seche" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Rotation des stocks de nourriture sèche" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "stock-alimentaire-rotation-nourriture-seche" { apply Service "stock-alimentaire-verification-reserve-eau" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la réserve d'eau potable" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "stock-alimentaire-verification-reserve-eau" { apply Service "stock-alimentaire-verification-mylar-absorbeurs" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérifier l'intégrité des emballages Mylar et absorbeurs" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "stock-alimentaire-verification-mylar-absorbeurs" { apply Service "stock-alimentaire-revue-inventaire-conserves" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Revue des conserves et dates de rotation" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "stock-alimentaire-revue-inventaire-conserves" { apply Service "stock-alimentaire-revue-inventaire-farine-riz-pates" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des gros stocks alimentaires de base" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "stock-alimentaire-revue-inventaire-farine-riz-pates" { apply Service "stock-alimentaire-verification-bacs-legumes-racines" { import "service_echeance" vars.date_echeance = "2026-10-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des bacs de stockage de légumes racines" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "stock-alimentaire-verification-bacs-legumes-racines" { apply Service "stock-alimentaire-revue-supplements-vitamines" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification du stock de suppléments et dates utiles" assign where host.name == "life-noc" } diff --git a/icinga/services/voiture.conf b/icinga/services/voiture.conf index d689656..6db092a 100644 --- a/icinga/services/voiture.conf +++ b/icinga/services/voiture.conf @@ -7,6 +7,8 @@ apply Service "voiture-verification-huile-moteur" { import "service_echeance" vars.date_echeance = "2026-04-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de l'huile moteur" assign where host.name == "life-noc" } @@ -14,6 +16,8 @@ apply Service "voiture-verification-huile-moteur" { apply Service "voiture-inspection-freins" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Inspection des freins" assign where host.name == "life-noc" } @@ -21,6 +25,8 @@ apply Service "voiture-inspection-freins" { apply Service "voiture-verification-pneus" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification usure, pression et permutation des pneus" assign where host.name == "life-noc" } @@ -28,6 +34,8 @@ apply Service "voiture-verification-pneus" { apply Service "voiture-ajustement-valves" { import "service_echeance" vars.date_echeance = "2026-08-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification et ajustement des valves Honda Accord" assign where host.name == "life-noc" } @@ -35,6 +43,8 @@ apply Service "voiture-ajustement-valves" { apply Service "voiture-verification-timing-belt" { import "service_echeance" vars.date_echeance = "2027-01-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de la courroie de distribution et pompe à eau" assign where host.name == "life-noc" } @@ -42,6 +52,8 @@ apply Service "voiture-verification-timing-belt" { apply Service "voiture-verification-batterie-voiture" { import "service_echeance" vars.date_echeance = "2026-10-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de l'état de la batterie automobile" assign where host.name == "life-noc" } @@ -49,6 +61,8 @@ apply Service "voiture-verification-batterie-voiture" { apply Service "voiture-verification-balais-essuie-glace" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des essuie-glaces" assign where host.name == "life-noc" } @@ -56,6 +70,8 @@ apply Service "voiture-verification-balais-essuie-glace" { apply Service "voiture-verification-liquides" { import "service_echeance" vars.date_echeance = "2026-04-15" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification des liquides de la voiture" assign where host.name == "life-noc" } @@ -63,6 +79,8 @@ apply Service "voiture-verification-liquides" { apply Service "voiture-verification-eclairage" { import "service_echeance" vars.date_echeance = "2026-05-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification de l'éclairage et des phares" assign where host.name == "life-noc" } @@ -70,6 +88,8 @@ apply Service "voiture-verification-eclairage" { apply Service "voiture-verification-immatriculation-assurance" { import "service_echeance" vars.date_echeance = "2026-06-01" + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" notes = "Vérification papiers d'assurance et immatriculation" assign where host.name == "life-noc" } diff --git a/icinga/templates/service_echeance.conf b/icinga/templates/service_echeance.conf index e69de29..ad74466 100644 --- a/icinga/templates/service_echeance.conf +++ b/icinga/templates/service_echeance.conf @@ -0,0 +1,17 @@ +template Service "service_echeance" { + + import "generic-service" + + check_command = "check_life_noc_mock" + + vars.mock_state = "OK" + vars.mock_message = "Sous contrôle" + vars.warning_days = 14 + vars.critical_days = 3 + + max_check_attempts = 1 + check_interval = 1m + retry_interval = 30s + enable_notifications = false + +} diff --git a/scripts/generate_bpm.py b/scripts/generate_bpm.py old mode 100755 new mode 100644 diff --git a/scripts/generate_services.py b/scripts/generate_services.py old mode 100755 new mode 100644 index 0358aa8..b05db8e --- a/scripts/generate_services.py +++ b/scripts/generate_services.py @@ -5,11 +5,12 @@ import re import sys import yaml - INPUT_FILE = Path("domains.yaml") OUTPUT_DIR = Path("icinga/services") HOST_NAME = "life-noc" SERVICE_TEMPLATE = "service_echeance" +DEFAULT_MOCK_STATE = "OK" +DEFAULT_MOCK_MESSAGE = "Sous contrôle" def slugify(value: str) -> str: @@ -38,12 +39,24 @@ def icinga_escape(value: str) -> str: return value.replace("\\", "\\\\").replace('"', '\\"') +def normalize_mock_state(value: str) -> str: + state = str(value).strip().upper() + allowed = {"OK", "WARNING", "CRITICAL"} + if state not in allowed: + raise ValueError( + f"mock_state invalide: {value}. Valeurs permises: {', '.join(sorted(allowed))}" + ) + return state + + def render_service(domain: str, item: dict) -> str: name = item["name"].strip() date = str(item["date"]).strip() notes = item.get("notes", "").strip() notes_url = item.get("notes_url", "").strip() action_url = item.get("action_url", "").strip() + mock_state = normalize_mock_state(item.get("mock_state", DEFAULT_MOCK_STATE)) + mock_message = item.get("mock_message", DEFAULT_MOCK_MESSAGE).strip() or DEFAULT_MOCK_MESSAGE service_name = f"{domain}-{name}" @@ -51,6 +64,8 @@ def render_service(domain: str, item: dict) -> str: f'apply Service "{icinga_escape(service_name)}" {{', f' import "{SERVICE_TEMPLATE}"', f' vars.date_echeance = "{icinga_escape(date)}"', + f' vars.mock_state = "{icinga_escape(mock_state)}"', + f' vars.mock_message = "{icinga_escape(mock_message)}"', ] if notes: @@ -117,7 +132,11 @@ def main() -> int: ) return 1 - content.append(render_service(domain, item)) + try: + content.append(render_service(domain, item)) + except ValueError as exc: + print(f"Erreur dans '{raw_domain}', entrée {idx}: {exc}", file=sys.stderr) + return 1 output_file.write_text("\n".join(content).rstrip() + "\n", encoding="utf-8") generated_files.append(str(output_file))