-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.json
More file actions
124 lines (124 loc) · 3.43 KB
/
Copy pathexample.json
File metadata and controls
124 lines (124 loc) · 3.43 KB
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
117
118
119
120
121
122
123
124
{
"name": "test",
"type": "monitor",
"monitor_type": "query_level_monitor",
"enabled": true,
"schedule": {
"period": {
"unit": "MINUTES",
"interval": 1
}
},
"inputs": [
{
"search": {
"indices": [
"opensearch_dashboards_sample_data_logs"
],
"query": {
"size": 0,
"aggregations": {},
"query": {
"bool": {
"filter": [
{
"range": {
"timestamp": {
"gte": "{{period_end}}||-1d",
"lte": "{{period_end}}",
"format": "epoch_millis"
}
}
},
{
"range": {
"machine.ram": {
"gt": 0
}
}
}
]
}
}
}
}
}
],
"triggers": [
{
"query_level_trigger": {
"id": "UPK6cHwB2RFh8tPTqJCn",
"name": "test_trigger",
"severity": "1",
"condition": {
"script": {
"source": "ctx.results[0].hits.total.value > 1",
"lang": "painless"
}
},
"actions": [
{
"id": "Z_K9cHwB2RFh8tPTH5DP",
"name": "test_webhook",
"destination_id": "VfK7cHwB2RFh8tPToZA2",
"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}}",
"lang": "mustache"
},
"throttle_enabled": false,
"subject_template": {
"source": "",
"lang": "mustache"
}
}
]
}
}
],
"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": 1,
"bucketUnitOfTime": "d",
"where": {
"fieldName": [
{
"label": "memory",
"type": "number"
}
],
"fieldRangeEnd": 0,
"fieldRangeStart": 0,
"fieldValue": 100,
"operator": "is_less"
}
},
"monitor_type": "query_level_monitor"
}
}