mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-21 07:56:26 +01:00
cb383f546a
Signed-off-by: Alexander Marshalov <_@marshalov.org>
81 lines
1.7 KiB
TOML
81 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 = "elasticsearch"
|
|
inputs = [ "msg_parser" ]
|
|
endpoints = [ "http://victorialogs:9428/insert/elasticsearch/" ]
|
|
mode = "bulk"
|
|
api_version = "v8"
|
|
compression = "gzip"
|
|
healthcheck.enabled = false
|
|
|
|
[sinks.vlogs.query]
|
|
_msg_field = "log.msg"
|
|
_time_field = "timestamp"
|
|
_stream_fields = "source_type,host,container_name"
|
|
|
|
[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
|