|
5 | 5 | "enabled": true,
|
6 | 6 | "schedule": {
|
7 | 7 | "period": {
|
8 |
| - "interval": 1, |
| 8 | + "interval": 5, |
9 | 9 | "unit": "MINUTES"
|
10 | 10 | }
|
11 | 11 | },
|
|
21 | 21 | "query": {
|
22 | 22 | "bool": {
|
23 | 23 | "must": [
|
| 24 | + { |
| 25 | + "wildcard": { |
| 26 | + "url.full": "https://apps.nrs.gov.bc.ca/ext/spar/*" |
| 27 | + } |
| 28 | + }, |
24 | 29 | {
|
25 | 30 | "range": {
|
26 | 31 | "http.response.status_code": {
|
|
61 | 66 | },
|
62 | 67 | "actions": [
|
63 | 68 | {
|
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') %>", |
140 | 71 | "name": "notify",
|
141 | 72 | "destination_id": "wf-prod-msteams",
|
142 | 73 | "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}}\"}", |
144 | 75 | "lang": "mustache"
|
145 | 76 | },
|
146 | 77 | "throttle_enabled": true,
|
147 | 78 | "subject_template": {
|
148 |
| - "source": "", |
| 79 | + "source": "SPAR: http.response.status_code alert", |
149 | 80 | "lang": "mustache"
|
150 | 81 | },
|
151 | 82 | "throttle": {
|
|
0 commit comments