SuperQ / chrony_exporter

Exporter for Chrony NTP
Apache License 2.0
41 stars 10 forks source link

Add Example / List Of Exported Metrics To Readme #65

Open compilenix opened 4 months ago

compilenix commented 4 months ago

Hey, I think it would be neat for new people discovering this project to also quickly see what exact metrics are collected and provided by this exporter, within the README.md.

Something like this maybe:

# HELP probe_http_version Returns the version of HTTP of the probe response
# TYPE probe_http_version gauge
probe_http_version 2

# HELP probe_ip_protocol Specifies whether probe ip protocol is IP4 or IP6
# TYPE probe_ip_protocol gauge
probe_ip_protocol 4

# HELP probe_http_redirects The number of redirects
# TYPE probe_http_redirects gauge
probe_http_redirects 0

# HELP probe_http_ssl Indicates if SSL was used for the final redirect
# TYPE probe_http_ssl gauge
probe_http_ssl 1

# HELP probe_http_status_code Response HTTP status code
# TYPE probe_http_status_code gauge
probe_http_status_code 200

# HELP probe_http_uncompressed_body_length Length of uncompressed response body
# TYPE probe_http_uncompressed_body_length gauge
probe_http_uncompressed_body_length 97754

# HELP probe_ssl_last_chain_info Contains SSL leaf certificate information
# TYPE probe_ssl_last_chain_info gauge
probe_ssl_last_chain_info{fingerprint_sha256="c5f8d30ef546728213023e25ae3203d91321682a32e1ddf9d7613ea87e805b16"} 1

# HELP probe_success Displays whether or not the probe was a success
# TYPE probe_success gauge
probe_success 1

# HELP probe_tls_version_info Contains the TLS version used
# TYPE probe_tls_version_info gauge
probe_tls_version_info{version="TLS 1.3"} 1
grinapo commented 3 days ago
# HELP chrony_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which chrony_exporter was built, and the goos and goarch for the build.
# TYPE chrony_exporter_build_info gauge
# HELP chrony_sources_last_sample_age_seconds Chrony sources last good sample age in seconds
# TYPE chrony_sources_last_sample_age_seconds gauge
# HELP chrony_sources_last_sample_error_margin_seconds Chrony sources last sample margin of error in seconds
# TYPE chrony_sources_last_sample_error_margin_seconds gauge
# HELP chrony_sources_last_sample_offset_seconds Chrony sources last sample offset in seconds
# TYPE chrony_sources_last_sample_offset_seconds gauge
# HELP chrony_sources_polling_interval_seconds Chrony sources polling interval in seconds
# TYPE chrony_sources_polling_interval_seconds gauge
# HELP chrony_sources_reachability_ratio Chrony sources ratio of packet reachability
# TYPE chrony_sources_reachability_ratio gauge
# HELP chrony_sources_reachability_success Chrony sources last poll reachability success
# TYPE chrony_sources_reachability_success gauge
# HELP chrony_sources_state_info Chrony sources state info
# TYPE chrony_sources_state_info gauge
# HELP chrony_sources_stratum Chrony sources stratum
# TYPE chrony_sources_stratum gauge
# HELP chrony_tracking_frequency_ppms Rate by which the system's clock would be wrong if chronyd was not correcting it, in PPMs
# TYPE chrony_tracking_frequency_ppms gauge
# HELP chrony_tracking_info Chrony tracking info
# TYPE chrony_tracking_info gauge
# HELP chrony_tracking_last_offset_seconds Chrony tracking last offset in seconds
# TYPE chrony_tracking_last_offset_seconds gauge
# HELP chrony_tracking_reference_timestamp_seconds Chrony tracking Reference timestamp
# TYPE chrony_tracking_reference_timestamp_seconds gauge
# HELP chrony_tracking_remote_reference Chrony tracking is connected to a remote source
# TYPE chrony_tracking_remote_reference gauge
# HELP chrony_tracking_residual_frequency_ppms For the currently selected reference source, the difference between the frequency it suggests and the one currently in use, in PPMs
# TYPE chrony_tracking_residual_frequency_ppms gauge
# HELP chrony_tracking_rms_offset_seconds Chrony tracking long-term average of the offset
# TYPE chrony_tracking_rms_offset_seconds gauge
# HELP chrony_tracking_root_delay_seconds This is the total of the network path delays to the stratum-1 computer from which the computer is ultimately synchronised
# TYPE chrony_tracking_root_delay_seconds gauge
# HELP chrony_tracking_root_dispersion_seconds Chrony tracking total of all measurement errors to the NTP root
# TYPE chrony_tracking_root_dispersion_seconds gauge
# HELP chrony_tracking_skew_ppms The estimated error bound on the frequency, in PPMs
# TYPE chrony_tracking_skew_ppms gauge
# HELP chrony_tracking_stratum Chrony tracking client stratum
# TYPE chrony_tracking_stratum gauge
# HELP chrony_tracking_system_time_seconds Chrony tracking System time
# TYPE chrony_tracking_system_time_seconds gauge
# HELP chrony_tracking_update_interval_seconds The time elapsed since the last measurement from the reference source was processed, in seconds
# TYPE chrony_tracking_update_interval_seconds gauge
# HELP chrony_up Whether the chrony server is up.
# TYPE chrony_up gauge

though it's a single binary; downloading running and starting a curl against it isn't that hard. :-)

grinapo commented 3 days ago

Also you may see it visually at its grafana dashboard.