标签:集成 export rop script nod docke config exp github
以下是关于victoriametrics 单机的一个简单试用
version: "3"
services:
prometheus:
image: prom/prometheus
ports:
- 9090:9090
volumes:
- ./promdata:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- ‘--config.file=/etc/prometheus/prometheus.yml‘
- ‘--storage.tsdb.path=/prometheus‘
victoriametrics:
image: victoriametrics/victoria-metrics
volumes:
- ./victoriametrics:/victoriametrics
ports:
- 8428:8428
command:
- ‘-storageDataPath=/victoriametrics‘
- ‘-retentionPeriod=1‘
grafana:
image: grafana/grafana
ports:
- 3000:3000
global:
scrape_interval: 1s
evaluation_interval: 1s
?
remote_write:
- url: "http://victoriametrics:8428/api/v1/write"
?
scrape_configs:
- job_name: ‘prometheus‘
static_configs:
- targets: [‘prometheus:9090‘]
?
- job_name: ‘victoriametrics‘
static_configs:
- targets: [‘victoriametrics:8428‘]
?
- job_name: ‘app‘
scrape_interval: 20s
static_configs:
- targets: [‘node-exporter:9100‘]
docker-compose up -d
注意不在使用promethues 的9090了,而是直接使用victoriametrics提供的地址,默认是8428
victoriametrics使用起来相比其他的prometheus 集群方案简单了很多,同时优化点也是很多的,实际如果需要集成监控报警功能
我们可能还需要集成grafana,promxy或者原生的prometheus 方案(目前的缺点)
https://github.com/VictoriaMetrics/VictoriaMetrics
https://grafana.com/grafana/dashboards/10229/revisions
https://github.com/jacksontj/promxy
标签:集成 export rop script nod docke config exp github
原文地址:https://www.cnblogs.com/rongfengliang/p/12794007.html