#Remote write configuration (for Graphite, OpenTSDB, or InfluxDB).
remote_write:
– url: “http://worker01.prometheus:8086/api/v1/prom/write?db=prometheus”# Remote read configuration (for InfluxDB only at the moment).
remote_read:
– url: “http://worker01.prometheus:8086/api/v1/prom/read?db=prometheus”
重启 Prometheus:systemctl restart prometheus.service
3.查看Influxdb数据库
[root@worker01 ~]# influx
Connected to http://localhost:8086 version 1.8.1
InfluxDB shell version: 1.8.1
> show databases;
name: databases
name
—-
_internal
prometheus
> use prometheus;
Using database prometheus
> show measurements;
……
count_netstat_wait_connections
cup_use_percent_test_metric
go_gc_duration_seconds
go_gc_duration_seconds_count
go_gc_duration_seconds_sum
go_goroutines
go_info
go_memstats_alloc_bytes
go_memstats_alloc_bytes_total
go_memstats_buck_hash_sys_bytes
go_memstats_frees_total
go_memstats_gc_cpu_fraction
go_memstats_gc_sys_bytes
go_memstats_heap_alloc_bytes
go_memstats_heap_idle_bytes
go_memstats_heap_inuse_bytes
go_memstats_heap_objects
go_memstats_heap_released_bytes
go_memstats_heap_sys_bytes
go_memstats_last_gc_time_seconds
go_memstats_lookups_total
go_memstats_mallocs_total
go_memstats_mcache_inuse_bytes
……
4.Grafana 配置Influxdb
选择 Influxdb
配置连接信息,数据库
显示模板没有找到,只能自定义模板了。。。
参考:
https://www.cnblogs.com/cheyunhua/p/11376756.html