provider "opensearch" { url = "localhost:9200" } resource "opensearch_ingest_pipeline" "filebeat_nginx_log" { name = "filebeat-nginx-log-v1" body = <%%{YEAR}[./]%%{MONTHNUM}[./]%%{MONTHDAY} %%{TIME}) \[%%{LOGLEVEL:severity}\] %%{POSINT:pid}#%%{NUMBER:threadid}\:( \*%%{NUMBER:connectionid})? %%{DATA:message}(,|$)( client: %%{IPORHOST:client})?(, server: %%{IPORHOST:server})?(, request: "(?:%%{WORD:verb} %%{NOTSPACE:request}(?: HTTP/%%{NUMBER:httpversion}))")?(, upstream: "%%{DATA:upstream}")?(, host: "%%{IPORHOST:vhost}")?""" ] } }, { "date": { "field": "timestamp", "formats": [ "YYYY/MM/dd HH:mm:ss" ] } } ] } EOF }