mehdy / keepalived-exporter

Prometheus Keepalived exporter
GNU General Public License v3.0
120 stars 40 forks source link

keepalived_vrrp_state #67

Closed emmiga closed 1 year ago

emmiga commented 3 years ago

From your documentation, it says that keepalived_vrrp_state is supported, however, i don't see it being part of the metrics. Is this the case or it is just on my implementation?

riverlee2014 commented 3 years ago

I don't see any keepalived indicators either!

mehdy commented 3 years ago

Thanks for the report. Could you please share this info as well?

riverlee2014 commented 3 years ago

My keepalived version is v2.1.5, I can start detecting prometheus indicators when use root user started exporter. Another promblem is grafana dashboard display with any bug? this is my exporter data demo:

# 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"} 5.0726e-05
go_gc_duration_seconds{quantile="0.25"} 8.8795e-05
go_gc_duration_seconds{quantile="0.5"} 0.000126574
go_gc_duration_seconds{quantile="0.75"} 0.000175286
go_gc_duration_seconds{quantile="1"} 0.001024715
go_gc_duration_seconds_sum 0.303211374
go_gc_duration_seconds_count 2070
# 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.15.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 5.41748e+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 6.147493272e+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 1.531164e+06
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 2.2711716e+07
# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.
# TYPE go_memstats_gc_cpu_fraction gauge
go_memstats_gc_cpu_fraction 3.804727134833947e-06
# 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 4.989376e+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 5.41748e+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 5.9981824e+07
# 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 6.30784e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 16937
# 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 5.922816e+07
# 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 6.6289664e+07
# 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.6112164582412221e+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 2.2728653e+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 13888
# 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 16384
# 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 135184
# 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 163840
# 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 6.570304e+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 1.508644e+06
# 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 819200
# 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 819200
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 7.5318272e+07
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 12
# HELP keepalived_address_list_errors_total Address list errors
# TYPE keepalived_address_list_errors_total counter
keepalived_address_list_errors_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_advertisements_interval_errors_total Advertisement interval errors
# TYPE keepalived_advertisements_interval_errors_total counter
keepalived_advertisements_interval_errors_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_advertisements_received_total Advertisements received
# TYPE keepalived_advertisements_received_total counter
keepalived_advertisements_received_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 3
# HELP keepalived_advertisements_sent_total Advertisements sent
# TYPE keepalived_advertisements_sent_total counter
keepalived_advertisements_sent_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 3.648751e+06
# HELP keepalived_authentication_failure_total Authentication failure
# TYPE keepalived_authentication_failure_total counter
keepalived_authentication_failure_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_authentication_invalid_total Authentication invalid
# TYPE keepalived_authentication_invalid_total counter
keepalived_authentication_invalid_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_authentication_mismatch_total Authentication mismatch
# TYPE keepalived_authentication_mismatch_total counter
keepalived_authentication_mismatch_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_become_master_total Became master
# TYPE keepalived_become_master_total counter
keepalived_become_master_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 1
# HELP keepalived_exporter_check_script_status Check Script status for each VIP
# TYPE keepalived_exporter_check_script_status gauge
keepalived_exporter_check_script_status{iname="VI_1",intf="ens192",ip_address="10.86.130.175",vrid="98"} 1
# HELP keepalived_gratuitous_arp_delay_total Gratuitous ARP delay
# TYPE keepalived_gratuitous_arp_delay_total counter
keepalived_gratuitous_arp_delay_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 5
# HELP keepalived_invalid_type_received_total Invalid type errors
# TYPE keepalived_invalid_type_received_total counter
keepalived_invalid_type_received_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_ip_ttl_errors_total TTL errors
# TYPE keepalived_ip_ttl_errors_total counter
keepalived_ip_ttl_errors_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_packet_length_errors_total Packet length errors
# TYPE keepalived_packet_length_errors_total counter
keepalived_packet_length_errors_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_priority_zero_received_total Priority zero received
# TYPE keepalived_priority_zero_received_total counter
keepalived_priority_zero_received_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_priority_zero_sent_total Priority zero sent
# TYPE keepalived_priority_zero_sent_total counter
keepalived_priority_zero_sent_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_release_master_total Released master
# TYPE keepalived_release_master_total counter
keepalived_release_master_total{iname="VI_1",intf="ens192",state="MASTER",vrid="98"} 0
# HELP keepalived_up Status
# TYPE keepalived_up gauge
keepalived_up 1
# HELP keepalived_vrrp_state State of vrrp
# TYPE keepalived_vrrp_state gauge
keepalived_vrrp_state{iname="VI_1",intf="ens192",ip_address="10.86.130.175",vrid="98"} 2
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 109.21
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 65536
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 10
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 2.0992e+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.61104025407e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 1.023070208e+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
# 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"} 11757
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0

grafana daskboard with any no data panels image

mehdy commented 3 years ago

@riverlee2014 If you search through the data you posted, you can see keepalived_vrrp_state is exported. I'm not sure what's the problem you're facing?

mehdy commented 1 year ago

Closing the issue due to inactivity. Feel free to reopen the issue.