mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-22 16:36:27 +01:00
1660428e00
Follow-up16eeb4eb33
Signed-off-by: hagen1778 <roman@victoriametrics.com> (cherry picked from commit9064602d00
)
76 lines
1.7 KiB
TOML
76 lines
1.7 KiB
TOML
[api]
|
|
enabled = true
|
|
address = "0.0.0.0:8686"
|
|
|
|
|
|
# ---------------------------------------------
|
|
# Docker logs -> VictoriaLogs
|
|
# ---------------------------------------------
|
|
|
|
[sources.docker]
|
|
type = "docker_logs"
|
|
|
|
[transforms.msg_parser]
|
|
type = "remap"
|
|
inputs = ["docker"]
|
|
source = '''
|
|
.log = parse_json!(.message)
|
|
del(.message)
|
|
'''
|
|
|
|
[sinks.vlogs]
|
|
type = "http"
|
|
inputs = [ "msg_parser" ]
|
|
uri = "http://victorialogs:9428/insert/jsonline?_stream_fields=source_type,host,container_name&_msg_field=log.msg&_time_field=timestamp"
|
|
encoding.codec = "json"
|
|
framing.method = "newline_delimited"
|
|
compression = "gzip"
|
|
healthcheck.enabled = false
|
|
|
|
[sinks.vlogs.request.headers]
|
|
AccountID = "0"
|
|
ProjectID = "0"
|
|
|
|
|
|
# ---------------------------------------------
|
|
# Generted demo logs -> VictoriaLogs
|
|
# ---------------------------------------------
|
|
|
|
[sources.demo]
|
|
type = "demo_logs"
|
|
format = "apache_common"
|
|
interval = 10
|
|
|
|
[sinks.vlogs_demo]
|
|
type = "elasticsearch"
|
|
inputs = [ "demo" ]
|
|
endpoints = [ "http://victorialogs:9428/insert/elasticsearch/" ]
|
|
mode = "bulk"
|
|
api_version = "v8"
|
|
compression = "gzip"
|
|
healthcheck.enabled = false
|
|
|
|
[sinks.vlogs_demo.query]
|
|
_msg_field = "message"
|
|
_time_field = "timestamp"
|
|
_stream_fields = "source_type"
|
|
|
|
[sinks.vlogs_demo.request.headers]
|
|
AccountID = "0"
|
|
ProjectID = "0"
|
|
|
|
|
|
|
|
# ---------------------------------------------
|
|
# Vector Metrics -> VictoriaMetrics
|
|
# ---------------------------------------------
|
|
|
|
[sources.vector_metrics]
|
|
type = "internal_metrics"
|
|
|
|
[sinks.victoriametrics]
|
|
type = "prometheus_remote_write"
|
|
endpoint = "http://victoriametrics:8428/api/v1/write"
|
|
inputs = ["vector_metrics"]
|
|
healthcheck.enabled = false
|