Собственно на одном сервере установлены Prometheus и Grafana.
Метрику c
localhost:9100 получаю :
go_gc_duration_seconds{quantile="0"} 1.9551e-05
go_gc_duration_seconds{quantile="0.25"} 4.2627e-05
go_gc_duration_seconds{quantile="0.5"} 5.6951e-05
go_gc_duration_seconds{quantile="0.75"} 7.7066e-05
go_gc_duration_seconds{quantile="1"} 0.000228231
go_gc_duration_seconds_sum 0.007869094
go_gc_duration_seconds_count 122
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 10
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.19.3"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 729928
Конфиг prometheus
global:
alerting:
alertmanagers:
- static_configs:
- targets:
rule_files:
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090", "localhost:9100"]
При попытке добавить любой data source в Grafana, сразу вижу ошибку:
error reading prometheus an error occurred within the plugin grafana
Плагин prometheus, установлен в Grafana по умолчанию.
У Grafana в логах присутствует вот такая запись:
logger=context userId=1 orgId=1 uname=admin t=2023-01-25T05:12:52.872558165Z level=error msg="Internal server error" error="[plugin.downstreamError] failed to query data: received empty response from prometheus" remote_addr=192.168.200.10 traceID=