diff --git a/deployment/docker/alerts-health.yml b/deployment/docker/alerts-health.yml index 808850339..d091e2c78 100644 --- a/deployment/docker/alerts-health.yml +++ b/deployment/docker/alerts-health.yml @@ -87,3 +87,7 @@ groups: In some cases for components like vmagent or vminsert the alert might trigger if there are too many clients making write attempts. If vmagent's or vminsert's CPU usage and network saturation are at normal level, then it might be worth adjusting `-maxConcurrentInserts` cmd-line flag." + - alert: alwaysFiring + expr: 1 + labels: + severity: critical \ No newline at end of file diff --git a/deployment/docker/docker-compose.yml b/deployment/docker/docker-compose.yml index e444bd654..434196d64 100644 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker/docker-compose.yml @@ -16,6 +16,11 @@ services: command: - "--promscrape.config=/etc/prometheus/prometheus.yml" - "--remoteWrite.url=http://victoriametrics:8428/api/v1/write" + - "-envflag.enable=true" + - "-envflag.prefix=VM_" + environment: + - VM_remoteWrite_basicAuth_username=admin + - VM_remoteWrite_basicAuth_password=pass networks: - vm_net restart: always @@ -40,6 +45,8 @@ services: - "--httpListenAddr=:8428" - "--influxListenAddr=:8089" - "--vmalert.proxyURL=http://vmalert:8880" + - "-httpAuth.username=admin" + - "-httpAuth.password=pass" networks: - vm_net restart: always @@ -77,12 +84,21 @@ services: - ./alerts-health.yml:/etc/alerts/alerts-health.yml - ./alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml - ./alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml + environment: + - VM_remoteWrite_basicAuth_username=admin + - VM_remoteWrite_basicAuth_password=pass + - VM_remoteRead_basicAuth_username=admin + - VM_remoteRead_basicAuth_password=pass + - VM_datasource_basicAuth_username=admin + - VM_datasource_basicAuth_password=pass command: - "--datasource.url=http://victoriametrics:8428/" - "--remoteRead.url=http://victoriametrics:8428/" - "--remoteWrite.url=http://victoriametrics:8428/" - "--notifier.url=http://alertmanager:9093/" - "--rule=/etc/alerts/*.yml" + - "-envflag.enable=true" + - "-envflag.prefix=VM_" # display source of alerts in grafana - "--external.url=http://127.0.0.1:3000" #grafana outside container # when copypaste the line be aware of '$$' for escaping in '$expr'