Interface web pour admin domains.yaml

This commit is contained in:
Daniel Allaire 2026-03-16 18:05:17 -04:00
parent fcee1ea9b1
commit 41a7e82d0d
59 changed files with 5983 additions and 813 deletions

View file

@ -1,4 +1,5 @@
life_noc_fqdn: c7-life-noc-01
life_noc_admin_ui_enabled: true
life_noc_admin_user: icingadmin
life_noc_admin_password: l1f3_N0C_ADM

View file

@ -6,5 +6,7 @@ life_noc_reload_icinga: true
life_noc_bpm_deploy_enabled: false
life_noc_bpm_destination_dir: /etc/icingaweb2/modules/businessprocess/processes
life_noc_bpm_target_file: /etc/icingaweb2/modules/businessprocess/processes/Life-NOC.conf
life_noc_public_base_url: "http://{{ ansible_host | default(inventory_hostname) }}:8787"
life_noc_owner: root
life_noc_group: root
life_noc_admin_ui_enabled: false

View file

@ -51,6 +51,8 @@
ansible.builtin.command:
cmd: python3 scripts/generate_services.py
chdir: "{{ life_noc_project_root }}"
environment:
LIFE_NOC_PUBLIC_BASE_URL: "{{ life_noc_public_base_url }}"
changed_when: true
- name: generate bpm from domains

View file

@ -7,6 +7,7 @@ Type=simple
User=root
Group=root
WorkingDirectory={{ life_noc_project_root }}
Environment=LIFE_NOC_ADMIN_UI_ENABLED={{ "1" if (life_noc_admin_ui_enabled | bool) else "0" }}
ExecStart=/usr/bin/python3 -m uvicorn scripts.life_noc_input_api:app --host 0.0.0.0 --port 8787
Restart=on-failure
RestartSec=3

View file

@ -0,0 +1,12 @@
revision-inventaire-materiel:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-serveurs-et-composants:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-actifs-transferts:
value: '2026-03-17'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

4
data/inputs/animaux.yaml Normal file
View file

@ -0,0 +1,4 @@
revision-routine-soins-animaux:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,20 @@
verification-outils-aa:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-espace-87-16:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-salles-visio-groupes:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-depots-rapports-rsg:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-outils-communication-communaute:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,16 @@
revue-docs-personnelles-importantes:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revue-wiki-technique:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revue-base-connaissances:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-sauvegarde-docs-cles:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

32
data/inputs/energie.yaml Normal file
View file

@ -0,0 +1,32 @@
inspection-batteries-lifepo4:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-can-rs485:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-cablage-energie:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-busbars:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-parametres-charge:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
test-charge-batteries:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
test-comportement-onduleur:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-journal-evenements-victron:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,24 @@
revision-playbooks-ansible:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-inventaires-ansible:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-documentation-technique:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-procedures-reprise:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revue-capacite-ressources:
value: '2026-03-17'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-jobs-automatises:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,36 @@
revision-comptes-bancaires:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-cartes-credit:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
paiement-cartes-credit:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-budget-personnel:
value: '2026-03-05'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-prelevements-automatiques:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-placements:
value: '2026-04-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-cotisations-reer:
value: '2026-02-21'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-celi:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
preparation-dossier-financier-annuel:
value: '2025-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,12 @@
preparation-documents-impots:
value: '2026-03-08'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-avis-cotisation:
value: '2026-03-02'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
archivage-documents-fiscaux:
value: '2026-03-17'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

12
data/inputs/focus.yaml Normal file
View file

@ -0,0 +1,12 @@
entretien-processus-focus:
value: '2026-03-02'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
nettoyage-inbox-mentale:
value: '2026-03-02'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revue-limitation-engagements:
value: '2026-02-28'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,20 @@
inspection-rangement-plafond:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revue-inventaire-garage:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-rouille-outillage:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-securite-garage:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
rotation-stockage-bacs:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,20 @@
verification-sauvegardes-personnelles:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
nettoyage-stockage-personnel:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-comptes-importants:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revue-mots-de-passe-personnels:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-documents-cloud-personnels:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,40 @@
verification-proxmox:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
test-restauration-backups:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-pbs-truenas:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-apt-cacher-ng:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-icinga2:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-keycloak-openldap:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-nextcloud:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-mailcow:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-openvas:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-journaux-systemes:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

32
data/inputs/jardin.yaml Normal file
View file

@ -0,0 +1,32 @@
inspection-vignes:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
entretien-bleuetiers:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
entretien-framboisiers:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-kiwis-nordiques:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
entretien-rhubarbe:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-groseillier:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-muriers:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
entretien-houblon:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

60
data/inputs/maison.yaml Normal file
View file

@ -0,0 +1,60 @@
remplacement-filtre-fournaise:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-fournaise:
value: '2026-03-19'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-thermopompe:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
nettoyage-unites-exterieures:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-toiture:
value: '2026-04-04'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-gouttieres:
value: '2026-05-05'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-fondation:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-drainage-terrain:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
test-detecteurs-fumee:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
test-detecteurs-co:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
remplacement-piles-detecteurs:
value: '2026-04-04'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-plomberie-visible:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-sump-pump:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-calfetrage:
value: '2026-04-18'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-portes-garage:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,16 @@
verification-dossier-comptable-entreprise:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-facturation-clients:
value: '2026-03-10'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-paiements-fournisseurs:
value: '2026-03-10'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
archivage-documents-entreprise:
value: '2026-03-02'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -1,4 +1,20 @@
renouvellement-permis-conduire:
value: "2026-09-20"
captured_at: "2026-03-14T23:30:00Z"
value: '2026-09-20'
captured_at: '2026-03-14T23:30:00Z'
origin: manual
verification-testament:
value: '2026-04-02'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-mandat-inaptitude:
value: '2026-04-02'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-directives-medicales:
value: '2026-01-16'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-papiers-identite:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,20 @@
entretien-outils-jardin:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
inspection-outils-electriques:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-rallonges-et-connecteurs:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-compresseur-et-accessoires:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-inventaire-outillage:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

24
data/inputs/projets.yaml Normal file
View file

@ -0,0 +1,24 @@
revision-life-noc:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-alliance-boreale:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-erplibre:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-semence-numerique:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-ortrux-1:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-district16:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,32 @@
verification-firewalls:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-vpn-openvpn:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-switches:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-vlans-segmentation:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-dns:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-dynamic-dns:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
audit-regles-firewall:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-geoblocking:
value: '2026-02-14'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,16 @@
test-generatrice-propane:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-procedure-bascule:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revision-plan-urgence:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
test-autonomie-base:
value: '2026-03-17'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -6,3 +6,11 @@ revue-hebdomadaire-priorites:
value: '2026-03-14'
captured_at: '2026-03-14T23:16:41Z'
origin: manual
revue-mensuelle-systeme-vie:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revue-trimestrielle-orientation:
value: '2026-04-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

4
data/inputs/sante.yaml Normal file
View file

@ -0,0 +1,4 @@
verification-dossier-sante:
value: '2026-03-17'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,20 @@
verification-mises-a-jour-securite:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
audit-comptes-acces:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-ids-snort:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
revue-politiques-securite:
value: '2026-03-03'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-sauvegardes-configuration:
value: '2026-03-15'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,4 @@
rotation-nourriture-seche:
value: '2026-03-01'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

8
data/inputs/voiture.yaml Normal file
View file

@ -0,0 +1,8 @@
verification-balais-essuie-glace:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date
verification-eclairage:
value: '2026-01-31'
captured_at: '2026-03-16T00:00:00Z'
origin: seed_from_legacy_date

View file

@ -0,0 +1,125 @@
# Interface web d'administration optionnelle — Life-NOC
## Objet
Ce document décrit l'interface web d'administration optionnelle ajoutée au service FastAPI existant de Life-NOC.
Elle permet de consulter et modifier `domains.yaml` depuis le web, en mode mobile-first, sans remplacer le flux opérationnel existant.
## Principes retenus
- `domains.yaml` demeure la **source de vérité opérationnelle**
- l'interface admin est **désactivée par défaut**
- si elle n'est pas activée, le comportement existant ne change pas
- l'API des intrants et les pages item continuent d'exister comme avant
- l'écriture vers `domains.yaml` est **atomique**
- une **copie de sauvegarde horodatée** de `domains.yaml` est produite avant chaque écriture
## Activation
Variable d'environnement utilisée par le service API :
```text
LIFE_NOC_ADMIN_UI_ENABLED=1
```
Côté Ansible, cette capacité est pilotée par :
```yaml
life_noc_admin_ui_enabled: true
```
Par défaut :
```yaml
life_noc_admin_ui_enabled: false
```
## Routes ajoutées
### Accueil admin
```text
GET /life-noc/admin
```
### Vue domaine
```text
GET /life-noc/admin/domain/<domaine>
```
### Création d'item
```text
GET /life-noc/admin/domain/<domaine>/new
POST /life-noc/admin/domain/<domaine>/new
```
### Fiche item admin
```text
GET /life-noc/admin/item/<domaine>/<item_key>
```
### Édition item
```text
GET /life-noc/admin/item/<domaine>/<item_key>/edit
POST /life-noc/admin/item/<domaine>/<item_key>/edit
```
### Réorganisation
```text
POST /life-noc/admin/domain/<domaine>/<item_key>/move
```
### Suppression
```text
POST /life-noc/admin/item/<domaine>/<item_key>/delete
```
## Champs éditables en v1
L'éditeur couvre les champs suivants :
- `name`
- `date`
- `title`
- `summary`
- `notes`
- `instructions`
- `notes_url`
- `instructions_url`
- `action_url`
- `probe.type`
- `probe.source.type`
- `probe.source.inputs_file`
- `probe.source.item_key`
- `metric.unit`
- `thresholds.*`
- `policy.on_error`
- `ui.form_mode`
- `ui.allow_complete`
- `ui.allow_manual_edit`
## Limites volontaires de cette tranche
- pas d'édition brute YAML
- pas de création de domaine
- pas d'import massif
- pas de validation métier avancée par type de sonde
- pas d'authentification applicative dédiée à ce stade
## Intégration retenue
L'interface admin est greffée au service FastAPI existant afin de :
- éviter un second service inutile
- réutiliser le point de déploiement déjà validé
- conserver une seule surface HTTP locale
L'interface admin ne devient pas le centre du système.
Elle n'est qu'une **surface d'édition facultative** du SSOT.

File diff suppressed because it is too large Load diff

View file

@ -5,13 +5,22 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/actifs-chezlepro.yaml"
vars.life_noc_item_key = "revision-inventaire-materiel"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-inventaire-materiel"
groups = [ "ACTIFS-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revoir l'inventaire du matériel de Chezlepro"
vars.instructions_url = "/life-noc/item/actifs-chezlepro/revision-inventaire-materiel"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/actifs-chezlepro/revision-inventaire-materiel"
assign where host.name == "life-noc"
}
@ -22,18 +31,27 @@ apply Service "actifs-chezlepro-verification-amortissables" {
vars.mock_message = "Sous contrôle"
groups = [ "ACTIFS-CHEZLEPRO" ]
notes = "Vérifier le registre des biens amortissables"
vars.instructions_url = "/life-noc/item/actifs-chezlepro/verification-amortissables"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/actifs-chezlepro/verification-amortissables"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/actifs-chezlepro.yaml"
vars.life_noc_item_key = "verification-serveurs-et-composants"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-serveurs-et-composants"
groups = [ "ACTIFS-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier l'état des serveurs et composants matériels"
vars.instructions_url = "/life-noc/item/actifs-chezlepro/verification-serveurs-et-composants"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/actifs-chezlepro/verification-serveurs-et-composants"
assign where host.name == "life-noc"
}
@ -44,17 +62,26 @@ apply Service "actifs-chezlepro-verification-reserve-pieces" {
vars.mock_message = "Sous contrôle"
groups = [ "ACTIFS-CHEZLEPRO" ]
notes = "Vérifier les pièces de rechange critiques"
vars.instructions_url = "/life-noc/item/actifs-chezlepro/verification-reserve-pieces"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/actifs-chezlepro/verification-reserve-pieces"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/actifs-chezlepro.yaml"
vars.life_noc_item_key = "revision-actifs-transferts"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-actifs-transferts"
groups = [ "ACTIFS-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Réviser les actifs transférés ou à transférer à l'entreprise"
vars.instructions_url = "/life-noc/item/actifs-chezlepro/revision-actifs-transferts"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/actifs-chezlepro/revision-actifs-transferts"
assign where host.name == "life-noc"
}

View file

@ -11,7 +11,7 @@ apply Service "animaux-verification-stock-nourriture-chats" {
vars.mock_message = "Sous contrôle"
groups = [ "ANIMAUX" ]
notes = "Vérification du stock de nourriture pour chats"
vars.instructions_url = "/life-noc/item/animaux/verification-stock-nourriture-chats"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/animaux/verification-stock-nourriture-chats"
assign where host.name == "life-noc"
}
@ -22,17 +22,26 @@ apply Service "animaux-verification-friandises-et-litiere" {
vars.mock_message = "Sous contrôle"
groups = [ "ANIMAUX" ]
notes = "Vérification des stocks de friandises et de litière"
vars.instructions_url = "/life-noc/item/animaux/verification-friandises-et-litiere"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/animaux/verification-friandises-et-litiere"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/animaux.yaml"
vars.life_noc_item_key = "revision-routine-soins-animaux"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-routine-soins-animaux"
groups = [ "ANIMAUX" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue de la routine de soins et des besoins matériels des chats"
vars.instructions_url = "/life-noc/item/animaux/revision-routine-soins-animaux"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/animaux/revision-routine-soins-animaux"
assign where host.name == "life-noc"
}

View file

@ -5,56 +5,101 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/communaute.yaml"
vars.life_noc_item_key = "verification-outils-aa"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-outils-aa"
groups = [ "COMMUNAUTE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier les outils numériques liés aux activités communautaires"
vars.instructions_url = "/life-noc/item/communaute/verification-outils-aa"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/communaute/verification-outils-aa"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/communaute.yaml"
vars.life_noc_item_key = "verification-espace-87-16"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-espace-87-16"
groups = [ "COMMUNAUTE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier l'espace Nextcloud du district"
vars.instructions_url = "/life-noc/item/communaute/verification-espace-87-16"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/communaute/verification-espace-87-16"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/communaute.yaml"
vars.life_noc_item_key = "verification-salles-visio-groupes"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-salles-visio-groupes"
groups = [ "COMMUNAUTE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier les salles de visioconférence des groupes"
vars.instructions_url = "/life-noc/item/communaute/verification-salles-visio-groupes"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/communaute/verification-salles-visio-groupes"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/communaute.yaml"
vars.life_noc_item_key = "verification-depots-rapports-rsg"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-depots-rapports-rsg"
groups = [ "COMMUNAUTE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier les dépôts de rapports RSG"
vars.instructions_url = "/life-noc/item/communaute/verification-depots-rapports-rsg"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/communaute/verification-depots-rapports-rsg"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/communaute.yaml"
vars.life_noc_item_key = "revision-outils-communication-communaute"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-outils-communication-communaute"
groups = [ "COMMUNAUTE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Réviser les moyens de communication communautaires"
vars.instructions_url = "/life-noc/item/communaute/revision-outils-communication-communaute"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/communaute/revision-outils-communication-communaute"
assign where host.name == "life-noc"
}

View file

@ -5,45 +5,81 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/documentation.yaml"
vars.life_noc_item_key = "revue-docs-personnelles-importantes"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-docs-personnelles-importantes"
groups = [ "DOCUMENTATION" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revoir l'organisation des documents personnels importants"
vars.instructions_url = "/life-noc/item/documentation/revue-docs-personnelles-importantes"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/documentation/revue-docs-personnelles-importantes"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/documentation.yaml"
vars.life_noc_item_key = "revue-wiki-technique"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-wiki-technique"
groups = [ "DOCUMENTATION" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revoir le wiki technique et sa cohérence"
vars.instructions_url = "/life-noc/item/documentation/revue-wiki-technique"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/documentation/revue-wiki-technique"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/documentation.yaml"
vars.life_noc_item_key = "revue-base-connaissances"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-base-connaissances"
groups = [ "DOCUMENTATION" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revoir la base de connaissances globale"
vars.instructions_url = "/life-noc/item/documentation/revue-base-connaissances"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/documentation/revue-base-connaissances"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/documentation.yaml"
vars.life_noc_item_key = "verification-sauvegarde-docs-cles"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-sauvegarde-docs-cles"
groups = [ "DOCUMENTATION" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier la sauvegarde des documents clés"
vars.instructions_url = "/life-noc/item/documentation/verification-sauvegarde-docs-cles"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/documentation/verification-sauvegarde-docs-cles"
assign where host.name == "life-noc"
}

View file

@ -5,13 +5,22 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/energie.yaml"
vars.life_noc_item_key = "inspection-batteries-lifepo4"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-batteries-lifepo4"
groups = [ "ENERGIE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Inspection physique et logique des batteries LiFePO4"
vars.instructions_url = "/life-noc/item/energie/inspection-batteries-lifepo4"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/inspection-batteries-lifepo4"
assign where host.name == "life-noc"
}
@ -22,7 +31,7 @@ apply Service "energie-verification-tension-batteries" {
vars.mock_message = "Sous contrôle"
groups = [ "ENERGIE" ]
notes = "Vérification des tensions et cohérence des batteries"
vars.instructions_url = "/life-noc/item/energie/verification-tension-batteries"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/verification-tension-batteries"
assign where host.name == "life-noc"
}
@ -33,7 +42,7 @@ apply Service "energie-verification-smartshunt" {
vars.mock_message = "Sous contrôle"
groups = [ "ENERGIE" ]
notes = "Vérification SmartShunt et cohérence du monitoring"
vars.instructions_url = "/life-noc/item/energie/verification-smartshunt"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/verification-smartshunt"
assign where host.name == "life-noc"
}
@ -44,83 +53,146 @@ apply Service "energie-verification-cerbo-gx" {
vars.mock_message = "Sous contrôle"
groups = [ "ENERGIE" ]
notes = "Vérification Cerbo GX et remontée des données"
vars.instructions_url = "/life-noc/item/energie/verification-cerbo-gx"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/verification-cerbo-gx"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/energie.yaml"
vars.life_noc_item_key = "verification-can-rs485"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-can-rs485"
groups = [ "ENERGIE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des communications CAN ou RS485"
vars.instructions_url = "/life-noc/item/energie/verification-can-rs485"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/verification-can-rs485"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/energie.yaml"
vars.life_noc_item_key = "inspection-cablage-energie"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-cablage-energie"
groups = [ "ENERGIE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Inspection du câblage et des connexions énergétiques"
vars.instructions_url = "/life-noc/item/energie/inspection-cablage-energie"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/inspection-cablage-energie"
assign where host.name == "life-noc"
}
apply Service "energie-verification-busbars" {
import "service_echeance"
vars.date_echeance = "2026-05-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/energie.yaml"
vars.life_noc_item_key = "verification-busbars"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-busbars"
groups = [ "ENERGIE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification du serrage, corrosion et échauffement des busbars"
vars.instructions_url = "/life-noc/item/energie/verification-busbars"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/verification-busbars"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/energie.yaml"
vars.life_noc_item_key = "verification-parametres-charge"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-parametres-charge"
groups = [ "ENERGIE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des paramètres de charge et float"
vars.instructions_url = "/life-noc/item/energie/verification-parametres-charge"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/verification-parametres-charge"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/energie.yaml"
vars.life_noc_item_key = "test-charge-batteries"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "test-charge-batteries"
groups = [ "ENERGIE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Test de comportement en charge des batteries"
vars.instructions_url = "/life-noc/item/energie/test-charge-batteries"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/test-charge-batteries"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/energie.yaml"
vars.life_noc_item_key = "test-comportement-onduleur"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "test-comportement-onduleur"
groups = [ "ENERGIE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier le comportement du Multiplus sous charge légère"
vars.instructions_url = "/life-noc/item/energie/test-comportement-onduleur"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/test-comportement-onduleur"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/energie.yaml"
vars.life_noc_item_key = "verification-journal-evenements-victron"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-journal-evenements-victron"
groups = [ "ENERGIE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des événements et anomalies Victron"
vars.instructions_url = "/life-noc/item/energie/verification-journal-evenements-victron"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/energie/verification-journal-evenements-victron"
assign where host.name == "life-noc"
}

View file

@ -5,67 +5,121 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/exploitation-chezlepro.yaml"
vars.life_noc_item_key = "revision-playbooks-ansible"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-playbooks-ansible"
groups = [ "EXPLOITATION-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue des playbooks Ansible"
vars.instructions_url = "/life-noc/item/exploitation-chezlepro/revision-playbooks-ansible"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/exploitation-chezlepro/revision-playbooks-ansible"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/exploitation-chezlepro.yaml"
vars.life_noc_item_key = "verification-inventaires-ansible"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-inventaires-ansible"
groups = [ "EXPLOITATION-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des inventaires Ansible"
vars.instructions_url = "/life-noc/item/exploitation-chezlepro/verification-inventaires-ansible"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/exploitation-chezlepro/verification-inventaires-ansible"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/exploitation-chezlepro.yaml"
vars.life_noc_item_key = "revision-documentation-technique"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-documentation-technique"
groups = [ "EXPLOITATION-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue de la documentation technique Chezlepro"
vars.instructions_url = "/life-noc/item/exploitation-chezlepro/revision-documentation-technique"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/exploitation-chezlepro/revision-documentation-technique"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/exploitation-chezlepro.yaml"
vars.life_noc_item_key = "verification-procedures-reprise"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-procedures-reprise"
groups = [ "EXPLOITATION-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier les procédures de reprise et restauration"
vars.instructions_url = "/life-noc/item/exploitation-chezlepro/verification-procedures-reprise"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/exploitation-chezlepro/verification-procedures-reprise"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/exploitation-chezlepro.yaml"
vars.life_noc_item_key = "revue-capacite-ressources"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-capacite-ressources"
groups = [ "EXPLOITATION-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue CPU RAM stockage et charge de l'infrastructure"
vars.instructions_url = "/life-noc/item/exploitation-chezlepro/revue-capacite-ressources"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/exploitation-chezlepro/revue-capacite-ressources"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/exploitation-chezlepro.yaml"
vars.life_noc_item_key = "verification-jobs-automatises"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-jobs-automatises"
groups = [ "EXPLOITATION-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des jobs automatisés et scripts périodiques"
vars.instructions_url = "/life-noc/item/exploitation-chezlepro/verification-jobs-automatises"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/exploitation-chezlepro/verification-jobs-automatises"
assign where host.name == "life-noc"
}

View file

@ -5,100 +5,181 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "revision-comptes-bancaires"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-comptes-bancaires"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Révision mensuelle des comptes bancaires personnels"
vars.instructions_url = "/life-noc/item/finances-personnelles/revision-comptes-bancaires"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/revision-comptes-bancaires"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "verification-cartes-credit"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-cartes-credit"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des soldes et transactions des cartes de crédit"
vars.instructions_url = "/life-noc/item/finances-personnelles/verification-cartes-credit"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/verification-cartes-credit"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "paiement-cartes-credit"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "paiement-cartes-credit"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Paiement des cartes de crédit personnelles"
vars.instructions_url = "/life-noc/item/finances-personnelles/paiement-cartes-credit"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/paiement-cartes-credit"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "revision-budget-personnel"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-budget-personnel"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Révision mensuelle du budget personnel"
vars.instructions_url = "/life-noc/item/finances-personnelles/revision-budget-personnel"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/revision-budget-personnel"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "verification-prelevements-automatiques"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-prelevements-automatiques"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des prélèvements automatiques personnels"
vars.instructions_url = "/life-noc/item/finances-personnelles/verification-prelevements-automatiques"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/verification-prelevements-automatiques"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "verification-placements"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-placements"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification périodique des placements et comptes enregistrés"
vars.instructions_url = "/life-noc/item/finances-personnelles/verification-placements"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/verification-placements"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "verification-cotisations-reer"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-cotisations-reer"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "5"
vars.life_noc_threshold_ok_gte = "5"
vars.life_noc_threshold_warning_gte = "7"
vars.life_noc_threshold_critical_gte = "10"
vars.life_noc_on_error = "critical"
notes = "Vérification des cotisations REER"
vars.instructions_url = "/life-noc/item/finances-personnelles/verification-cotisations-reer"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/verification-cotisations-reer"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "verification-celi"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-celi"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification de l'espace CELI et de son utilisation"
vars.instructions_url = "/life-noc/item/finances-personnelles/verification-celi"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/verification-celi"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/finances-personnelles.yaml"
vars.life_noc_item_key = "preparation-dossier-financier-annuel"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "preparation-dossier-financier-annuel"
groups = [ "FINANCES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "300"
vars.life_noc_threshold_ok_gte = "300"
vars.life_noc_threshold_warning_gte = "365"
vars.life_noc_threshold_critical_gte = "395"
vars.life_noc_on_error = "critical"
notes = "Préparer le dossier financier annuel personnel"
vars.instructions_url = "/life-noc/item/finances-personnelles/preparation-dossier-financier-annuel"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/finances-personnelles/preparation-dossier-financier-annuel"
assign where host.name == "life-noc"
}

View file

@ -5,13 +5,22 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/fiscalite-personnelle.yaml"
vars.life_noc_item_key = "preparation-documents-impots"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "preparation-documents-impots"
groups = [ "FISCALITE-PERSONNELLE" ]
vars.life_noc_threshold_unknown_lt = "5"
vars.life_noc_threshold_ok_gte = "5"
vars.life_noc_threshold_warning_gte = "7"
vars.life_noc_threshold_critical_gte = "10"
vars.life_noc_on_error = "critical"
notes = "Rassembler tous les documents fiscaux personnels"
vars.instructions_url = "/life-noc/item/fiscalite-personnelle/preparation-documents-impots"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/fiscalite-personnelle/preparation-documents-impots"
assign where host.name == "life-noc"
}
@ -22,7 +31,7 @@ apply Service "fiscalite-personnelle-production-impots-federal" {
vars.mock_message = "Sous contrôle"
groups = [ "FISCALITE-PERSONNELLE" ]
notes = "Produire la déclaration de revenus fédérale"
vars.instructions_url = "/life-noc/item/fiscalite-personnelle/production-impots-federal"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/fiscalite-personnelle/production-impots-federal"
assign where host.name == "life-noc"
}
@ -33,7 +42,7 @@ apply Service "fiscalite-personnelle-production-impots-quebec" {
vars.mock_message = "Sous contrôle"
groups = [ "FISCALITE-PERSONNELLE" ]
notes = "Produire la déclaration de revenus Québec"
vars.instructions_url = "/life-noc/item/fiscalite-personnelle/production-impots-quebec"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/fiscalite-personnelle/production-impots-quebec"
assign where host.name == "life-noc"
}
@ -44,29 +53,47 @@ apply Service "fiscalite-personnelle-paiement-solde-impots" {
vars.mock_message = "Sous contrôle"
groups = [ "FISCALITE-PERSONNELLE" ]
notes = "Payer tout solde d'impôt exigible"
vars.instructions_url = "/life-noc/item/fiscalite-personnelle/paiement-solde-impots"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/fiscalite-personnelle/paiement-solde-impots"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/fiscalite-personnelle.yaml"
vars.life_noc_item_key = "verification-avis-cotisation"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-avis-cotisation"
groups = [ "FISCALITE-PERSONNELLE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier les avis de cotisation ARC et Revenu Québec"
vars.instructions_url = "/life-noc/item/fiscalite-personnelle/verification-avis-cotisation"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/fiscalite-personnelle/verification-avis-cotisation"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/fiscalite-personnelle.yaml"
vars.life_noc_item_key = "archivage-documents-fiscaux"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "archivage-documents-fiscaux"
groups = [ "FISCALITE-PERSONNELLE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Archiver les documents fiscaux personnels"
vars.instructions_url = "/life-noc/item/fiscalite-personnelle/archivage-documents-fiscaux"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/fiscalite-personnelle/archivage-documents-fiscaux"
assign where host.name == "life-noc"
}
@ -77,6 +104,6 @@ apply Service "fiscalite-personnelle-verification-acomptes-provisionnels" {
vars.mock_message = "Sous contrôle"
groups = [ "FISCALITE-PERSONNELLE" ]
notes = "Vérifier si des acomptes provisionnels sont requis"
vars.instructions_url = "/life-noc/item/fiscalite-personnelle/verification-acomptes-provisionnels"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/fiscalite-personnelle/verification-acomptes-provisionnels"
assign where host.name == "life-noc"
}

View file

@ -5,34 +5,61 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/focus.yaml"
vars.life_noc_item_key = "entretien-processus-focus"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "entretien-processus-focus"
groups = [ "FOCUS" ]
vars.life_noc_threshold_unknown_lt = "5"
vars.life_noc_threshold_ok_gte = "5"
vars.life_noc_threshold_warning_gte = "7"
vars.life_noc_threshold_critical_gte = "10"
vars.life_noc_on_error = "critical"
notes = "Vérifier que les cartouches FOCUS sont à jour"
vars.instructions_url = "/life-noc/item/focus/entretien-processus-focus"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/focus/entretien-processus-focus"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/focus.yaml"
vars.life_noc_item_key = "nettoyage-inbox-mentale"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "nettoyage-inbox-mentale"
groups = [ "FOCUS" ]
vars.life_noc_threshold_unknown_lt = "5"
vars.life_noc_threshold_ok_gte = "5"
vars.life_noc_threshold_warning_gte = "7"
vars.life_noc_threshold_critical_gte = "10"
vars.life_noc_on_error = "critical"
notes = "Vider et clarifier les éléments capturés hors système"
vars.instructions_url = "/life-noc/item/focus/nettoyage-inbox-mentale"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/focus/nettoyage-inbox-mentale"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/focus.yaml"
vars.life_noc_item_key = "revue-limitation-engagements"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-limitation-engagements"
groups = [ "FOCUS" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérifier que les engagements actifs demeurent réalistes"
vars.instructions_url = "/life-noc/item/focus/revue-limitation-engagements"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/focus/revue-limitation-engagements"
assign where host.name == "life-noc"
}

View file

@ -5,56 +5,101 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/garage-et-rangement.yaml"
vars.life_noc_item_key = "inspection-rangement-plafond"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-rangement-plafond"
groups = [ "GARAGE-ET-RANGEMENT" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des supports suspendus au plafond du garage"
vars.instructions_url = "/life-noc/item/garage-et-rangement/inspection-rangement-plafond"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/garage-et-rangement/inspection-rangement-plafond"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/garage-et-rangement.yaml"
vars.life_noc_item_key = "revue-inventaire-garage"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-inventaire-garage"
groups = [ "GARAGE-ET-RANGEMENT" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Revue de l'inventaire et de l'ordre du garage"
vars.instructions_url = "/life-noc/item/garage-et-rangement/revue-inventaire-garage"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/garage-et-rangement/revue-inventaire-garage"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/garage-et-rangement.yaml"
vars.life_noc_item_key = "verification-rouille-outillage"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-rouille-outillage"
groups = [ "GARAGE-ET-RANGEMENT" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification de la corrosion sur les outils et équipements"
vars.instructions_url = "/life-noc/item/garage-et-rangement/verification-rouille-outillage"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/garage-et-rangement/verification-rouille-outillage"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/garage-et-rangement.yaml"
vars.life_noc_item_key = "inspection-securite-garage"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-securite-garage"
groups = [ "GARAGE-ET-RANGEMENT" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des conditions de sécurité du garage"
vars.instructions_url = "/life-noc/item/garage-et-rangement/inspection-securite-garage"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/garage-et-rangement/inspection-securite-garage"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/garage-et-rangement.yaml"
vars.life_noc_item_key = "rotation-stockage-bacs"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "rotation-stockage-bacs"
groups = [ "GARAGE-ET-RANGEMENT" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue des contenus de bacs de rangement"
vars.instructions_url = "/life-noc/item/garage-et-rangement/rotation-stockage-bacs"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/garage-et-rangement/rotation-stockage-bacs"
assign where host.name == "life-noc"
}

View file

@ -5,56 +5,101 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/informatique-personnelle.yaml"
vars.life_noc_item_key = "verification-sauvegardes-personnelles"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-sauvegardes-personnelles"
groups = [ "INFORMATIQUE-PERSONNELLE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des sauvegardes personnelles"
vars.instructions_url = "/life-noc/item/informatique-personnelle/verification-sauvegardes-personnelles"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/informatique-personnelle/verification-sauvegardes-personnelles"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/informatique-personnelle.yaml"
vars.life_noc_item_key = "nettoyage-stockage-personnel"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "nettoyage-stockage-personnel"
groups = [ "INFORMATIQUE-PERSONNELLE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Nettoyage du stockage numérique personnel"
vars.instructions_url = "/life-noc/item/informatique-personnelle/nettoyage-stockage-personnel"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/informatique-personnelle/nettoyage-stockage-personnel"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/informatique-personnelle.yaml"
vars.life_noc_item_key = "verification-comptes-importants"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-comptes-importants"
groups = [ "INFORMATIQUE-PERSONNELLE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des comptes numériques personnels importants"
vars.instructions_url = "/life-noc/item/informatique-personnelle/verification-comptes-importants"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/informatique-personnelle/verification-comptes-importants"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/informatique-personnelle.yaml"
vars.life_noc_item_key = "revue-mots-de-passe-personnels"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-mots-de-passe-personnels"
groups = [ "INFORMATIQUE-PERSONNELLE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue des mots de passe personnels critiques"
vars.instructions_url = "/life-noc/item/informatique-personnelle/revue-mots-de-passe-personnels"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/informatique-personnelle/revue-mots-de-passe-personnels"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/informatique-personnelle.yaml"
vars.life_noc_item_key = "verification-documents-cloud-personnels"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-documents-cloud-personnels"
groups = [ "INFORMATIQUE-PERSONNELLE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier la cohérence des documents personnels sauvegardés"
vars.instructions_url = "/life-noc/item/informatique-personnelle/verification-documents-cloud-personnels"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/informatique-personnelle/verification-documents-cloud-personnels"
assign where host.name == "life-noc"
}

View file

@ -5,13 +5,22 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-proxmox"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-proxmox"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification générale de l'environnement Proxmox"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-proxmox"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-proxmox"
assign where host.name == "life-noc"
}
@ -22,29 +31,47 @@ apply Service "infrastructure-chezlepro-verification-ceph" {
vars.mock_message = "Sous contrôle"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
notes = "Vérification générale de l'état Ceph"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-ceph"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-ceph"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "test-restauration-backups"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "test-restauration-backups"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Test de restauration des sauvegardes"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/test-restauration-backups"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/test-restauration-backups"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-pbs-truenas"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-pbs-truenas"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des solutions de sauvegarde et synchronisation"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-pbs-truenas"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-pbs-truenas"
assign where host.name == "life-noc"
}
@ -55,7 +82,7 @@ apply Service "infrastructure-chezlepro-verification-ups-infrastructure" {
vars.mock_message = "Sous contrôle"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
notes = "Vérification des UPS de l'infrastructure"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-ups-infrastructure"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-ups-infrastructure"
assign where host.name == "life-noc"
}
@ -66,83 +93,146 @@ apply Service "infrastructure-chezlepro-verification-capacite-stockage" {
vars.mock_message = "Sous contrôle"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
notes = "Vérifier capacité et croissance du stockage"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-capacite-stockage"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-capacite-stockage"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-apt-cacher-ng"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-apt-cacher-ng"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification du bon fonctionnement d'apt-cacher-ng"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-apt-cacher-ng"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-apt-cacher-ng"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-icinga2"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-icinga2"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification de la supervision Icinga2"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-icinga2"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-icinga2"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-keycloak-openldap"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-keycloak-openldap"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification de l'identité et de l'authentification centralisées"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-keycloak-openldap"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-keycloak-openldap"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-nextcloud"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-nextcloud"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification de l'état Nextcloud"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-nextcloud"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-nextcloud"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-mailcow"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-mailcow"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification de l'infrastructure Mailcow"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-mailcow"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-mailcow"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-openvas"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-openvas"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification de la plateforme OpenVAS"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-openvas"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-openvas"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/infrastructure-chezlepro.yaml"
vars.life_noc_item_key = "verification-journaux-systemes"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-journaux-systemes"
groups = [ "INFRASTRUCTURE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Revue des journaux systèmes critiques"
vars.instructions_url = "/life-noc/item/infrastructure-chezlepro/verification-journaux-systemes"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/infrastructure-chezlepro/verification-journaux-systemes"
assign where host.name == "life-noc"
}

View file

@ -5,90 +5,162 @@
*/
apply Service "jardin-inspection-vignes" {
import "service_echeance"
vars.date_echeance = "2026-04-15"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/jardin.yaml"
vars.life_noc_item_key = "inspection-vignes"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-vignes"
groups = [ "JARDIN" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Inspection et entretien des vignes"
vars.instructions_url = "/life-noc/item/jardin/inspection-vignes"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/inspection-vignes"
assign where host.name == "life-noc"
}
apply Service "jardin-entretien-bleuetiers" {
import "service_echeance"
vars.date_echeance = "2026-05-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/jardin.yaml"
vars.life_noc_item_key = "entretien-bleuetiers"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "entretien-bleuetiers"
groups = [ "JARDIN" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Entretien des bleuetiers"
vars.instructions_url = "/life-noc/item/jardin/entretien-bleuetiers"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/entretien-bleuetiers"
assign where host.name == "life-noc"
}
apply Service "jardin-entretien-framboisiers" {
import "service_echeance"
vars.date_echeance = "2026-06-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/jardin.yaml"
vars.life_noc_item_key = "entretien-framboisiers"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "entretien-framboisiers"
groups = [ "JARDIN" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Entretien des framboisiers"
vars.instructions_url = "/life-noc/item/jardin/entretien-framboisiers"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/entretien-framboisiers"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/jardin.yaml"
vars.life_noc_item_key = "inspection-kiwis-nordiques"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-kiwis-nordiques"
groups = [ "JARDIN" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des kiwis nordiques"
vars.instructions_url = "/life-noc/item/jardin/inspection-kiwis-nordiques"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/inspection-kiwis-nordiques"
assign where host.name == "life-noc"
}
apply Service "jardin-entretien-rhubarbe" {
import "service_echeance"
vars.date_echeance = "2026-05-15"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/jardin.yaml"
vars.life_noc_item_key = "entretien-rhubarbe"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "entretien-rhubarbe"
groups = [ "JARDIN" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Entretien de la rhubarbe"
vars.instructions_url = "/life-noc/item/jardin/entretien-rhubarbe"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/entretien-rhubarbe"
assign where host.name == "life-noc"
}
apply Service "jardin-inspection-groseillier" {
import "service_echeance"
vars.date_echeance = "2026-05-15"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/jardin.yaml"
vars.life_noc_item_key = "inspection-groseillier"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-groseillier"
groups = [ "JARDIN" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Inspection du groseillier"
vars.instructions_url = "/life-noc/item/jardin/inspection-groseillier"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/inspection-groseillier"
assign where host.name == "life-noc"
}
apply Service "jardin-inspection-muriers" {
import "service_echeance"
vars.date_echeance = "2026-05-15"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/jardin.yaml"
vars.life_noc_item_key = "inspection-muriers"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-muriers"
groups = [ "JARDIN" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Inspection des mûriers"
vars.instructions_url = "/life-noc/item/jardin/inspection-muriers"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/inspection-muriers"
assign where host.name == "life-noc"
}
apply Service "jardin-entretien-houblon" {
import "service_echeance"
vars.date_echeance = "2026-06-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/jardin.yaml"
vars.life_noc_item_key = "entretien-houblon"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "entretien-houblon"
groups = [ "JARDIN" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification et entretien du houblon"
vars.instructions_url = "/life-noc/item/jardin/entretien-houblon"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/entretien-houblon"
assign where host.name == "life-noc"
}
@ -99,7 +171,7 @@ apply Service "jardin-revision-pharmacopée-jardin" {
vars.mock_message = "Sous contrôle"
groups = [ "JARDIN" ]
notes = "Vérification du stock de soins pour végétaux"
vars.instructions_url = "/life-noc/item/jardin/revision-pharmacopée-jardin"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/revision-pharmacopée-jardin"
assign where host.name == "life-noc"
}
@ -110,6 +182,6 @@ apply Service "jardin-revision-armoire-produits-jardin" {
vars.mock_message = "Sous contrôle"
groups = [ "JARDIN" ]
notes = "Vérification et ordre de l'armoire des produits pour végétaux"
vars.instructions_url = "/life-noc/item/jardin/revision-armoire-produits-jardin"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/jardin/revision-armoire-produits-jardin"
assign where host.name == "life-noc"
}

View file

@ -5,167 +5,302 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "remplacement-filtre-fournaise"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "remplacement-filtre-fournaise"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Remplacer le filtre de la fournaise"
vars.instructions_url = "/life-noc/item/maison/remplacement-filtre-fournaise"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/remplacement-filtre-fournaise"
assign where host.name == "life-noc"
}
apply Service "maison-inspection-fournaise" {
import "service_echeance"
vars.date_echeance = "2026-09-15"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "inspection-fournaise"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-fournaise"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "150"
vars.life_noc_threshold_ok_gte = "150"
vars.life_noc_threshold_warning_gte = "180"
vars.life_noc_threshold_critical_gte = "210"
vars.life_noc_on_error = "critical"
notes = "Inspection générale de la fournaise avant saison froide"
vars.instructions_url = "/life-noc/item/maison/inspection-fournaise"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/inspection-fournaise"
assign where host.name == "life-noc"
}
apply Service "maison-inspection-thermopompe" {
import "service_echeance"
vars.date_echeance = "2026-05-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "inspection-thermopompe"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-thermopompe"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Inspection et entretien de la thermopompe"
vars.instructions_url = "/life-noc/item/maison/inspection-thermopompe"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/inspection-thermopompe"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "nettoyage-unites-exterieures"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "nettoyage-unites-exterieures"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Nettoyer les unités extérieures et vérifier le dégagement"
vars.instructions_url = "/life-noc/item/maison/nettoyage-unites-exterieures"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/nettoyage-unites-exterieures"
assign where host.name == "life-noc"
}
apply Service "maison-inspection-toiture" {
import "service_echeance"
vars.date_echeance = "2026-10-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "inspection-toiture"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-toiture"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "150"
vars.life_noc_threshold_ok_gte = "150"
vars.life_noc_threshold_warning_gte = "180"
vars.life_noc_threshold_critical_gte = "210"
vars.life_noc_on_error = "critical"
notes = "Inspection annuelle de la toiture"
vars.instructions_url = "/life-noc/item/maison/inspection-toiture"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/inspection-toiture"
assign where host.name == "life-noc"
}
apply Service "maison-inspection-gouttieres" {
import "service_echeance"
vars.date_echeance = "2026-11-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "inspection-gouttieres"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-gouttieres"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "150"
vars.life_noc_threshold_ok_gte = "150"
vars.life_noc_threshold_warning_gte = "180"
vars.life_noc_threshold_critical_gte = "210"
vars.life_noc_on_error = "critical"
notes = "Inspection et nettoyage des gouttières"
vars.instructions_url = "/life-noc/item/maison/inspection-gouttieres"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/inspection-gouttieres"
assign where host.name == "life-noc"
}
apply Service "maison-inspection-fondation" {
import "service_echeance"
vars.date_echeance = "2026-06-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "inspection-fondation"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-fondation"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Inspection de la fondation et des fissures"
vars.instructions_url = "/life-noc/item/maison/inspection-fondation"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/inspection-fondation"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "verification-drainage-terrain"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-drainage-terrain"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification du drainage autour de la maison"
vars.instructions_url = "/life-noc/item/maison/verification-drainage-terrain"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/verification-drainage-terrain"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "test-detecteurs-fumee"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "test-detecteurs-fumee"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Test des détecteurs de fumée"
vars.instructions_url = "/life-noc/item/maison/test-detecteurs-fumee"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/test-detecteurs-fumee"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "test-detecteurs-co"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "test-detecteurs-co"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Test des détecteurs de monoxyde de carbone"
vars.instructions_url = "/life-noc/item/maison/test-detecteurs-co"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/test-detecteurs-co"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "remplacement-piles-detecteurs"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "remplacement-piles-detecteurs"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "150"
vars.life_noc_threshold_ok_gte = "150"
vars.life_noc_threshold_warning_gte = "180"
vars.life_noc_threshold_critical_gte = "210"
vars.life_noc_on_error = "critical"
notes = "Remplacement préventif des piles des détecteurs"
vars.instructions_url = "/life-noc/item/maison/remplacement-piles-detecteurs"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/remplacement-piles-detecteurs"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "verification-plomberie-visible"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-plomberie-visible"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification visuelle de la plomberie accessible"
vars.instructions_url = "/life-noc/item/maison/verification-plomberie-visible"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/verification-plomberie-visible"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "inspection-sump-pump"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-sump-pump"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification de la pompe de puisard si applicable"
vars.instructions_url = "/life-noc/item/maison/inspection-sump-pump"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/inspection-sump-pump"
assign where host.name == "life-noc"
}
apply Service "maison-verification-calfetrage" {
import "service_echeance"
vars.date_echeance = "2026-10-15"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "verification-calfetrage"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-calfetrage"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "150"
vars.life_noc_threshold_ok_gte = "150"
vars.life_noc_threshold_warning_gte = "180"
vars.life_noc_threshold_critical_gte = "210"
vars.life_noc_on_error = "critical"
notes = "Vérification du calfeutrage portes et fenêtres"
vars.instructions_url = "/life-noc/item/maison/verification-calfetrage"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/verification-calfetrage"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/maison.yaml"
vars.life_noc_item_key = "inspection-portes-garage"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-portes-garage"
groups = [ "MAISON" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification mécanique et sécurité des portes de garage"
vars.instructions_url = "/life-noc/item/maison/inspection-portes-garage"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/inspection-portes-garage"
assign where host.name == "life-noc"
}
@ -176,6 +311,6 @@ apply Service "maison-verification-extincteurs" {
vars.mock_message = "Sous contrôle"
groups = [ "MAISON" ]
notes = "Vérification des extincteurs"
vars.instructions_url = "/life-noc/item/maison/verification-extincteurs"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/maison/verification-extincteurs"
assign where host.name == "life-noc"
}

View file

@ -11,7 +11,7 @@ apply Service "obligations-chezlepro-verification-registraire-entreprise" {
vars.mock_message = "Sous contrôle"
groups = [ "OBLIGATIONS-CHEZLEPRO" ]
notes = "Vérifier les obligations au Registraire des entreprises"
vars.instructions_url = "/life-noc/item/obligations-chezlepro/verification-registraire-entreprise"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-chezlepro/verification-registraire-entreprise"
assign where host.name == "life-noc"
}
@ -22,40 +22,67 @@ apply Service "obligations-chezlepro-verification-declarations-taxes" {
vars.mock_message = "Sous contrôle"
groups = [ "OBLIGATIONS-CHEZLEPRO" ]
notes = "Vérifier les obligations de taxes de l'entreprise si applicables"
vars.instructions_url = "/life-noc/item/obligations-chezlepro/verification-declarations-taxes"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-chezlepro/verification-declarations-taxes"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/obligations-chezlepro.yaml"
vars.life_noc_item_key = "verification-dossier-comptable-entreprise"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-dossier-comptable-entreprise"
groups = [ "OBLIGATIONS-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérifier l'ordre du dossier comptable Chezlepro"
vars.instructions_url = "/life-noc/item/obligations-chezlepro/verification-dossier-comptable-entreprise"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-chezlepro/verification-dossier-comptable-entreprise"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/obligations-chezlepro.yaml"
vars.life_noc_item_key = "verification-facturation-clients"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-facturation-clients"
groups = [ "OBLIGATIONS-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérifier la facturation et son suivi"
vars.instructions_url = "/life-noc/item/obligations-chezlepro/verification-facturation-clients"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-chezlepro/verification-facturation-clients"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/obligations-chezlepro.yaml"
vars.life_noc_item_key = "verification-paiements-fournisseurs"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-paiements-fournisseurs"
groups = [ "OBLIGATIONS-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérifier les paiements fournisseurs"
vars.instructions_url = "/life-noc/item/obligations-chezlepro/verification-paiements-fournisseurs"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-chezlepro/verification-paiements-fournisseurs"
assign where host.name == "life-noc"
}
@ -66,7 +93,7 @@ apply Service "obligations-chezlepro-verification-contrats-ententes" {
vars.mock_message = "Sous contrôle"
groups = [ "OBLIGATIONS-CHEZLEPRO" ]
notes = "Vérifier contrats, ententes et obligations associées"
vars.instructions_url = "/life-noc/item/obligations-chezlepro/verification-contrats-ententes"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-chezlepro/verification-contrats-ententes"
assign where host.name == "life-noc"
}
@ -77,17 +104,26 @@ apply Service "obligations-chezlepro-verification-assurances-entreprise" {
vars.mock_message = "Sous contrôle"
groups = [ "OBLIGATIONS-CHEZLEPRO" ]
notes = "Vérifier les assurances de l'entreprise"
vars.instructions_url = "/life-noc/item/obligations-chezlepro/verification-assurances-entreprise"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-chezlepro/verification-assurances-entreprise"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/obligations-chezlepro.yaml"
vars.life_noc_item_key = "archivage-documents-entreprise"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "archivage-documents-entreprise"
groups = [ "OBLIGATIONS-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Archiver les documents administratifs et financiers de l'entreprise"
vars.instructions_url = "/life-noc/item/obligations-chezlepro/archivage-documents-entreprise"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-chezlepro/archivage-documents-entreprise"
assign where host.name == "life-noc"
}

View file

@ -5,46 +5,82 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/obligations-legales-personnelles.yaml"
vars.life_noc_item_key = "verification-testament"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-testament"
groups = [ "OBLIGATIONS-LEGALES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier la pertinence et l'actualité du testament"
vars.instructions_url = "/life-noc/item/obligations-legales-personnelles/verification-testament"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-legales-personnelles/verification-testament"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/obligations-legales-personnelles.yaml"
vars.life_noc_item_key = "verification-mandat-inaptitude"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-mandat-inaptitude"
groups = [ "OBLIGATIONS-LEGALES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier le mandat de protection et documents connexes"
vars.instructions_url = "/life-noc/item/obligations-legales-personnelles/verification-mandat-inaptitude"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-legales-personnelles/verification-mandat-inaptitude"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/obligations-legales-personnelles.yaml"
vars.life_noc_item_key = "verification-directives-medicales"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-directives-medicales"
groups = [ "OBLIGATIONS-LEGALES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "150"
vars.life_noc_threshold_ok_gte = "150"
vars.life_noc_threshold_warning_gte = "180"
vars.life_noc_threshold_critical_gte = "210"
vars.life_noc_on_error = "critical"
notes = "Vérifier les directives médicales anticipées"
vars.instructions_url = "/life-noc/item/obligations-legales-personnelles/verification-directives-medicales"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-legales-personnelles/verification-directives-medicales"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/obligations-legales-personnelles.yaml"
vars.life_noc_item_key = "verification-papiers-identite"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-papiers-identite"
groups = [ "OBLIGATIONS-LEGALES-PERSONNELLES" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier l'expiration des papiers d'identité"
vars.instructions_url = "/life-noc/item/obligations-legales-personnelles/verification-papiers-identite"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-legales-personnelles/verification-papiers-identite"
assign where host.name == "life-noc"
}
@ -64,7 +100,7 @@ apply Service "obligations-legales-personnelles-renouvellement-permis-conduire"
vars.life_noc_threshold_critical_lt = "7"
vars.life_noc_on_error = "critical"
notes = "Vérifier la proximité de léchéance du permis"
vars.instructions_url = "/life-noc/item/obligations-legales-personnelles/renouvellement-permis-conduire"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-legales-personnelles/renouvellement-permis-conduire"
assign where host.name == "life-noc"
}
@ -75,7 +111,7 @@ apply Service "obligations-legales-personnelles-verification-carte-assurance-mal
vars.mock_message = "Sous contrôle"
groups = [ "OBLIGATIONS-LEGALES-PERSONNELLES" ]
notes = "Vérifier l'expiration de la carte d'assurance maladie"
vars.instructions_url = "/life-noc/item/obligations-legales-personnelles/verification-carte-assurance-maladie"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-legales-personnelles/verification-carte-assurance-maladie"
assign where host.name == "life-noc"
}
@ -86,6 +122,6 @@ apply Service "obligations-legales-personnelles-verification-passeport" {
vars.mock_message = "Sous contrôle"
groups = [ "OBLIGATIONS-LEGALES-PERSONNELLES" ]
notes = "Vérifier l'expiration du passeport"
vars.instructions_url = "/life-noc/item/obligations-legales-personnelles/verification-passeport"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/obligations-legales-personnelles/verification-passeport"
assign where host.name == "life-noc"
}

View file

@ -5,56 +5,101 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/outils-et-equipements.yaml"
vars.life_noc_item_key = "entretien-outils-jardin"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "entretien-outils-jardin"
groups = [ "OUTILS-ET-EQUIPEMENTS" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Nettoyage et entretien des outils de jardin"
vars.instructions_url = "/life-noc/item/outils-et-equipements/entretien-outils-jardin"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/outils-et-equipements/entretien-outils-jardin"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/outils-et-equipements.yaml"
vars.life_noc_item_key = "inspection-outils-electriques"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "inspection-outils-electriques"
groups = [ "OUTILS-ET-EQUIPEMENTS" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des outils électriques"
vars.instructions_url = "/life-noc/item/outils-et-equipements/inspection-outils-electriques"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/outils-et-equipements/inspection-outils-electriques"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/outils-et-equipements.yaml"
vars.life_noc_item_key = "verification-rallonges-et-connecteurs"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-rallonges-et-connecteurs"
groups = [ "OUTILS-ET-EQUIPEMENTS" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des rallonges et connecteurs"
vars.instructions_url = "/life-noc/item/outils-et-equipements/verification-rallonges-et-connecteurs"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/outils-et-equipements/verification-rallonges-et-connecteurs"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/outils-et-equipements.yaml"
vars.life_noc_item_key = "verification-compresseur-et-accessoires"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-compresseur-et-accessoires"
groups = [ "OUTILS-ET-EQUIPEMENTS" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification du compresseur et accessoires"
vars.instructions_url = "/life-noc/item/outils-et-equipements/verification-compresseur-et-accessoires"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/outils-et-equipements/verification-compresseur-et-accessoires"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/outils-et-equipements.yaml"
vars.life_noc_item_key = "revision-inventaire-outillage"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-inventaire-outillage"
groups = [ "OUTILS-ET-EQUIPEMENTS" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue de l'inventaire d'outillage"
vars.instructions_url = "/life-noc/item/outils-et-equipements/revision-inventaire-outillage"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/outils-et-equipements/revision-inventaire-outillage"
assign where host.name == "life-noc"
}

View file

@ -5,67 +5,121 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/projets.yaml"
vars.life_noc_item_key = "revision-life-noc"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-life-noc"
groups = [ "PROJETS" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Révision du projet Life-NOC"
vars.instructions_url = "/life-noc/item/projets/revision-life-noc"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/projets/revision-life-noc"
assign where host.name == "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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/projets.yaml"
vars.life_noc_item_key = "revision-alliance-boreale"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-alliance-boreale"
groups = [ "PROJETS" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Révision du projet Alliance Boréale"
vars.instructions_url = "/life-noc/item/projets/revision-alliance-boreale"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/projets/revision-alliance-boreale"
assign where host.name == "life-noc"
}
apply Service "projets-revision-erplibre" {
import "service_echeance"
vars.date_echeance = "2026-05-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/projets.yaml"
vars.life_noc_item_key = "revision-erplibre"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-erplibre"
groups = [ "PROJETS" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Révision du projet ERPLibre"
vars.instructions_url = "/life-noc/item/projets/revision-erplibre"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/projets/revision-erplibre"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/projets.yaml"
vars.life_noc_item_key = "revision-semence-numerique"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-semence-numerique"
groups = [ "PROJETS" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Révision du projet semence numérique"
vars.instructions_url = "/life-noc/item/projets/revision-semence-numerique"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/projets/revision-semence-numerique"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/projets.yaml"
vars.life_noc_item_key = "revision-ortrux-1"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-ortrux-1"
groups = [ "PROJETS" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Révision du système Ortrux-1"
vars.instructions_url = "/life-noc/item/projets/revision-ortrux-1"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/projets/revision-ortrux-1"
assign where host.name == "life-noc"
}
apply Service "projets-revision-district16" {
import "service_echeance"
vars.date_echeance = "2026-05-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/projets.yaml"
vars.life_noc_item_key = "revision-district16"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-district16"
groups = [ "PROJETS" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Révision du projet DISTRICT16"
vars.instructions_url = "/life-noc/item/projets/revision-district16"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/projets/revision-district16"
assign where host.name == "life-noc"
}

View file

@ -5,24 +5,42 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/reseau-chezlepro.yaml"
vars.life_noc_item_key = "verification-firewalls"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-firewalls"
groups = [ "RESEAU-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des firewalls"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-firewalls"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-firewalls"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/reseau-chezlepro.yaml"
vars.life_noc_item_key = "verification-vpn-openvpn"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-vpn-openvpn"
groups = [ "RESEAU-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des tunnels OpenVPN"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-vpn-openvpn"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-vpn-openvpn"
assign where host.name == "life-noc"
}
@ -33,73 +51,127 @@ apply Service "reseau-chezlepro-verification-crl-certificats" {
vars.mock_message = "Sous contrôle"
groups = [ "RESEAU-CHEZLEPRO" ]
notes = "Vérification de la CRL et des certificats"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-crl-certificats"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-crl-certificats"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/reseau-chezlepro.yaml"
vars.life_noc_item_key = "verification-switches"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-switches"
groups = [ "RESEAU-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des switches et uplinks"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-switches"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-switches"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/reseau-chezlepro.yaml"
vars.life_noc_item_key = "verification-vlans-segmentation"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-vlans-segmentation"
groups = [ "RESEAU-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification de la segmentation réseau"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-vlans-segmentation"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-vlans-segmentation"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/reseau-chezlepro.yaml"
vars.life_noc_item_key = "verification-dns"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-dns"
groups = [ "RESEAU-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification DNS interne et externe"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-dns"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-dns"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/reseau-chezlepro.yaml"
vars.life_noc_item_key = "verification-dynamic-dns"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-dynamic-dns"
groups = [ "RESEAU-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification du DNS dynamique si utilisé"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-dynamic-dns"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-dynamic-dns"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/reseau-chezlepro.yaml"
vars.life_noc_item_key = "audit-regles-firewall"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "audit-regles-firewall"
groups = [ "RESEAU-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Audit périodique des règles de firewall"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/audit-regles-firewall"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/audit-regles-firewall"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/reseau-chezlepro.yaml"
vars.life_noc_item_key = "verification-geoblocking"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-geoblocking"
groups = [ "RESEAU-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier le geoblocking et son effet attendu"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-geoblocking"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-geoblocking"
assign where host.name == "life-noc"
}
@ -110,6 +182,6 @@ apply Service "reseau-chezlepro-verification-certificats-publics" {
vars.mock_message = "Sous contrôle"
groups = [ "RESEAU-CHEZLEPRO" ]
notes = "Vérifier les expirations de certificats publics"
vars.instructions_url = "/life-noc/item/reseau-chezlepro/verification-certificats-publics"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/reseau-chezlepro/verification-certificats-publics"
assign where host.name == "life-noc"
}

View file

@ -5,13 +5,22 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/resilience.yaml"
vars.life_noc_item_key = "test-generatrice-propane"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "test-generatrice-propane"
groups = [ "RESILIENCE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Test mensuel de la génératrice au propane"
vars.instructions_url = "/life-noc/item/resilience/test-generatrice-propane"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/resilience/test-generatrice-propane"
assign where host.name == "life-noc"
}
@ -22,18 +31,27 @@ apply Service "resilience-verification-carburant-generatrice" {
vars.mock_message = "Sous contrôle"
groups = [ "RESILIENCE" ]
notes = "Vérification de l'approvisionnement propane lié à la génératrice"
vars.instructions_url = "/life-noc/item/resilience/verification-carburant-generatrice"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/resilience/verification-carburant-generatrice"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/resilience.yaml"
vars.life_noc_item_key = "verification-procedure-bascule"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-procedure-bascule"
groups = [ "RESILIENCE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Réviser la procédure de bascule en mode secours"
vars.instructions_url = "/life-noc/item/resilience/verification-procedure-bascule"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/resilience/verification-procedure-bascule"
assign where host.name == "life-noc"
}
@ -44,7 +62,7 @@ apply Service "resilience-verification-stock-lampes-piles" {
vars.mock_message = "Sous contrôle"
groups = [ "RESILIENCE" ]
notes = "Vérification des lampes, piles et éclairage d'urgence"
vars.instructions_url = "/life-noc/item/resilience/verification-stock-lampes-piles"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/resilience/verification-stock-lampes-piles"
assign where host.name == "life-noc"
}
@ -55,29 +73,47 @@ apply Service "resilience-verification-trousses-urgence" {
vars.mock_message = "Sous contrôle"
groups = [ "RESILIENCE" ]
notes = "Vérification des trousses d'urgence"
vars.instructions_url = "/life-noc/item/resilience/verification-trousses-urgence"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/resilience/verification-trousses-urgence"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/resilience.yaml"
vars.life_noc_item_key = "revision-plan-urgence"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revision-plan-urgence"
groups = [ "RESILIENCE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Réviser le plan d'urgence domestique"
vars.instructions_url = "/life-noc/item/resilience/revision-plan-urgence"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/resilience/revision-plan-urgence"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/resilience.yaml"
vars.life_noc_item_key = "test-autonomie-base"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "test-autonomie-base"
groups = [ "RESILIENCE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier l'autonomie énergétique minimale attendue"
vars.instructions_url = "/life-noc/item/resilience/test-autonomie-base"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/resilience/test-autonomie-base"
assign where host.name == "life-noc"
}
@ -88,6 +124,6 @@ apply Service "resilience-verification-moyens-cuisson-secours" {
vars.mock_message = "Sous contrôle"
groups = [ "RESILIENCE" ]
notes = "Vérification des moyens de cuisson de secours"
vars.instructions_url = "/life-noc/item/resilience/verification-moyens-cuisson-secours"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/resilience/verification-moyens-cuisson-secours"
assign where host.name == "life-noc"
}

View file

@ -20,7 +20,7 @@ apply Service "revue-revue-quotidienne-life-noc" {
vars.life_noc_threshold_critical_gte = "3"
vars.life_noc_on_error = "critical"
notes = "Vérifier le tableau de bord Life-NOC"
vars.instructions_url = "/life-noc/item/revue/revue-quotidienne-life-noc"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/revue/revue-quotidienne-life-noc"
assign where host.name == "life-noc"
}
@ -45,23 +45,41 @@ 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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/revue.yaml"
vars.life_noc_item_key = "revue-mensuelle-systeme-vie"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-mensuelle-systeme-vie"
groups = [ "REVUE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Revue mensuelle de l'ensemble du système Life-NOC"
vars.instructions_url = "/life-noc/item/revue/revue-mensuelle-systeme-vie"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/revue/revue-mensuelle-systeme-vie"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/revue.yaml"
vars.life_noc_item_key = "revue-trimestrielle-orientation"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-trimestrielle-orientation"
groups = [ "REVUE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue trimestrielle des orientations de vie et de Chezlepro"
vars.instructions_url = "/life-noc/item/revue/revue-trimestrielle-orientation"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/revue/revue-trimestrielle-orientation"
assign where host.name == "life-noc"
}

View file

@ -11,7 +11,7 @@ apply Service "sante-verification-trousse-premiers-soins" {
vars.mock_message = "Sous contrôle"
groups = [ "SANTE" ]
notes = "Vérification de la trousse de premiers soins"
vars.instructions_url = "/life-noc/item/sante/verification-trousse-premiers-soins"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/sante/verification-trousse-premiers-soins"
assign where host.name == "life-noc"
}
@ -22,7 +22,7 @@ apply Service "sante-verification-expiration-medicaments" {
vars.mock_message = "Sous contrôle"
groups = [ "SANTE" ]
notes = "Vérification des dates d'expiration des médicaments"
vars.instructions_url = "/life-noc/item/sante/verification-expiration-medicaments"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/sante/verification-expiration-medicaments"
assign where host.name == "life-noc"
}
@ -33,7 +33,7 @@ apply Service "sante-revision-rendez-vous-medicaux" {
vars.mock_message = "Sous contrôle"
groups = [ "SANTE" ]
notes = "Revoir les rendez-vous médicaux requis"
vars.instructions_url = "/life-noc/item/sante/revision-rendez-vous-medicaux"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/sante/revision-rendez-vous-medicaux"
assign where host.name == "life-noc"
}
@ -44,17 +44,26 @@ apply Service "sante-verification-lunettes-prescriptions" {
vars.mock_message = "Sous contrôle"
groups = [ "SANTE" ]
notes = "Vérifier les prescriptions et besoins de renouvellement"
vars.instructions_url = "/life-noc/item/sante/verification-lunettes-prescriptions"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/sante/verification-lunettes-prescriptions"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/sante.yaml"
vars.life_noc_item_key = "verification-dossier-sante"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-dossier-sante"
groups = [ "SANTE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérifier l'ordre et l'accessibilité des documents de santé"
vars.instructions_url = "/life-noc/item/sante/verification-dossier-sante"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/sante/verification-dossier-sante"
assign where host.name == "life-noc"
}

View file

@ -5,35 +5,62 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/securite-chezlepro.yaml"
vars.life_noc_item_key = "verification-mises-a-jour-securite"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-mises-a-jour-securite"
groups = [ "SECURITE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérification des mises à jour de sécurité"
vars.instructions_url = "/life-noc/item/securite-chezlepro/verification-mises-a-jour-securite"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/securite-chezlepro/verification-mises-a-jour-securite"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/securite-chezlepro.yaml"
vars.life_noc_item_key = "audit-comptes-acces"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "audit-comptes-acces"
groups = [ "SECURITE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Audit des comptes et accès privilégiés"
vars.instructions_url = "/life-noc/item/securite-chezlepro/audit-comptes-acces"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/securite-chezlepro/audit-comptes-acces"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/securite-chezlepro.yaml"
vars.life_noc_item_key = "verification-ids-snort"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-ids-snort"
groups = [ "SECURITE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des IDS et de leur état"
vars.instructions_url = "/life-noc/item/securite-chezlepro/verification-ids-snort"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/securite-chezlepro/verification-ids-snort"
assign where host.name == "life-noc"
}
@ -44,28 +71,46 @@ apply Service "securite-chezlepro-revue-pki-privee" {
vars.mock_message = "Sous contrôle"
groups = [ "SECURITE-CHEZLEPRO" ]
notes = "Revue de la PKI privée et des autorités intermédiaires"
vars.instructions_url = "/life-noc/item/securite-chezlepro/revue-pki-privee"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/securite-chezlepro/revue-pki-privee"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/securite-chezlepro.yaml"
vars.life_noc_item_key = "revue-politiques-securite"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "revue-politiques-securite"
groups = [ "SECURITE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Revue des politiques et pratiques de sécurité numérique"
vars.instructions_url = "/life-noc/item/securite-chezlepro/revue-politiques-securite"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/securite-chezlepro/revue-politiques-securite"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/securite-chezlepro.yaml"
vars.life_noc_item_key = "verification-sauvegardes-configuration"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-sauvegardes-configuration"
groups = [ "SECURITE-CHEZLEPRO" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Vérifier les sauvegardes des configurations critiques"
vars.instructions_url = "/life-noc/item/securite-chezlepro/verification-sauvegardes-configuration"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/securite-chezlepro/verification-sauvegardes-configuration"
assign where host.name == "life-noc"
}

View file

@ -5,13 +5,22 @@
*/
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/stock-alimentaire.yaml"
vars.life_noc_item_key = "rotation-nourriture-seche"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "rotation-nourriture-seche"
groups = [ "STOCK-ALIMENTAIRE" ]
vars.life_noc_threshold_unknown_lt = "20"
vars.life_noc_threshold_ok_gte = "20"
vars.life_noc_threshold_warning_gte = "31"
vars.life_noc_threshold_critical_gte = "45"
vars.life_noc_on_error = "critical"
notes = "Rotation des stocks de nourriture sèche"
vars.instructions_url = "/life-noc/item/stock-alimentaire/rotation-nourriture-seche"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/stock-alimentaire/rotation-nourriture-seche"
assign where host.name == "life-noc"
}
@ -22,7 +31,7 @@ apply Service "stock-alimentaire-verification-reserve-eau" {
vars.mock_message = "Sous contrôle"
groups = [ "STOCK-ALIMENTAIRE" ]
notes = "Vérification de la réserve d'eau potable"
vars.instructions_url = "/life-noc/item/stock-alimentaire/verification-reserve-eau"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/stock-alimentaire/verification-reserve-eau"
assign where host.name == "life-noc"
}
@ -33,7 +42,7 @@ apply Service "stock-alimentaire-verification-mylar-absorbeurs" {
vars.mock_message = "Sous contrôle"
groups = [ "STOCK-ALIMENTAIRE" ]
notes = "Vérifier l'intégrité des emballages Mylar et absorbeurs"
vars.instructions_url = "/life-noc/item/stock-alimentaire/verification-mylar-absorbeurs"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/stock-alimentaire/verification-mylar-absorbeurs"
assign where host.name == "life-noc"
}
@ -44,7 +53,7 @@ apply Service "stock-alimentaire-revue-inventaire-conserves" {
vars.mock_message = "Sous contrôle"
groups = [ "STOCK-ALIMENTAIRE" ]
notes = "Revue des conserves et dates de rotation"
vars.instructions_url = "/life-noc/item/stock-alimentaire/revue-inventaire-conserves"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/stock-alimentaire/revue-inventaire-conserves"
assign where host.name == "life-noc"
}
@ -55,7 +64,7 @@ apply Service "stock-alimentaire-revue-inventaire-farine-riz-pates" {
vars.mock_message = "Sous contrôle"
groups = [ "STOCK-ALIMENTAIRE" ]
notes = "Vérification des gros stocks alimentaires de base"
vars.instructions_url = "/life-noc/item/stock-alimentaire/revue-inventaire-farine-riz-pates"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/stock-alimentaire/revue-inventaire-farine-riz-pates"
assign where host.name == "life-noc"
}
@ -66,7 +75,7 @@ apply Service "stock-alimentaire-verification-bacs-legumes-racines" {
vars.mock_message = "Sous contrôle"
groups = [ "STOCK-ALIMENTAIRE" ]
notes = "Vérification des bacs de stockage de légumes racines"
vars.instructions_url = "/life-noc/item/stock-alimentaire/verification-bacs-legumes-racines"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/stock-alimentaire/verification-bacs-legumes-racines"
assign where host.name == "life-noc"
}
@ -77,6 +86,6 @@ apply Service "stock-alimentaire-revue-supplements-vitamines" {
vars.mock_message = "Sous contrôle"
groups = [ "STOCK-ALIMENTAIRE" ]
notes = "Vérification du stock de suppléments et dates utiles"
vars.instructions_url = "/life-noc/item/stock-alimentaire/revue-supplements-vitamines"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/stock-alimentaire/revue-supplements-vitamines"
assign where host.name == "life-noc"
}

View file

@ -11,7 +11,7 @@ apply Service "voiture-verification-huile-moteur" {
vars.mock_message = "Sous contrôle"
groups = [ "VOITURE" ]
notes = "Vérification de l'huile moteur"
vars.instructions_url = "/life-noc/item/voiture/verification-huile-moteur"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/verification-huile-moteur"
assign where host.name == "life-noc"
}
@ -22,7 +22,7 @@ apply Service "voiture-inspection-freins" {
vars.mock_message = "Sous contrôle"
groups = [ "VOITURE" ]
notes = "Inspection des freins"
vars.instructions_url = "/life-noc/item/voiture/inspection-freins"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/inspection-freins"
assign where host.name == "life-noc"
}
@ -33,7 +33,7 @@ apply Service "voiture-verification-pneus" {
vars.mock_message = "Sous contrôle"
groups = [ "VOITURE" ]
notes = "Vérification usure, pression et permutation des pneus"
vars.instructions_url = "/life-noc/item/voiture/verification-pneus"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/verification-pneus"
assign where host.name == "life-noc"
}
@ -44,7 +44,7 @@ apply Service "voiture-ajustement-valves" {
vars.mock_message = "Sous contrôle"
groups = [ "VOITURE" ]
notes = "Vérification et ajustement des valves Honda Accord"
vars.instructions_url = "/life-noc/item/voiture/ajustement-valves"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/ajustement-valves"
assign where host.name == "life-noc"
}
@ -55,7 +55,7 @@ apply Service "voiture-verification-timing-belt" {
vars.mock_message = "Sous contrôle"
groups = [ "VOITURE" ]
notes = "Vérification de la courroie de distribution et pompe à eau"
vars.instructions_url = "/life-noc/item/voiture/verification-timing-belt"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/verification-timing-belt"
assign where host.name == "life-noc"
}
@ -66,18 +66,27 @@ apply Service "voiture-verification-batterie-voiture" {
vars.mock_message = "Sous contrôle"
groups = [ "VOITURE" ]
notes = "Vérification de l'état de la batterie automobile"
vars.instructions_url = "/life-noc/item/voiture/verification-batterie-voiture"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/verification-batterie-voiture"
assign where host.name == "life-noc"
}
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"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/voiture.yaml"
vars.life_noc_item_key = "verification-balais-essuie-glace"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-balais-essuie-glace"
groups = [ "VOITURE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification des essuie-glaces"
vars.instructions_url = "/life-noc/item/voiture/verification-balais-essuie-glace"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/verification-balais-essuie-glace"
assign where host.name == "life-noc"
}
@ -88,18 +97,27 @@ apply Service "voiture-verification-liquides" {
vars.mock_message = "Sous contrôle"
groups = [ "VOITURE" ]
notes = "Vérification des liquides de la voiture"
vars.instructions_url = "/life-noc/item/voiture/verification-liquides"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/verification-liquides"
assign where host.name == "life-noc"
}
apply Service "voiture-verification-eclairage" {
import "service_echeance"
vars.date_echeance = "2026-05-01"
vars.mock_state = "OK"
vars.mock_message = "Sous contrôle"
import "service_life_noc_probe"
vars.life_noc_probe_type = "elapsed_time"
vars.life_noc_source_type = "manual_date"
vars.life_noc_source_value = ""
vars.life_noc_inputs_file = "/opt/life-noc/data/inputs/voiture.yaml"
vars.life_noc_item_key = "verification-eclairage"
vars.life_noc_metric_unit = "days"
vars.life_noc_label = "verification-eclairage"
groups = [ "VOITURE" ]
vars.life_noc_threshold_unknown_lt = "60"
vars.life_noc_threshold_ok_gte = "60"
vars.life_noc_threshold_warning_gte = "90"
vars.life_noc_threshold_critical_gte = "120"
vars.life_noc_on_error = "critical"
notes = "Vérification de l'éclairage et des phares"
vars.instructions_url = "/life-noc/item/voiture/verification-eclairage"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/verification-eclairage"
assign where host.name == "life-noc"
}
@ -110,6 +128,6 @@ apply Service "voiture-verification-immatriculation-assurance" {
vars.mock_message = "Sous contrôle"
groups = [ "VOITURE" ]
notes = "Vérification papiers d'assurance et immatriculation"
vars.instructions_url = "/life-noc/item/voiture/verification-immatriculation-assurance"
vars.instructions_url = "http://192.168.12.40:8787/life-noc/item/voiture/verification-immatriculation-assurance"
assign where host.name == "life-noc"
}

355
lib/life_noc_domains.py Normal file
View file

@ -0,0 +1,355 @@
from __future__ import annotations
from copy import deepcopy
from datetime import datetime, timezone
from pathlib import Path
from typing import Any
import os
import tempfile
import yaml
DOMAINS_FILE = Path(os.environ.get("LIFE_NOC_DOMAINS_FILE", "domains.yaml"))
ALLOWED_PROBE_TYPES = [
"",
"elapsed_time",
"days_until_due",
"elapsed_distance",
"current_value",
"remaining_quantity",
]
ALLOWED_SOURCE_TYPES = [
"",
"manual_date",
"manual_counter",
"manual_value",
"mqtt",
"file_json",
"file_text",
"csv",
"api",
"command",
"derived",
]
ALLOWED_METRIC_UNITS = [
"",
"days",
"km",
"units",
"%",
"volts",
"litres",
"watts",
]
ALLOWED_ON_ERROR = ["", "critical", "warning", "unknown"]
ALLOWED_FORM_MODES = [
"",
"complete_date",
"due_date",
"counter_pair",
"numeric_value",
"remaining_quantity",
]
THRESHOLD_FIELDS = [
"unknown_lt",
"ok_gte",
"warning_gte",
"critical_gte",
"unknown_gte",
"ok_lt",
"warning_lt",
"critical_lt",
]
class DomainsError(ValueError):
pass
class DomainsConflictError(DomainsError):
pass
def _now_suffix() -> str:
return datetime.now(timezone.utc).strftime('%Y%m%dT%H%M%SZ')
def load_domains_document() -> dict[str, Any]:
if not DOMAINS_FILE.exists():
raise DomainsError(f'Fichier introuvable: {DOMAINS_FILE}')
data = yaml.safe_load(DOMAINS_FILE.read_text(encoding='utf-8'))
if not isinstance(data, dict):
raise DomainsError('domains.yaml invalide')
domains = data.get('domains')
if not isinstance(domains, dict):
raise DomainsError("domains.yaml invalide: clé 'domains' absente ou invalide")
return data
def save_domains_document(doc: dict[str, Any], create_backup: bool = True) -> Path:
if not isinstance(doc, dict) or not isinstance(doc.get('domains'), dict):
raise DomainsError("document domains invalide")
target = DOMAINS_FILE
target.parent.mkdir(parents=True, exist_ok=True)
rendered = yaml.safe_dump(doc, sort_keys=False, allow_unicode=True, width=1000)
if create_backup and target.exists():
backup = target.with_suffix(target.suffix + f'.bak.{_now_suffix()}')
backup.write_text(target.read_text(encoding='utf-8'), encoding='utf-8')
fd, tmp_name = tempfile.mkstemp(prefix=target.name + '.', dir=str(target.parent))
try:
with os.fdopen(fd, 'w', encoding='utf-8') as handle:
handle.write(rendered)
os.replace(tmp_name, target)
finally:
if os.path.exists(tmp_name):
os.unlink(tmp_name)
return target
def list_domains() -> list[str]:
doc = load_domains_document()
return list(doc['domains'].keys())
def list_domain_items(domain: str) -> list[dict[str, Any]]:
doc = load_domains_document()
items = doc['domains'].get(domain)
if not isinstance(items, list):
raise KeyError(domain)
return items
def get_domain_item(domain: str, item_key: str) -> dict[str, Any]:
items = list_domain_items(domain)
for item in items:
if isinstance(item, dict) and str(item.get('name', '')).strip() == item_key:
return deepcopy(item)
raise KeyError(item_key)
def _find_item_index(items: list[dict[str, Any]], item_key: str) -> int:
for index, item in enumerate(items):
if isinstance(item, dict) and str(item.get('name', '')).strip() == item_key:
return index
raise KeyError(item_key)
def _clean_value(value: Any) -> Any:
if isinstance(value, dict):
cleaned = {}
for key, subvalue in value.items():
candidate = _clean_value(subvalue)
if candidate in ('', None, {}, []):
continue
cleaned[key] = candidate
return cleaned
if isinstance(value, list):
cleaned_list = [_clean_value(v) for v in value]
return [v for v in cleaned_list if v not in ('', None, {}, [])]
return value
def _parse_number(value: Any) -> Any:
if value is None:
return None
text = str(value).strip()
if text == '':
return None
try:
if any(ch in text for ch in ('.', 'e', 'E')):
number = float(text)
return int(number) if number.is_integer() else number
return int(text)
except ValueError:
raise DomainsError(f'Valeur numérique invalide: {text}')
def _coerce_bool(value: Any) -> bool:
return str(value).strip().lower() in {'1', 'true', 'yes', 'on'}
def _validate_choice(label: str, value: str, allowed: list[str]) -> str:
if value not in allowed:
raise DomainsError(f'{label} invalide: {value}')
return value
def normalize_item_payload(form: dict[str, Any], existing_item: dict[str, Any] | None = None) -> dict[str, Any]:
base = deepcopy(existing_item) if existing_item else {}
name = str(form.get('name', base.get('name', ''))).strip()
if not name:
raise DomainsError("Le champ 'name' est obligatoire.")
item: dict[str, Any] = {'name': name}
date_value = str(form.get('date', base.get('date', ''))).strip()
if date_value:
item['date'] = date_value
for field in ['title', 'summary', 'notes', 'instructions', 'notes_url', 'instructions_url', 'action_url']:
raw = form.get(field, base.get(field, ''))
value = str(raw).strip() if raw is not None else ''
if value:
item[field] = value
probe_type = str(form.get('probe_type', base.get('probe', {}).get('type', ''))).strip()
source_type = str(form.get('probe_source_type', base.get('probe', {}).get('source', {}).get('type', ''))).strip()
inputs_file = str(form.get('probe_inputs_file', base.get('probe', {}).get('source', {}).get('inputs_file', ''))).strip()
source_item_key = str(form.get('probe_item_key', base.get('probe', {}).get('source', {}).get('item_key', ''))).strip()
metric_unit = str(form.get('metric_unit', base.get('probe', {}).get('metric', {}).get('unit', ''))).strip()
on_error = str(form.get('policy_on_error', base.get('probe', {}).get('policy', {}).get('on_error', ''))).strip()
_validate_choice('probe.type', probe_type, ALLOWED_PROBE_TYPES)
_validate_choice('probe.source.type', source_type, ALLOWED_SOURCE_TYPES)
_validate_choice('metric.unit', metric_unit, ALLOWED_METRIC_UNITS)
_validate_choice('policy.on_error', on_error, ALLOWED_ON_ERROR)
thresholds: dict[str, Any] = {}
base_thresholds = base.get('probe', {}).get('thresholds', {}) if isinstance(base.get('probe'), dict) else {}
for field in THRESHOLD_FIELDS:
raw = form.get(field, base_thresholds.get(field, ''))
parsed = _parse_number(raw)
if parsed is not None:
thresholds[field] = parsed
if probe_type or source_type or inputs_file or source_item_key or metric_unit or thresholds or on_error:
probe: dict[str, Any] = {}
if probe_type:
probe['type'] = probe_type
source: dict[str, Any] = {}
if source_type:
source['type'] = source_type
if inputs_file:
source['inputs_file'] = inputs_file
if source_item_key:
source['item_key'] = source_item_key
if source:
probe['source'] = source
if metric_unit:
probe['metric'] = {'unit': metric_unit}
if thresholds:
probe['thresholds'] = thresholds
if on_error:
probe['policy'] = {'on_error': on_error}
item['probe'] = probe
form_mode = str(form.get('ui_form_mode', base.get('ui', {}).get('form_mode', ''))).strip()
_validate_choice('ui.form_mode', form_mode, ALLOWED_FORM_MODES)
allow_complete = _coerce_bool(form.get('ui_allow_complete', base.get('ui', {}).get('allow_complete', False)))
allow_manual_edit = _coerce_bool(form.get('ui_allow_manual_edit', base.get('ui', {}).get('allow_manual_edit', False)))
if form_mode or allow_complete or allow_manual_edit:
ui: dict[str, Any] = {}
if form_mode:
ui['form_mode'] = form_mode
if allow_complete:
ui['allow_complete'] = True
if allow_manual_edit:
ui['allow_manual_edit'] = True
item['ui'] = ui
normalized = _clean_value(item)
_validate_item_structure(normalized)
return normalized
def _validate_item_structure(item: dict[str, Any]) -> None:
if 'name' not in item or not str(item['name']).strip():
raise DomainsError("Le champ 'name' est obligatoire.")
probe = item.get('probe')
if probe is None:
return
if not isinstance(probe, dict):
raise DomainsError('probe doit être un objet')
if 'type' not in probe:
raise DomainsError("probe.type est requis dès qu'un probe est défini")
source = probe.get('source')
if source is not None and not isinstance(source, dict):
raise DomainsError('probe.source doit être un objet')
metric = probe.get('metric')
if metric is not None and not isinstance(metric, dict):
raise DomainsError('probe.metric doit être un objet')
thresholds = probe.get('thresholds')
if thresholds is not None and not isinstance(thresholds, dict):
raise DomainsError('probe.thresholds doit être un objet')
def upsert_item(domain: str, item: dict[str, Any], original_item_key: str | None = None) -> Path:
doc = load_domains_document()
items = doc['domains'].get(domain)
if not isinstance(items, list):
raise KeyError(domain)
existing_names = [str(entry.get('name', '')).strip() for entry in items if isinstance(entry, dict)]
new_name = str(item['name']).strip()
if new_name in existing_names and original_item_key != new_name:
raise DomainsConflictError(f"Un item nommé '{new_name}' existe déjà dans le domaine '{domain}'.")
if original_item_key:
index = _find_item_index(items, original_item_key)
items[index] = item
else:
items.append(item)
return save_domains_document(doc)
def delete_item(domain: str, item_key: str) -> Path:
doc = load_domains_document()
items = doc['domains'].get(domain)
if not isinstance(items, list):
raise KeyError(domain)
index = _find_item_index(items, item_key)
items.pop(index)
return save_domains_document(doc)
def reorder_item(domain: str, item_key: str, direction: str) -> Path:
if direction not in {'up', 'down'}:
raise DomainsError('direction invalide')
doc = load_domains_document()
items = doc['domains'].get(domain)
if not isinstance(items, list):
raise KeyError(domain)
index = _find_item_index(items, item_key)
if direction == 'up' and index > 0:
items[index - 1], items[index] = items[index], items[index - 1]
elif direction == 'down' and index < len(items) - 1:
items[index + 1], items[index] = items[index], items[index + 1]
return save_domains_document(doc)
def item_to_form_values(item: dict[str, Any] | None, domain: str = '') -> dict[str, Any]:
item = deepcopy(item) if item else {}
probe = item.get('probe', {}) if isinstance(item.get('probe'), dict) else {}
source = probe.get('source', {}) if isinstance(probe.get('source'), dict) else {}
metric = probe.get('metric', {}) if isinstance(probe.get('metric'), dict) else {}
thresholds = probe.get('thresholds', {}) if isinstance(probe.get('thresholds'), dict) else {}
policy = probe.get('policy', {}) if isinstance(probe.get('policy'), dict) else {}
ui = item.get('ui', {}) if isinstance(item.get('ui'), dict) else {}
values = {
'domain': domain,
'name': item.get('name', ''),
'date': item.get('date', ''),
'title': item.get('title', ''),
'summary': item.get('summary', ''),
'notes': item.get('notes', ''),
'instructions': item.get('instructions', ''),
'notes_url': item.get('notes_url', ''),
'instructions_url': item.get('instructions_url', ''),
'action_url': item.get('action_url', ''),
'probe_type': probe.get('type', ''),
'probe_source_type': source.get('type', ''),
'probe_inputs_file': source.get('inputs_file', ''),
'probe_item_key': source.get('item_key', ''),
'metric_unit': metric.get('unit', ''),
'policy_on_error': policy.get('on_error', ''),
'ui_form_mode': ui.get('form_mode', ''),
'ui_allow_complete': bool(ui.get('allow_complete', False)),
'ui_allow_manual_edit': bool(ui.get('allow_manual_edit', False)),
}
for field in THRESHOLD_FIELDS:
values[field] = thresholds.get(field, '')
return values

View file

@ -2,6 +2,7 @@
from pathlib import Path
import re
import os
import sys
import yaml
@ -15,6 +16,19 @@ PROBE_TEMPLATE = "service_life_noc_probe"
DEFAULT_MOCK_STATE = "OK"
DEFAULT_MOCK_MESSAGE = "Sous contrôle"
LIFE_NOC_PUBLIC_BASE_URL = os.environ.get("LIFE_NOC_PUBLIC_BASE_URL", "").rstrip("/")
def absolutize_url(url: str) -> str:
url = (url or "").strip()
if not url:
return url
if url.startswith("http://") or url.startswith("https://"):
return url
if LIFE_NOC_PUBLIC_BASE_URL:
if not url.startswith("/"):
url = "/" + url
return LIFE_NOC_PUBLIC_BASE_URL + url
return url
def slugify(value: str) -> str:
value = value.strip().lower()
@ -82,6 +96,7 @@ def render_mock_service(domain: str, group_name: str, item: dict) -> str:
instructions_url = item.get("instructions_url", "").strip()
if not instructions_url:
instructions_url = f"/life-noc/item/{domain}/{name}"
instructions_url = absolutize_url(instructions_url)
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
@ -121,6 +136,7 @@ def render_probe_service(domain: str, group_name: str, item: dict) -> str:
if not instructions_url:
instructions_url = f"/life-noc/item/{domain}/{name}"
action_url = item.get("action_url", "").strip()
instructions_url = absolutize_url(instructions_url)
probe = item["probe"]
probe_type = str(probe["type"]).strip()

View file

@ -3,6 +3,8 @@
from __future__ import annotations
from pathlib import Path
from urllib.parse import quote
import os
import sys
from fastapi import FastAPI, HTTPException, Form
@ -13,6 +15,24 @@ ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from lib.life_noc_domains import ( # noqa: E402
ALLOWED_FORM_MODES,
ALLOWED_METRIC_UNITS,
ALLOWED_ON_ERROR,
ALLOWED_PROBE_TYPES,
ALLOWED_SOURCE_TYPES,
THRESHOLD_FIELDS,
DomainsConflictError,
DomainsError,
delete_item,
get_domain_item,
item_to_form_values,
list_domain_items,
list_domains,
normalize_item_payload,
reorder_item,
upsert_item,
)
from lib.life_noc_inputs import ( # noqa: E402
list_items,
get_item,
@ -32,10 +52,198 @@ class CompleteInputRequest(BaseModel):
origin: str = "manual"
app = FastAPI(title="Life-NOC Input API", version="1.0.0")
app = FastAPI(title="Life-NOC Input API", version="1.1.0")
def html_escape(value: str) -> str:
ADMIN_UI_ENABLED = os.environ.get("LIFE_NOC_ADMIN_UI_ENABLED", "0").strip().lower() in {
"1",
"true",
"yes",
"on",
}
BASE_CSS = """
:root {
color-scheme: light;
--bg: #f5f7fb;
--card: #ffffff;
--border: #d9e0ea;
--text: #112033;
--muted: #5a697b;
--accent: #164c96;
--accent-soft: #eaf2ff;
--danger: #8b1e1e;
--ok: #0f6b3d;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: Arial, sans-serif;
line-height: 1.45;
}
main {
max-width: 920px;
margin: 0 auto;
padding: 1rem;
}
.stack { display: grid; gap: 1rem; }
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 1rem;
box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.hero { padding: 1rem; }
.muted { color: var(--muted); }
.state { font-size: 1.15rem; font-weight: bold; }
h1, h2, h3 { margin-top: 0; }
ul { padding-left: 1.2rem; }
code {
background: #eef2f7;
padding: 0.15rem 0.35rem;
border-radius: 6px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.toolbar, .actions {
display: flex;
flex-wrap: wrap;
gap: 0.6rem;
align-items: center;
}
.actions form, .inline-form { display: inline-flex; margin: 0; }
.pill {
display: inline-block;
padding: 0.25rem 0.55rem;
border-radius: 999px;
background: var(--accent-soft);
color: var(--accent);
font-size: 0.9rem;
}
.button, button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.35rem;
min-height: 44px;
padding: 0.75rem 1rem;
border-radius: 12px;
border: 1px solid #335b94;
background: #ffffff;
color: #163454;
font-size: 1rem;
cursor: pointer;
text-decoration: none;
}
.button.primary, button.primary {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
.button.danger, button.danger {
border-color: #b64b4b;
color: var(--danger);
}
.grid-cards {
display: grid;
gap: 0.9rem;
}
.row-between {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
}
.item-title {
font-size: 1.05rem;
font-weight: bold;
margin: 0 0 0.35rem 0;
}
.form-grid {
display: grid;
gap: 0.85rem;
}
.form-grid.two { grid-template-columns: 1fr; }
label {
display: grid;
gap: 0.35rem;
font-size: 0.95rem;
font-weight: bold;
}
input[type="text"], input[type="date"], textarea, select {
width: 100%;
min-height: 44px;
padding: 0.75rem 0.8rem;
border-radius: 12px;
border: 1px solid #aebacc;
font: inherit;
background: #fff;
color: var(--text);
}
textarea { min-height: 100px; resize: vertical; }
.checks {
display: grid;
gap: 0.55rem;
}
.check {
display: flex;
align-items: center;
gap: 0.6rem;
font-weight: normal;
}
.check input { width: 20px; height: 20px; }
.section-title {
margin-bottom: 0.5rem;
font-size: 1.02rem;
}
details {
border: 1px solid var(--border);
border-radius: 14px;
background: #fcfdff;
padding: 0.15rem 0.85rem 0.85rem 0.85rem;
}
details + details { margin-top: 0.8rem; }
summary {
cursor: pointer;
font-weight: bold;
list-style: none;
padding: 0.9rem 0 0.6rem 0;
}
summary::-webkit-details-marker { display: none; }
.alert {
border: 1px solid #f2c5c5;
background: #fff4f4;
color: #7a1a1a;
border-radius: 12px;
padding: 0.85rem 1rem;
}
pre.yaml-preview {
white-space: pre-wrap;
word-break: break-word;
background: #0f1720;
color: #e8eef6;
padding: 1rem;
border-radius: 14px;
overflow-x: auto;
}
.mobile-sticky {
position: sticky;
bottom: 0;
background: rgba(245,247,251,0.96);
padding-top: 0.7rem;
}
@media (min-width: 760px) {
.form-grid.two { grid-template-columns: 1fr 1fr; }
.grid-cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
"""
def html_escape(value: object) -> str:
return (
str(value)
.replace("&", "&amp;")
@ -60,9 +268,244 @@ def resolve_instructions_url(domain: str, item_key: str, service: dict) -> str:
return f"/life-noc/item/{domain}/{item_key}"
def page_shell(title: str, body: str) -> HTMLResponse:
html = f"""<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{html_escape(title)}</title>
<style>{BASE_CSS}</style>
</head>
<body>
<main>{body}</main>
</body>
</html>"""
return HTMLResponse(content=html)
def require_admin_enabled() -> None:
if not ADMIN_UI_ENABLED:
raise HTTPException(status_code=404, detail="interface admin désactivée")
def bool_attr(value: bool) -> str:
return " checked" if value else ""
def option_tags(options: list[str], selected: str) -> str:
tags = []
for value in options:
label = value if value else ""
sel = " selected" if value == selected else ""
tags.append(f'<option value="{html_escape(value)}"{sel}>{html_escape(label)}</option>')
return "".join(tags)
def render_alert(message: str) -> str:
if not message:
return ""
return f'<div class="alert">{html_escape(message)}</div>'
def render_domain_card(domain: str, items: list[dict]) -> str:
probed = sum(1 for item in items if isinstance(item, dict) and isinstance(item.get("probe"), dict))
return f"""
<article class="card">
<div class="row-between">
<div>
<p class="item-title">{html_escape(domain)}</p>
<p class="muted">{len(items)} item(s) · {probed} avec sonde réelle</p>
</div>
<a class="button primary" href="/life-noc/admin/domain/{html_escape(domain)}">Ouvrir</a>
</div>
</article>
"""
def render_item_card(domain: str, item: dict, index: int, total: int) -> str:
name = str(item.get("name", "")).strip()
title = str(item.get("title") or name or "Item").strip()
summary = str(item.get("summary") or item.get("notes") or "").strip()
probe_type = str(item.get("probe", {}).get("type", "mock") if isinstance(item.get("probe"), dict) else "mock")
probe_badge = f'<span class="pill">{html_escape(probe_type)}</span>'
move_up = f"""
<form method="post" action="/life-noc/admin/domain/{html_escape(domain)}/{html_escape(name)}/move">
<input type="hidden" name="direction" value="up">
<button title="Monter" {'disabled' if index == 0 else ''}></button>
</form>
""" if total > 1 else ""
move_down = f"""
<form method="post" action="/life-noc/admin/domain/{html_escape(domain)}/{html_escape(name)}/move">
<input type="hidden" name="direction" value="down">
<button title="Descendre" {'disabled' if index == total - 1 else ''}></button>
</form>
""" if total > 1 else ""
return f"""
<article class="card">
<div class="row-between">
<div>
<p class="item-title">{html_escape(title)}</p>
<p class="muted"><code>{html_escape(name)}</code></p>
<p class="muted">{html_escape(summary)}</p>
</div>
<div>{probe_badge}</div>
</div>
<div class="actions">
<a class="button" href="/life-noc/admin/item/{html_escape(domain)}/{html_escape(name)}">Voir</a>
<a class="button primary" href="/life-noc/admin/item/{html_escape(domain)}/{html_escape(name)}/edit">Modifier</a>
{move_up}
{move_down}
</div>
</article>
"""
def render_item_editor(domain: str, values: dict, action_url: str, heading: str, error_message: str = "") -> str:
thresholds_html = "".join(
f'''<label>{html_escape(field)}<input type="text" name="{html_escape(field)}" value="{html_escape(values.get(field, ''))}"></label>'''
for field in THRESHOLD_FIELDS
)
yaml_preview = render_yaml_preview(values)
return f"""
<section class="stack">
<div class="hero card">
<div class="toolbar">
<a class="button" href="/life-noc/admin/domain/{html_escape(domain)}"> Domaine</a>
<a class="button" href="/life-noc/admin">Accueil admin</a>
</div>
<h1>{html_escape(heading)}</h1>
<p class="muted">Éditeur mobile-first optionnel de <code>domains.yaml</code>. Sauvegarde explicite, sans changer le flux runtime existant.</p>
</div>
{render_alert(error_message)}
<form method="post" action="{html_escape(action_url)}" class="stack">
<details open>
<summary>Identité</summary>
<div class="form-grid two">
<label>Domaine
<input type="text" name="domain" value="{html_escape(domain)}" readonly>
</label>
<label>name
<input type="text" name="name" value="{html_escape(values.get('name', ''))}" required>
</label>
<label>Date de référence
<input type="date" name="date" value="{html_escape(values.get('date', ''))}">
</label>
<label>title
<input type="text" name="title" value="{html_escape(values.get('title', ''))}">
</label>
</div>
<div class="form-grid">
<label>summary
<textarea name="summary">{html_escape(values.get('summary', ''))}</textarea>
</label>
</div>
</details>
<details>
<summary>Contexte et contenu</summary>
<div class="form-grid">
<label>notes
<textarea name="notes">{html_escape(values.get('notes', ''))}</textarea>
</label>
<label>instructions
<textarea name="instructions">{html_escape(values.get('instructions', ''))}</textarea>
</label>
</div>
</details>
<details>
<summary>Liens</summary>
<div class="form-grid">
<label>notes_url<input type="text" name="notes_url" value="{html_escape(values.get('notes_url', ''))}"></label>
<label>instructions_url<input type="text" name="instructions_url" value="{html_escape(values.get('instructions_url', ''))}"></label>
<label>action_url<input type="text" name="action_url" value="{html_escape(values.get('action_url', ''))}"></label>
</div>
</details>
<details>
<summary>Sonde</summary>
<div class="form-grid two">
<label>probe.type
<select name="probe_type">{option_tags(ALLOWED_PROBE_TYPES, str(values.get('probe_type', '')))}</select>
</label>
<label>probe.source.type
<select name="probe_source_type">{option_tags(ALLOWED_SOURCE_TYPES, str(values.get('probe_source_type', '')))}</select>
</label>
<label>probe.source.inputs_file
<input type="text" name="probe_inputs_file" value="{html_escape(values.get('probe_inputs_file', ''))}">
</label>
<label>probe.source.item_key
<input type="text" name="probe_item_key" value="{html_escape(values.get('probe_item_key', ''))}">
</label>
<label>metric.unit
<select name="metric_unit">{option_tags(ALLOWED_METRIC_UNITS, str(values.get('metric_unit', '')))}</select>
</label>
<label>policy.on_error
<select name="policy_on_error">{option_tags(ALLOWED_ON_ERROR, str(values.get('policy_on_error', '')))}</select>
</label>
</div>
</details>
<details>
<summary>Seuils</summary>
<div class="form-grid two">
{thresholds_html}
</div>
</details>
<details>
<summary>Comportement UI</summary>
<div class="form-grid two">
<label>ui.form_mode
<select name="ui_form_mode">{option_tags(ALLOWED_FORM_MODES, str(values.get('ui_form_mode', '')))}</select>
</label>
</div>
<div class="checks">
<label class="check"><input type="checkbox" name="ui_allow_complete" value="1"{bool_attr(bool(values.get('ui_allow_complete', False)))}> ui.allow_complete</label>
<label class="check"><input type="checkbox" name="ui_allow_manual_edit" value="1"{bool_attr(bool(values.get('ui_allow_manual_edit', False)))}> ui.allow_manual_edit</label>
</div>
</details>
<details>
<summary>Aperçu YAML</summary>
<pre class="yaml-preview">{html_escape(yaml_preview)}</pre>
</details>
<div class="mobile-sticky">
<div class="card">
<div class="actions">
<button class="primary" type="submit">Écrire dans domains.yaml</button>
<a class="button" href="/life-noc/admin/domain/{html_escape(domain)}">Annuler</a>
</div>
</div>
</div>
</form>
</section>
"""
def render_yaml_preview(values: dict) -> str:
try:
payload = normalize_item_payload(values)
except Exception:
payload = {k: v for k, v in values.items() if k not in {"domain"}}
import yaml
return yaml.safe_dump(payload, sort_keys=False, allow_unicode=True, width=1000)
@app.get("/health")
def health() -> dict:
return {"status": "ok"}
return {"status": "ok", "admin_ui_enabled": ADMIN_UI_ENABLED}
@app.get("/inputs/{domain}")
@ -118,138 +561,89 @@ def page_item(domain: str, item_key: str) -> HTMLResponse:
allow_complete = bool(ui.get("allow_complete", probe_type == "elapsed_time"))
allow_manual_edit = bool(ui.get("allow_manual_edit", True))
links_html = ""
for fragment in [
link_row("Notes", notes_url),
link_row("Instructions", instructions_url),
link_row("Action", action_url),
]:
if fragment:
links_html += fragment
summary_html = ""
if summary:
summary_html = f'<p><strong>Résumé :</strong> {html_escape(summary)}</p>'
links_html = "".join(
fragment for fragment in [
link_row("Notes", notes_url),
link_row("Instructions", instructions_url),
link_row("Action", action_url),
] if fragment
) or "<li class=\"muted\">Aucun lien défini.</li>"
summary_html = f'<p><strong>Résumé :</strong> {html_escape(summary)}</p>' if summary else ""
instructions_html = ""
if instructions:
instructions_html = f"""
<section class="card">
<h2>Instructions</h2>
<pre style="white-space: pre-wrap; font-family: Arial, sans-serif;">{html_escape(instructions)}</pre>
</section>
"""
<section class="card">
<h2>Instructions</h2>
<pre style="white-space: pre-wrap; font-family: Arial, sans-serif;">{html_escape(instructions)}</pre>
</section>
"""
manual_form_html = ""
if allow_manual_edit and form_mode == "complete_date":
manual_form_html = f"""
<section class="card">
<h2>Mettre à jour la date</h2>
<form method="post" action="/life-noc/item/{html_escape(domain)}/{html_escape(item_key)}/set">
<input type="date" name="value" value="{html_escape(current_input.get("value", ""))}" required>
<input type="hidden" name="origin" value="manual">
<button type="submit">Enregistrer</button>
</form>
</section>
"""
<section class="card">
<h2>Mettre à jour la date</h2>
<form method="post" action="/life-noc/item/{html_escape(domain)}/{html_escape(item_key)}/set" class="actions">
<input type="date" name="value" value="{html_escape(current_input.get('value', ''))}" required>
<input type="hidden" name="origin" value="manual">
<button type="submit">Enregistrer</button>
</form>
</section>
"""
complete_form_html = ""
if allow_complete:
complete_form_html = f"""
<section class="card">
<h2>Action rapide</h2>
<form method="post" action="/life-noc/item/{html_escape(domain)}/{html_escape(item_key)}/complete">
<button type="submit">Compléter</button>
</form>
</section>
"""
<section class="card">
<h2>Action rapide</h2>
<form method="post" action="/life-noc/item/{html_escape(domain)}/{html_escape(item_key)}/complete">
<button type="submit" class="primary">Compléter</button>
</form>
</section>
"""
html = f"""<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Life-NOC {html_escape(title)}</title>
<style>
body {{
font-family: Arial, sans-serif;
max-width: 760px;
margin: 0 auto;
padding: 1rem;
line-height: 1.45;
}}
.card {{
border: 1px solid #ccc;
border-radius: 10px;
padding: 1rem;
margin-bottom: 1rem;
}}
.state {{
font-size: 1.2rem;
font-weight: bold;
}}
button {{
font-size: 1rem;
padding: 0.9rem 1.2rem;
border-radius: 8px;
border: 1px solid #444;
cursor: pointer;
}}
input[type="date"] {{
font-size: 1rem;
padding: 0.7rem;
border-radius: 8px;
border: 1px solid #666;
margin-right: 0.5rem;
}}
ul {{
padding-left: 1.25rem;
}}
code {{
background: #f3f3f3;
padding: 0.1rem 0.3rem;
border-radius: 4px;
}}
</style>
</head>
<body>
<main>
<section class="card">
<h1>{html_escape(title)}</h1>
<p class="state">État actuel : {html_escape(state)}</p>
<p><strong>Type de sonde :</strong> {html_escape(probe_type)}</p>
{summary_html}
</section>
admin_link = ""
if ADMIN_UI_ENABLED:
admin_link = f'<a class="button" href="/life-noc/admin/item/{html_escape(domain)}/{html_escape(item_key)}">Admin</a>'
<section class="card">
<h2>Dernier intrant</h2>
<p><strong>Valeur :</strong> {html_escape(current_input.get("value", ""))}</p>
<p><strong>Capturé le :</strong> {html_escape(current_input.get("captured_at", ""))}</p>
<p><strong>Origine :</strong> {html_escape(current_input.get("origin", ""))}</p>
</section>
body = f"""
<section class="hero card">
<div class="toolbar">
<a class="button" href="/life-noc/item/{html_escape(domain)}/{html_escape(item_key)}">Actualiser</a>
{admin_link}
</div>
<h1>{html_escape(title)}</h1>
<p class="state">État actuel : {html_escape(state)}</p>
<p><strong>Type de sonde :</strong> {html_escape(probe_type)}</p>
{summary_html}
</section>
<section class="card">
<h2>Contexte</h2>
<p><strong>Domaine :</strong> {html_escape(domain)}</p>
<p><strong>Item key :</strong> <code>{html_escape(item_key)}</code></p>
<p><strong>Notes :</strong> {html_escape(notes)}</p>
</section>
<section class="card">
<h2>Dernier intrant</h2>
<p><strong>Valeur :</strong> {html_escape(current_input.get('value', ''))}</p>
<p><strong>Capturé le :</strong> {html_escape(current_input.get('captured_at', ''))}</p>
<p><strong>Origine :</strong> {html_escape(current_input.get('origin', ''))}</p>
</section>
{instructions_html}
<section class="card">
<h2>Contexte</h2>
<p><strong>Domaine :</strong> {html_escape(domain)}</p>
<p><strong>Item key :</strong> <code>{html_escape(item_key)}</code></p>
<p><strong>Notes :</strong> {html_escape(notes)}</p>
</section>
<section class="card">
<h2>Liens utiles</h2>
<ul>
{links_html}
</ul>
</section>
{instructions_html}
{manual_form_html}
{complete_form_html}
</main>
</body>
</html>"""
return HTMLResponse(content=html)
<section class="card">
<h2>Liens utiles</h2>
<ul>{links_html}</ul>
</section>
{manual_form_html}
{complete_form_html}
"""
return page_shell(f"Life-NOC — {title}", body)
@app.post("/life-noc/item/{domain}/{item_key}/set")
@ -261,10 +655,7 @@ def page_set_item(domain: str, item_key: str, value: str = Form(...), origin: st
except ValueError as exc:
raise HTTPException(status_code=400, detail=str(exc))
return RedirectResponse(
url=f"/life-noc/item/{domain}/{item_key}",
status_code=303,
)
return RedirectResponse(url=f"/life-noc/item/{domain}/{item_key}", status_code=303)
@app.post("/life-noc/item/{domain}/{item_key}/complete")
@ -276,7 +667,220 @@ def page_complete_item(domain: str, item_key: str, origin: str = Form(default="m
except ValueError as exc:
raise HTTPException(status_code=400, detail=str(exc))
return RedirectResponse(
url=f"/life-noc/item/{domain}/{item_key}",
status_code=303,
)
return RedirectResponse(url=f"/life-noc/item/{domain}/{item_key}", status_code=303)
@app.get("/life-noc/admin", response_class=HTMLResponse)
def admin_home() -> HTMLResponse:
require_admin_enabled()
domain_cards = []
for domain in list_domains():
items = list_domain_items(domain)
domain_cards.append(render_domain_card(domain, items))
body = f"""
<section class="hero card">
<h1>Life-NOC Admin</h1>
<p class="muted">Interface web optionnelle pour administrer <code>domains.yaml</code> sans casser le pipeline existant.</p>
</section>
<section class="grid-cards">{''.join(domain_cards)}</section>
"""
return page_shell("Life-NOC Admin", body)
@app.get("/life-noc/admin/domain/{domain}", response_class=HTMLResponse)
def admin_domain(domain: str, error: str = "") -> HTMLResponse:
require_admin_enabled()
try:
items = list_domain_items(domain)
except KeyError:
raise HTTPException(status_code=404, detail="domaine introuvable")
cards = [render_item_card(domain, item, idx, len(items)) for idx, item in enumerate(items)]
body = f"""
<section class="hero card">
<div class="toolbar">
<a class="button" href="/life-noc/admin"> Accueil admin</a>
<a class="button primary" href="/life-noc/admin/domain/{html_escape(domain)}/new">Créer un item</a>
</div>
<h1>Domaine : {html_escape(domain)}</h1>
<p class="muted">{len(items)} item(s). Les boutons et réordonnent lordre des items dans <code>domains.yaml</code>.</p>
</section>
{render_alert(error)}
<section class="stack">{''.join(cards)}</section>
"""
return page_shell(f"Life-NOC Admin — {domain}", body)
@app.post("/life-noc/admin/domain/{domain}/{item_key}/move")
def admin_move_item(domain: str, item_key: str, direction: str = Form(...)) -> RedirectResponse:
require_admin_enabled()
try:
reorder_item(domain, item_key, direction)
except (DomainsError, KeyError) as exc:
target = f"/life-noc/admin/domain/{domain}?error={quote(str(exc))}"
return RedirectResponse(url=target, status_code=303)
return RedirectResponse(url=f"/life-noc/admin/domain/{domain}", status_code=303)
@app.get("/life-noc/admin/item/{domain}/{item_key}", response_class=HTMLResponse)
def admin_item(domain: str, item_key: str) -> HTMLResponse:
require_admin_enabled()
try:
item = get_domain_item(domain, item_key)
except KeyError:
raise HTTPException(status_code=404, detail="item introuvable")
values = item_to_form_values(item, domain)
yaml_preview = render_yaml_preview(values)
body = f"""
<section class="hero card">
<div class="toolbar">
<a class="button" href="/life-noc/admin/domain/{html_escape(domain)}"> Domaine</a>
<a class="button primary" href="/life-noc/admin/item/{html_escape(domain)}/{html_escape(item_key)}/edit">Modifier</a>
<a class="button" href="/life-noc/item/{html_escape(domain)}/{html_escape(item_key)}">Page item</a>
</div>
<h1>{html_escape(values.get('title') or item_key)}</h1>
<p class="muted"><code>{html_escape(item_key)}</code></p>
</section>
<section class="card">
<h2>Résumé</h2>
<p>{html_escape(values.get('summary') or values.get('notes') or '')}</p>
<p class="muted">probe.type = {html_escape(values.get('probe_type') or 'mock')}</p>
</section>
<section class="card">
<h2>Aperçu YAML</h2>
<pre class="yaml-preview">{html_escape(yaml_preview)}</pre>
</section>
<section class="card">
<form method="post" action="/life-noc/admin/item/{html_escape(domain)}/{html_escape(item_key)}/delete" onsubmit="return confirm('Supprimer cet item de domains.yaml ?');">
<button class="danger" type="submit">Supprimer litem</button>
</form>
</section>
"""
return page_shell(f"Life-NOC Admin — {item_key}", body)
@app.get("/life-noc/admin/domain/{domain}/new", response_class=HTMLResponse)
def admin_new_item_form(domain: str, error: str = "") -> HTMLResponse:
require_admin_enabled()
try:
list_domain_items(domain)
except KeyError:
raise HTTPException(status_code=404, detail="domaine introuvable")
values = item_to_form_values(None, domain)
body = render_item_editor(domain, values, f"/life-noc/admin/domain/{domain}/new", f"Créer un item dans {domain}", error)
return page_shell(f"Life-NOC Admin — nouveau item {domain}", body)
@app.post("/life-noc/admin/domain/{domain}/new")
def admin_new_item_submit(
domain: str,
name: str = Form(...),
date: str = Form(default=""),
title: str = Form(default=""),
summary: str = Form(default=""),
notes: str = Form(default=""),
instructions: str = Form(default=""),
notes_url: str = Form(default=""),
instructions_url: str = Form(default=""),
action_url: str = Form(default=""),
probe_type: str = Form(default=""),
probe_source_type: str = Form(default=""),
probe_inputs_file: str = Form(default=""),
probe_item_key: str = Form(default=""),
metric_unit: str = Form(default=""),
policy_on_error: str = Form(default=""),
unknown_lt: str = Form(default=""),
ok_gte: str = Form(default=""),
warning_gte: str = Form(default=""),
critical_gte: str = Form(default=""),
unknown_gte: str = Form(default=""),
ok_lt: str = Form(default=""),
warning_lt: str = Form(default=""),
critical_lt: str = Form(default=""),
ui_form_mode: str = Form(default=""),
ui_allow_complete: str = Form(default=""),
ui_allow_manual_edit: str = Form(default=""),
) -> RedirectResponse:
require_admin_enabled()
form_values = {
key: value
for key, value in locals().items()
if key not in {"domain"}
}
try:
item = normalize_item_payload(form_values)
upsert_item(domain, item, original_item_key=None)
except (DomainsError, DomainsConflictError, KeyError) as exc:
return RedirectResponse(url=f"/life-noc/admin/domain/{domain}/new?error={quote(str(exc))}", status_code=303)
return RedirectResponse(url=f"/life-noc/admin/item/{domain}/{item['name']}", status_code=303)
@app.get("/life-noc/admin/item/{domain}/{item_key}/edit", response_class=HTMLResponse)
def admin_edit_item_form(domain: str, item_key: str, error: str = "") -> HTMLResponse:
require_admin_enabled()
try:
item = get_domain_item(domain, item_key)
except KeyError:
raise HTTPException(status_code=404, detail="item introuvable")
values = item_to_form_values(item, domain)
body = render_item_editor(domain, values, f"/life-noc/admin/item/{domain}/{item_key}/edit", f"Modifier {item_key}", error)
return page_shell(f"Life-NOC Admin — modifier {item_key}", body)
@app.post("/life-noc/admin/item/{domain}/{item_key}/edit")
def admin_edit_item_submit(
domain: str,
item_key: str,
name: str = Form(...),
date: str = Form(default=""),
title: str = Form(default=""),
summary: str = Form(default=""),
notes: str = Form(default=""),
instructions: str = Form(default=""),
notes_url: str = Form(default=""),
instructions_url: str = Form(default=""),
action_url: str = Form(default=""),
probe_type: str = Form(default=""),
probe_source_type: str = Form(default=""),
probe_inputs_file: str = Form(default=""),
probe_item_key: str = Form(default=""),
metric_unit: str = Form(default=""),
policy_on_error: str = Form(default=""),
unknown_lt: str = Form(default=""),
ok_gte: str = Form(default=""),
warning_gte: str = Form(default=""),
critical_gte: str = Form(default=""),
unknown_gte: str = Form(default=""),
ok_lt: str = Form(default=""),
warning_lt: str = Form(default=""),
critical_lt: str = Form(default=""),
ui_form_mode: str = Form(default=""),
ui_allow_complete: str = Form(default=""),
ui_allow_manual_edit: str = Form(default=""),
) -> RedirectResponse:
require_admin_enabled()
try:
existing = get_domain_item(domain, item_key)
except KeyError:
raise HTTPException(status_code=404, detail="item introuvable")
form_values = {
key: value
for key, value in locals().items()
if key not in {"domain", "item_key", "existing"}
}
try:
item = normalize_item_payload(form_values, existing_item=existing)
upsert_item(domain, item, original_item_key=item_key)
except (DomainsError, DomainsConflictError, KeyError) as exc:
return RedirectResponse(url=f"/life-noc/admin/item/{domain}/{item_key}/edit?error={quote(str(exc))}", status_code=303)
return RedirectResponse(url=f"/life-noc/admin/item/{domain}/{item['name']}", status_code=303)
@app.post("/life-noc/admin/item/{domain}/{item_key}/delete")
def admin_delete_item(domain: str, item_key: str) -> RedirectResponse:
require_admin_enabled()
try:
delete_item(domain, item_key)
except (DomainsError, KeyError) as exc:
return RedirectResponse(url=f"/life-noc/admin/domain/{domain}?error={quote(str(exc))}", status_code=303)
return RedirectResponse(url=f"/life-noc/admin/domain/{domain}", status_code=303)