forked from coop-cloud/monitoring-ng
feat: send docker logs to loki
This commit is contained in:
@@ -12,7 +12,7 @@ export PROMETHEUS_YML_VERSION=v2
|
||||
export MATRIX_ALERTMANAGER_CONFIG_VERSION=e
|
||||
export MATRIX_ALERTMANAGER_ENTRYPOINT_VERSION=a
|
||||
export GRAFANA_ALERTS_NODE_VERSION=v1c
|
||||
export CONFIG_ALLOY_VERSION=v5
|
||||
export CONFIG_ALLOY_VERSION=v6
|
||||
|
||||
# creates a default prometheus scrape config for a given node
|
||||
add_node(){
|
||||
|
||||
@@ -3,6 +3,10 @@ logging {
|
||||
format = "logfmt"
|
||||
}
|
||||
|
||||
discovery.docker "linux" {
|
||||
host = "unix:///var/run/docker.sock"
|
||||
}
|
||||
|
||||
prometheus.exporter.cadvisor "docker" {
|
||||
}
|
||||
|
||||
@@ -34,3 +38,21 @@ prometheus.remote_write "prometheus" {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loki.source.docker "docker" {
|
||||
host = "unix:///var/run/docker.sock"
|
||||
targets = discovery.docker.linux.targets
|
||||
labels = {"app" = "docker"}
|
||||
forward_to = [loki.write.loki.receiver]
|
||||
}
|
||||
|
||||
loki.write "loki" {
|
||||
endpoint {
|
||||
url = "{{ env "LOKI_PUSH_URL" }}"
|
||||
|
||||
basic_auth {
|
||||
username = "admin"
|
||||
password = "{{ secret "basic_auth" }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user