Skip to content

Commit d091c35

Browse files
committed
feat: add epsilon alert
1 parent d3c6ff9 commit d091c35

File tree

3 files changed

+1446
-1263
lines changed

3 files changed

+1446
-1263
lines changed

workflow-cli/configuration-opensearch/alerting/spar-onprem-devops.monitor.json

Lines changed: 10 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"enabled": true,
66
"schedule": {
77
"period": {
8-
"interval": 1,
8+
"interval": 5,
99
"unit": "MINUTES"
1010
}
1111
},
@@ -21,6 +21,11 @@
2121
"query": {
2222
"bool": {
2323
"must": [
24+
{
25+
"wildcard": {
26+
"url.full": "https://apps.nrs.gov.bc.ca/ext/spar/*"
27+
}
28+
},
2429
{
2530
"range": {
2631
"http.response.status_code": {
@@ -61,91 +66,17 @@
6166
},
6267
"actions": [
6368
{
64-
"id": "<%= idgen('action-teams', service.name, environment) %>",
65-
"name": "Notify Teams Channel",
66-
"destination_id": "appinfra-msteams",
67-
"message_template": {
68-
"source": "{ \"text\": \"Monitor {{ctx.monitor.name}} just entered alert status. Please investigate the issue.\n - Trigger: {{ctx.trigger.name}}\n - Severity: {{ctx.trigger.severity}}\n - Period start: {{ctx.periodStart}}\n - Period end: {{ctx.periodEnd}}\" }",
69-
"lang" : "mustache"
70-
},
71-
"throttle_enabled": true,
72-
"throttle": {
73-
"value": 10,
74-
"unit": "MINUTES"
75-
},
76-
"subject_template": {
77-
"source": "",
78-
"lang" : "mustache"
79-
}
80-
},
81-
{
82-
"id": "<%= idgen('action-sqs', server.name, agent.index) %>",
83-
"name": "Notify Automation Queue",
84-
"destination_id": "automation-sqs-sns",
85-
"message_template": {
86-
"source": "{ \"type\": \"agent_down\", \"server\": \"<%= server.name %>\", \"agent\": \"fluent-bit.<%= agent.index %>\", \"periodStart\": \"{{ctx.periodStart}}\", \"periodEnd\": \"{{ctx.periodEnd}}\" }",
87-
"lang" : "mustache"
88-
},
89-
"throttle_enabled": true,
90-
"throttle": {
91-
"value": 10,
92-
"unit": "MINUTES"
93-
},
94-
"subject_template": {
95-
"source": "Notify",
96-
"lang" : "mustache"
97-
}
98-
},
99-
{
100-
"$$OMIT": "<%= !serverTag('wildfire') || !serverTag('nonproduction') ? 'true' : 'false' %>",
101-
"id": "<%= idgen('action-nonprod-wf', server.name, agent.index) %>",
102-
"name": "notify",
103-
"destination_id": "wf-nonprod-msteams",
104-
"message_template": {
105-
"source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}",
106-
"lang": "mustache"
107-
},
108-
"throttle_enabled": true,
109-
"subject_template": {
110-
"source": "",
111-
"lang": "mustache"
112-
},
113-
"throttle": {
114-
"value": 240,
115-
"unit": "MINUTES"
116-
}
117-
},
118-
{
119-
"$$OMIT": "<%= !serverTag('wildfire') || serverTag('production') ? 'true' : 'false' %>",
120-
"id": "<%= idgen('action-nonprod-wf', server.name, agent.index) %>",
121-
"name": "notify",
122-
"destination_id": "wf-nonprod-msteams",
123-
"message_template": {
124-
"source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}",
125-
"lang": "mustache"
126-
},
127-
"throttle_enabled": true,
128-
"subject_template": {
129-
"source": "",
130-
"lang": "mustache"
131-
},
132-
"throttle": {
133-
"value": 240,
134-
"unit": "MINUTES"
135-
}
136-
},
137-
{
138-
"$$OMIT": "<%= !serverTag('wildfire') || !serverTag('production') ? 'true' : 'false' %>",
139-
"id": "<%= idgen('action-prod-wf', server.name, agent.index) %>",
69+
"$$OMIT": "<%= !serverTag('production') ? 'true' : 'false' %>",
70+
"id": "<%= idgen('action-prod-spar-sns') %>",
14071
"name": "notify",
14172
"destination_id": "wf-prod-msteams",
14273
"message_template": {
143-
"source": "{\"text\": \"No logs received from <%= server.name %> between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}",
74+
"source": "{\"text\": \"High http.response.status_code count between {{ctx.periodStart}} and {{ctx.periodEnd}}\"}",
14475
"lang": "mustache"
14576
},
14677
"throttle_enabled": true,
14778
"subject_template": {
148-
"source": "",
79+
"source": "SPAR: http.response.status_code alert",
14980
"lang": "mustache"
15081
},
15182
"throttle": {

0 commit comments

Comments
 (0)