# datastream mapping 업데이트하기 , index patterns 를 꼭 써주세요.
PUT _index_template/logs-fortinet_fortigate.log
{
"index_patterns": ["logs-fortinet_fortigate.log-*"],
"template": {
"mappings": {
"properties": {
"mytest":{
"type": "keyword"
}
}
}
}
}
PUT _ingest/pipeline/syslog_pipeline
{
"processors": [
{
"grok": {
"field": "message",
"patterns": ["<%{INT:syslog.pri}>%{WORD:timestamp}:%{NUMBER:some_id}:\"\\[%{WORD:source}\\]\":%{WORD:status}:%{NUMBER:t_id}:R:S:1:\"\\[%{WORD:source}\\]\":%{DATA:id}:%{DATA:id1}:%{DATA:id2}:A:26:\"\\[%{WORD:source1}\\]\":%{IP:ip_address}:%{NUMBER:some_flag}:\"\\[%{DATA:source2}\\]\":0000:"]
}
},
{
"date": {
"field": "timestamp",
"target_field": "parsed_timestamp",
"formats": ["yyyyMMddHHmmss"],
"timezone": "Asia/Seoul"
}
}
],
"on_failure": [
{
"set": {
"field": "pipeline_error",
"value": "General failure in pipeline processing"
}
}
]
}
'제품 > ELK' 카테고리의 다른 글
| logstash - db query 1 (0) | 2025.05.02 |
|---|---|
| webhook 테스트 (0) | 2025.04.27 |
| logstash jdbc input 플러그인 (0) | 2025.03.27 |
| Webhook 커넥터 테스트 (0) | 2025.02.22 |
| 데이터 가져오기 (0) | 2025.02.15 |