generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathalert-access-log-ingestion.json
116 lines (116 loc) · 3.4 KB
/
alert-access-log-ingestion.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"name": "Kyma access log ingestion",
"type": "monitor",
"monitor_type": "query_level_monitor",
"enabled": true,
"schedule": {
"period": {
"unit": "MINUTES",
"interval": 1
}
},
"inputs": [
{
"search": {
"indices": [
"logs-json-istio-envoy-kyma-*"
],
"query": {
"size": 0,
"aggregations": {},
"query": {
"bool": {
"filter": [
{
"range": {
"@timestamp": {
"gte": "{{period_end}}||-5m",
"lte": "{{period_end}}",
"format": "epoch_millis"
}
}
}
]
}
}
}
}
}
],
"triggers": [
{
"query_level_trigger": {
"id": "7o90X4UBxib8bUp3mEDF",
"name": "No access log ingestion",
"severity": "2",
"condition": {
"script": {
"source": "ctx.results[0].hits.total.value < 1",
"lang": "painless"
}
},
"actions": [
{
"id": "7490X4UBxib8bUp3mEDF",
"name": "Notify",
"destination_id": "",
"message_template": {
"source": "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}}\n - <link to your instance>/app/alerting",
"lang": "mustache"
},
"throttle_enabled": true,
"subject_template": {
"source": "No access logs from a Kyma runtime ingested since 5 min",
"lang": "mustache"
},
"throttle": {
"value": 60,
"unit": "MINUTES"
}
}
]
}
}
],
"ui_metadata": {
"schedule": {
"timezone": null,
"frequency": "interval",
"period": {
"unit": "MINUTES",
"interval": 1
},
"daily": 0,
"weekly": {
"tue": false,
"wed": false,
"thur": false,
"sat": false,
"fri": false,
"mon": false,
"sun": false
},
"monthly": {
"type": "day",
"day": 1
},
"cronExpression": "0 */1 * * *"
},
"search": {
"searchType": "graph",
"timeField": "@timestamp",
"aggregations": [],
"groupBy": [],
"bucketValue": 5,
"bucketUnitOfTime": "m",
"where": {
"fieldName": [],
"fieldRangeEnd": 0,
"fieldRangeStart": 0,
"fieldValue": "",
"operator": "is"
}
},
"monitor_type": "query_level_monitor"
}
}