services: vmagent: container_name: vmagent image: victoriametrics/vmagent:v1.98.0 depends_on: - "victoriametrics" ports: - 8429:8429 volumes: - vmagentdata-guide-vmanomaly-vmalert:/vmagentdata - ./prometheus.yml:/etc/prometheus/prometheus.yml command: - "--promscrape.config=/etc/prometheus/prometheus.yml" - "--remoteWrite.url=http://victoriametrics:8428/api/v1/write" networks: - vm_net restart: always victoriametrics: container_name: victoriametrics image: victoriametrics/victoria-metrics:v1.98.0 ports: - 8428:8428 volumes: - vmdata-guide-vmanomaly-vmalert:/storage command: - "--storageDataPath=/storage" - "--httpListenAddr=:8428" - "--vmalert.proxyURL=http://vmalert:8880" - "-search.disableCache=1" # for guide only, do not use in production networks: - vm_net restart: always grafana: container_name: grafana image: grafana/grafana-oss:10.2.1 depends_on: - "victoriametrics" ports: - 3000:3000 volumes: - grafanadata-guide-vmanomaly-vmalert:/var/lib/grafana - ./provisioning/datasources:/etc/grafana/provisioning/datasources - ./provisioning/dashboards:/etc/grafana/provisioning/dashboards - ./vmanomaly_guide_dashboard.json:/var/lib/grafana/dashboards/vmanomaly_guide_dashboard.json networks: - vm_net restart: always vmalert: container_name: vmalert image: victoriametrics/vmalert:v1.98.0 depends_on: - "victoriametrics" ports: - 8880:8880 volumes: - ./vmalert_config.yml:/etc/alerts/alerts.yml 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" # 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' - '--external.alert.source=explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr": },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' networks: - vm_net restart: always vmanomaly: container_name: vmanomaly image: victoriametrics/vmanomaly:v1.9.2 depends_on: - "victoriametrics" ports: - "8490:8490" networks: - vm_net restart: always volumes: - ./vmanomaly_config.yml:/config.yaml - ./vmanomaly_license:/license platform: "linux/amd64" command: - "/config.yaml" - "--license-file=/license" alertmanager: container_name: alertmanager image: prom/alertmanager:v0.25.0 volumes: - ./alertmanager.yml:/config/alertmanager.yml command: - "--config.file=/config/alertmanager.yml" ports: - 9093:9093 networks: - vm_net restart: always node-exporter: image: quay.io/prometheus/node-exporter:v1.7.0 container_name: node-exporter ports: - 9100:9100 pid: host restart: unless-stopped networks: - vm_net volumes: vmagentdata-guide-vmanomaly-vmalert: {} vmdata-guide-vmanomaly-vmalert: {} grafanadata-guide-vmanomaly-vmalert: {} networks: vm_net: