Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
hagen1778 2024-09-03 14:12:51 +02:00
parent 4dcb6a3719
commit 21b44a9fe0
No known key found for this signature in database
GPG key ID: 3BF75F3741CA9640
2 changed files with 41 additions and 18 deletions

View file

@ -1,19 +1,47 @@
services:
# Metrics collector.
# It scrapes targets defined in --promscrape.config
# And forward them to --remoteWrite.url
vmagent:
container_name: vmagent
avalanche:
container_name: avalanche
image: quay.io/freshtracks.io/avalanche
ports:
- 9101:9101
command:
- "--metric-count=20"
- "--series-count=500"
- "--label-count=25"
- "--port=9101"
networks:
- vm_net
restart: always
vmagent-no-aggregation:
container_name: vmagent-no-aggregation
image: victoriametrics/vmagent:v1.103.0
depends_on:
- "victoriametrics"
ports:
- 8429
volumes:
- vmagentdata-no-aggregation:/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
vmagent-with-aggregation:
container_name: vmagent-with-aggregation
image: victoriametrics/vmagent:v1.103.0
depends_on:
- "victoriametrics"
ports:
- 8429:8429
volumes:
- vmagentdata:/vmagentdata
- vmagentdata-with-aggregation:/vmagentdata
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./stream_aggr_config.yml:/etc/prometheus/stream_aggr_config.yml
command:
- "--promscrape.config=/etc/prometheus/prometheus.yml"
- "--streamAggr.config=/etc/prometheus/stream_aggr_config.yml"
- "--remoteWrite.url=http://victoriametrics:8428/api/v1/write"
networks:
- vm_net
@ -25,19 +53,10 @@ services:
image: victoriametrics/victoria-metrics:v1.103.0
ports:
- 8428:8428
- 8089:8089
- 8089:8089/udp
- 2003:2003
- 2003:2003/udp
- 4242:4242
volumes:
- vmdata:/storage
command:
- "--storageDataPath=/storage"
- "--graphiteListenAddr=:2003"
- "--opentsdbListenAddr=:4242"
- "--httpListenAddr=:8428"
- "--influxListenAddr=:8089"
- "--vmalert.proxyURL=http://vmalert:8880"
networks:
- vm_net
@ -105,7 +124,8 @@ services:
restart: always
volumes:
vmagentdata: {}
vmagentdata-no-aggregation: {}
vmagentdata-with-aggregation: {}
vmdata: {}
grafanadata: {}
networks:

View file

@ -1,13 +1,16 @@
global:
scrape_interval: 10s
scrape_interval: 5s
scrape_configs:
- job_name: 'vmagent'
static_configs:
- targets: ['vmagent:8429']
- targets: ['vmagent-no-aggregation:8429', 'vmagent-with-aggregation:8429']
- job_name: 'vmalert'
static_configs:
- targets: ['vmalert:8880']
- job_name: 'victoriametrics'
static_configs:
- targets: ['victoriametrics:8428']
- job_name: 'avalanche'
static_configs:
- targets: ['avalanche:9101']