[ADD] maintenance_service_http_monitoring: webhook_rocketchat_via_n8n + parameters
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 6s

This commit is contained in:
Boris Gallet
2026-03-25 16:41:23 +01:00
parent 30a19649d2
commit 33ccb85594
4 changed files with 106 additions and 1 deletions

View File

@@ -15,7 +15,43 @@ If the service has a URL, a request is made.
If a request fails and a maintenance task has already been created for the same day,
no new task is added.
The default values for the cron jobs are located in `data/cron.xml`.
The default values for the cron jobs are located in `data/cron.xml`.
Webhook Notification
====================
When a new maintenance request is created (HTTP check failure), the module can
send a webhook notification to an external service (e.g., n8n, Rocket.Chat, Slack).
Configuration
-------------
Go to **Settings > Technical > Parameters > System Parameters** and configure:
+--------------------------------------------------------+----------------------------------------+
| Key | Description |
+========================================================+========================================+
| ``maintenance_service_http_monitoring.webhook_url`` | Webhook URL (POST endpoint) |
+--------------------------------------------------------+----------------------------------------+
| ``maintenance_service_http_monitoring.webhook_user`` | Basic Auth username (optional) |
+--------------------------------------------------------+----------------------------------------+
| ``maintenance_service_http_monitoring.webhook_password``| Basic Auth password (optional) |
+--------------------------------------------------------+----------------------------------------+
Webhook Payload
---------------
The webhook sends a JSON POST with the following structure::
{
"id": 42,
"name": "[HTTP KO] Server Name",
"priority": "2",
"description": "Service KO: https://example.com",
"equipment": "Server Name",
"link": "https://odoo.example.com/web#id=42&model=maintenance.request&view_type=form"
}
Installation