-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprepare.elasticsearch.sh
More file actions
41 lines (39 loc) · 1.18 KB
/
prepare.elasticsearch.sh
File metadata and controls
41 lines (39 loc) · 1.18 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
URL="elasticsearch.local:9200"
curl -XPUT "${URL}/zabbix_events?pretty" -H 'Content-Type: application/json' -d'
{
"mappings": {
"event": {
"properties": {
"zabbix_server": {"type": "text"},
"hostname": { "type": "text"},
"trigger": {"type": "text"},
"triggerid": {"type": "long"},
"ts": { "type": "date", "format": "epoch_second"},
"severity": { "type": "text"},
"nseverity": {"type": "integer"},
"eventid": {"type": "long"},
"status": {"type": "text"}
}
}
}
}'
curl -XPUT "${URL}/zabbix_history?pretty" -H 'Content-Type: application/json' -d'
{
"mappings": {
"event": {
"properties": {
"zabbix_server": {"type": "text"},
"hostname": { "type": "text"},
"trigger": {"type": "text"},
"triggerid": {"type": "long"},
"eventid": {"type": "long"},
"eventrecoveryid": {"type": "long"},
"duration": {"type": "integer"},
"started": { "type": "date", "format": "epoch_second"},
"finished": {"type": "date", "format": "epoch_second"},
"severity": { "type": "text"},
"nseverity": {"type": "integer"}
}
}
}
}'