diff --git a/.gitignore b/.gitignore index d6ee25257..5b1ea6782 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ pids *.seed *.pid.lock data/acknowledgements.json +data/alert-rules.json +data/custom-thresholds.json # Directory for instrumented libs generated by jscoverage/JSCover lib-cov diff --git a/data/alert-rules.json b/data/alert-rules.json deleted file mode 100644 index 27f3d3958..000000000 --- a/data/alert-rules.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "compound_1749159848654_h011bw96f": { - "id": "compound_1749159848654_h011bw96f", - "condition": "greater_than", - "duration": 5000, - "severity": "warning", - "enabled": true, - "tags": [], - "group": "compound_threshold", - "escalationTime": 900000, - "autoResolve": false, - "suppressionTime": 300000, - "notificationChannels": [ - "default" - ], - "type": "compound_threshold", - "name": "Alert for CPU: 2%", - "targetType": "all", - "specificTarget": "", - "thresholds": [ - { - "type": "cpu", - "operator": ">", - "value": 2 - } - ], - "sendEmail": true, - "sendWebhook": false, - "createdAt": 1749159848648 - } -} \ No newline at end of file diff --git a/data/alert-rules.json.template b/data/alert-rules.json.template new file mode 100644 index 000000000..1a236e2da --- /dev/null +++ b/data/alert-rules.json.template @@ -0,0 +1,34 @@ +{ + "_readme": "This is a template file. Custom alert rules will be stored in alert-rules.json (not tracked by git)", + "_example": { + "compound_example_123": { + "id": "compound_example_123", + "condition": "greater_than", + "duration": 5000, + "severity": "warning", + "enabled": true, + "tags": [], + "group": "compound_threshold", + "escalationTime": 900000, + "autoResolve": false, + "suppressionTime": 300000, + "notificationChannels": [ + "default" + ], + "type": "compound_threshold", + "name": "Example Alert", + "targetType": "all", + "specificTarget": "", + "thresholds": [ + { + "type": "cpu", + "operator": ">", + "value": 80 + } + ], + "sendEmail": true, + "sendWebhook": false, + "createdAt": 1749159848648 + } + } +} \ No newline at end of file diff --git a/data/custom-thresholds.json b/data/custom-thresholds.json deleted file mode 100644 index 6debb34c6..000000000 --- a/data/custom-thresholds.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "primary:103": { - "endpointId": "primary", - "nodeId": "auto-detect", - "vmid": "103", - "thresholds": { - "disk": { - "warning": 70, - "critical": 80 - } - }, - "enabled": true, - "createdAt": "2025-06-01T19:50:34.784Z", - "updatedAt": "2025-06-01T19:50:34.784Z" - } -} \ No newline at end of file diff --git a/data/custom-thresholds.json.template b/data/custom-thresholds.json.template new file mode 100644 index 000000000..613224b6a --- /dev/null +++ b/data/custom-thresholds.json.template @@ -0,0 +1,27 @@ +{ + "_readme": "This is a template file. Custom threshold configurations will be stored in custom-thresholds.json (not tracked by git)", + "_example": { + "endpointId:vmid": { + "endpointId": "primary", + "nodeId": "auto-detect", + "vmid": "103", + "thresholds": { + "cpu": { + "warning": 80, + "critical": 90 + }, + "memory": { + "warning": 85, + "critical": 95 + }, + "disk": { + "warning": 70, + "critical": 80 + } + }, + "enabled": true, + "createdAt": "2025-06-01T19:50:34.784Z", + "updatedAt": "2025-06-01T19:50:34.784Z" + } + } +} \ No newline at end of file