Alarm Verisi Mesaj Formatları
NightWatch, SinkKinds.Alert
tipini destekleyen MQTT, RabbitMQ ve Redis sinklerine tanımlı alarmlara göre gerçek zamanlı olarak üretilen alarm verisini gönderebilir. Gönderilen alarm verisi iki farklı formatta olaibilir;
- Alert_PerMessage: Her bir alarm için ayrı bir mesaj gönderilir.
- Alert_Grouped_ByUnit: Alarmlar makine sinyalleri için tanımlanır. NightWatch, aynı isimli bir sinyal birden fazla makine için tanımlanmasına izin verir. Bu durumda tanımlı bir alarm aynı anda birden fazla makine için gerçekleşebilir. Bu durumda, alarm verisi makine (Unit) bazında gruplanarak bir dizi olarak hedef sink'e gönderilir.
Örnek Alarm Verisi (Alert_PerMessage)
MQTT Topic: nw/ea6335f8-de93-4024-8af2-180c56a2338b/79f33fff-02eb-4634-9e05-0979cf022c2c/f1a5574f-69ad-44bf-aee2-34ede9aa1a14/1eacdc6f-8520-42fa-a8a1-523f162b359b/alert_permessage/849956af-ed8d-413c-9dbd-3635be522d17
{
"TenantId": "ea6335f8-de93-4024-8af2-180c56a2338b",
"DeviceUid": "f1a5574f-69ad-44bf-aee2-34ede9aa1a14",
"UnitUid": "1eacdc6f-8520-42fa-a8a1-523f162b359b",
"UnitName": "Local Unit",
"LastValue": 15,
"LastValueReceivedOn": "2023-09-02T14:25:48.077+00:00",
"FirstTriggerOn": "2023-09-02T17:25:59.5566106+03:00",
"AlertUid": "849956af-ed8d-413c-9dbd-3635be522d17",
"AlertName": "Counter Alert",
"AlertConditionText": "Evaluate every 5 seconds for 10 seconds and alert when 'ns=2;s=Channel1.Device1.Counter' is above 10 Adet",
"AlertChartDataPointCount": 10,
"AlertEvaluationDurationInSeconds": 10,
"AlertTrackDurationInSeconds": 10,
"AlertThresholdValue": 10,
"AlertTriggerWhen": 0,
"AlertTriggerWhenText": "ValueAbove",
"AlertReadingDefinitionName": "ns=2;s=Channel1.Device1.Counter",
"AlertReadingDefinitionFormulaName": "Adet",
"AlertMeasurementUnit": "Adet",
"IsAlertEndedNotification": false
}
Örnek Alarm Verisi (Alert_Grouped_ByUnit)
MQTT Topic: nw/ea6335f8-de93-4024-8af2-180c56a2338b/79f33fff-02eb-4634-9e05-0979cf022c2c/f1a5574f-69ad-44bf-aee2-34ede9aa1a14/1eacdc6f-8520-42fa-a8a1-523f162b359b/alert_grouped_byunit
[
{
"TenantId": "ea6335f8-de93-4024-8af2-180c56a2338b",
"DeviceUid": "f1a5574f-69ad-44bf-aee2-34ede9aa1a14",
"UnitUid": "1eacdc6f-8520-42fa-a8a1-523f162b359b",
"UnitName": "Local Unit",
"LastValue": 15,
"LastValueReceivedOn": "2023-09-02T14:25:48.077+00:00",
"FirstTriggerOn": "2023-09-02T17:26:44.67704+03:00",
"AlertUid": "849956af-ed8d-413c-9dbd-3635be522d17",
"AlertName": "Counter Alert",
"AlertConditionText": "Evaluate every 5 seconds for 10 seconds and alert when 'ns=2;s=Channel1.Device1.Counter' is above 10 Adet",
"AlertChartDataPointCount": 10,
"AlertEvaluationDurationInSeconds": 10,
"AlertTrackDurationInSeconds": 10,
"AlertThresholdValue": 10,
"AlertTriggerWhen": 0,
"AlertTriggerWhenText": "ValueAbove",
"AlertReadingDefinitionName": "ns=2;s=Channel1.Device1.Counter",
"AlertReadingDefinitionFormulaName": "Adet",
"AlertMeasurementUnit": "Adet",
"IsAlertEndedNotification": false
}
]