natrontech / pbs-exporter

A prometheus exporter for Proxmox Backup Server
GNU General Public License v3.0
17 stars 6 forks source link

pbs-exporter deploy success and prometheus have data,but grafana can't display data #16

Closed xinmans closed 5 months ago

xinmans commented 5 months ago

maybe pbs-exporter/grafana-dashboard/pbs-exporter.json have problem, could you take a test?

janfuhrer commented 5 months ago

Hi @xinmans

The Grafana dashboard works for us, what doesn't?

You probably have missing labels in your prometheus job configuration. Do you see the "instance" label on the Prometheus target?

If not, you can test with the following relabelling configuration:

relabel_configs:
  - source_labels: [__address__]
    regex: (.*)
    replacement: ${1}
    target_label: instance
xinmans commented 5 months ago

Have update config, but grafana have no data, no instance

Prometheus data as below


Endpoint    State   Labels  Last Scrape Scrape Duration Error
http://192.168.31.158:9111/metrics  UP  
instance="192.168.31.158:9111"job="pbs-exporter"
Discovered labels:
__address__="192.168.31.158:9111"
__metrics_path__="/metrics"
__scheme__="http"
__scrape_interval__="15s"
__scrape_timeout__="10s"
job="pbs-exporter"
9.165s ago  
52.390ms

the metric data as below

# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 8.3251e-05
go_gc_duration_seconds{quantile="0.25"} 0.000151136
go_gc_duration_seconds{quantile="0.5"} 0.000191646
go_gc_duration_seconds{quantile="0.75"} 0.000307302
go_gc_duration_seconds{quantile="1"} 0.072417691
go_gc_duration_seconds_sum 1.782515981
go_gc_duration_seconds_count 2596
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 9
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.22.2"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 3.599832e+06
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 4.584396136e+09
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 7693
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 1.7065485e+07
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 2.947552e+06
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 3.599832e+06
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 2.637824e+06
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 5.095424e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 6263
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 2.473984e+06
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 7.733248e+06
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 1.7133250408315382e+09
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 0
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 1.7071748e+07
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 2400
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 15600
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 60160
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 81600
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.982416e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 608371
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 622592
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 622592
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 1.2016656e+07
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 6
# HELP pbs_available The available bytes of the underlying storage.
# TYPE pbs_available gauge
pbs_available{datastore="pbs"} 3.600293691392e+12
pbs_available{datastore="pve-amd"} 3.600293691392e+12
pbs_available{datastore="pve-d1581"} 3.600293691392e+12
# HELP pbs_host_cpu_usage The CPU usage of the host.
# TYPE pbs_host_cpu_usage gauge
pbs_host_cpu_usage 0.06126482213438733
# HELP pbs_host_disk_available The available disk of the local root disk in bytes.
# TYPE pbs_host_disk_available gauge
pbs_host_disk_available 8.047280128e+10
# HELP pbs_host_disk_total The total disk of the local root disk in bytes.
# TYPE pbs_host_disk_total gauge
pbs_host_disk_total 8.725426176e+10
# HELP pbs_host_disk_used The used disk of the local root disk in bytes.
# TYPE pbs_host_disk_used gauge
pbs_host_disk_used 2.3021568e+09
# HELP pbs_host_io_wait The io wait of the host.
# TYPE pbs_host_io_wait gauge
pbs_host_io_wait 0
# HELP pbs_host_load1 The load for 1 minute of the host.
# TYPE pbs_host_load1 gauge
pbs_host_load1 0.08
# HELP pbs_host_load15 The load for 15 minutes of the host.
# TYPE pbs_host_load15 gauge
pbs_host_load15 0.01
# HELP pbs_host_load5 The load for 5 minutes of the host.
# TYPE pbs_host_load5 gauge
pbs_host_load5 0.04
# HELP pbs_host_memory_free The free memory of the host.
# TYPE pbs_host_memory_free gauge
pbs_host_memory_free 3.853008896e+09
# HELP pbs_host_memory_total The total memory of the host.
# TYPE pbs_host_memory_total gauge
pbs_host_memory_total 4.096671744e+09
# HELP pbs_host_memory_used The used memory of the host.
# TYPE pbs_host_memory_used gauge
pbs_host_memory_used 2.43662848e+08
# HELP pbs_host_swap_free The free swap of the host.
# TYPE pbs_host_swap_free gauge
pbs_host_swap_free 4.2949632e+09
# HELP pbs_host_swap_total The total swap of the host.
# TYPE pbs_host_swap_total gauge
pbs_host_swap_total 4.2949632e+09
# HELP pbs_host_swap_used The used swap of the host.
# TYPE pbs_host_swap_used gauge
pbs_host_swap_used 0
# HELP pbs_host_uptime The uptime of the host.
# TYPE pbs_host_uptime gauge
pbs_host_uptime 219967
# HELP pbs_size The size of the underlying storage in bytes.
# TYPE pbs_size gauge
pbs_size{datastore="pbs"} 3.861700149248e+12
pbs_size{datastore="pve-amd"} 3.861700149248e+12
pbs_size{datastore="pve-d1581"} 3.861700149248e+12
# HELP pbs_up Was the last query of PBS successful.
# TYPE pbs_up gauge
pbs_up 1
# HELP pbs_used The used bytes of the underlying storage.
# TYPE pbs_used gauge
pbs_used{datastore="pbs"} 2.61406457856e+11
pbs_used{datastore="pve-amd"} 2.61406457856e+11
pbs_used{datastore="pve-d1581"} 2.61406457856e+11
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 68.64
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1.048576e+06
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 11
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 1.1382784e+07
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.71316905349e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 1.2630016e+09
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 10411
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
janfuhrer commented 5 months ago

This is not a problem with the pbs-exporter or the grafana dashboard, the job is fine as you have shown. This is most likely a problem with your integration of prometheus into grafana. I cannot assist you there. Hope you understand.