From 9f3f6668d5481444c405f8348fe0d43d016b62ab Mon Sep 17 00:00:00 2001 From: andreacerasani Date: Mon, 15 Jul 2024 17:17:37 +0200 Subject: [PATCH] Add docs for Mqtt notification --- md-docs/api/python/enums.md | 5 +++++ md-docs/api/python/models.md | 21 +++++++++++++++++++++ md-docs/user_guide/detection_event_rules.md | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/md-docs/api/python/enums.md b/md-docs/api/python/enums.md index 5b6b302..fc869cd 100644 --- a/md-docs/api/python/enums.md +++ b/md-docs/api/python/enums.md @@ -100,6 +100,10 @@ DetectionEventActionType() - DISCORD_NOTIFICATION - SLACK_NOTIFICATION +- EMAIL_NOTIFICATION +- TEAMS_NOTIFICATION +- MQTT_NOTIFICATION +- RETRAIN ---- @@ -283,6 +287,7 @@ MonitoringTarget() - PREDICTION - USER_INPUT - USER_INPUT_RETRIEVED_CONTEXT +- RETRIEVED_CONTEXT - USER_INPUT_MODEL_OUTPUT - MODEL_OUTPUT_RETRIEVED_CONTEXT diff --git a/md-docs/api/python/models.md b/md-docs/api/python/models.md index 123ae02..2c79cf0 100644 --- a/md-docs/api/python/models.md +++ b/md-docs/api/python/models.md @@ -610,6 +610,27 @@ of a monitoring quantity (target or metric) ---- +## MqttNotificationAction +```python +MqttNotificationAction() +``` + + +--- +Base Model for Mqtt Notification Action + + +**Attributes** + +* **type** : DetectionEventActionType.MQTT_NOTIFICATION +* **connection_string** : str +* **topic** : str +* **payload** : str + + +---- + + ## MulticlassClassificationTaskCostInfo ```python MulticlassClassificationTaskCostInfo() diff --git a/md-docs/user_guide/detection_event_rules.md b/md-docs/user_guide/detection_event_rules.md index 58f5a8d..93a2de8 100644 --- a/md-docs/user_guide/detection_event_rules.md +++ b/md-docs/user_guide/detection_event_rules.md @@ -22,10 +22,11 @@ Two types of actions are currently supported: notification and retrain. - `DiscordNotificationAction`: sends a notification to a Discord channel via webhook. - `EmailNotificationAction`: sends an email to the provided email address. - `TeamsNotificationAction`: sends a notification to Microsoft Teams via webhook. +- `MqttNotificationAction`: sends a notification to an MQTT broker. ### Retrain Actions -Retrain actions let you to retrain your model, therefore, they are only available when the rule monitoring target is a model. +Retrain actions let you retrain your model, therefore, they are only available when the rule monitoring target is a model. The retrain action does not need any parameter because it is automatically inferred from the `model_name` attribute of the rule. Of course, it is mandatory that the model has a retrain trigger associated in order to add a retrain action to the rule.