-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path02_create-pipeline.sh
More file actions
executable file
·30 lines (29 loc) · 1.25 KB
/
Copy path02_create-pipeline.sh
File metadata and controls
executable file
·30 lines (29 loc) · 1.25 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
#!/bin/bash
#echo ">>> Removing Pipeline: access_combined_wcookie_parsing_pipeline"
#/usr/bin/curl -X DELETE "localhost:9200/_ingest/pipeline/access_combined_wcookie_parsing_pipeline?pretty=true";echo
echo ">>> Creating Pipeline: access_combined_wcookie_parsing_pipeline"
/usr/bin/curl -H "Content-Type: application/json" -X PUT "localhost:9200/_ingest/pipeline/access_combined_wcookie_parsing_pipeline?pretty=true" -d '
{
"description": "This pipeline parses 'access_combined_wcookie' logs.",
"processors": [
{
"grok": {
"field": "message",
"pattern_definitions": {
"HTTPVERSION": "HTTP(/|\\s)%{NUMBER}",
"HTTPDATE": "%{MONTHDAY}/%{MONTH}/%{YEAR}:%{TIME}((\\s%{ISO8601_TIMEZONE})?)"
},
"patterns": [ "%{IPORHOST:client.address} %{USERNAME:client.ident} %{USERNAME:user.name} \\[%{HTTPDATE:timestamp}\\] \"%{WORD:http.request.method} %{NOTSPACE:http.request.content} %{HTTPVERSION:http.version}\" %{INT:http.response.status_code} %{INT:http.response.bytes} \"%{DATA:http.request.referrer}\" \"%{DATA:user_agent.original}\"" ],
"ignore_missing": true
}
}
],
"on_failure": [
{
"set": {
"field": "_index",
"value": "failed-{{ _index }}"
}
}
]
}';echo