Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally expose usage metrics #190

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

vruello
Copy link
Contributor

@vruello vruello commented Nov 3, 2024

Implements #189

This adds the following metrics exposed by a Prometheus endpoint: https://github.com/vruello/openwec/blob/metrics-rs/doc/monitoring.md#available-metrics

Machine labels can be added for any supported metric in the monitoring settings:

# [monitoring]

# [Required]
# Listen address of the Prometheus-compatible endpoint
# listen_address =

# [Required]
# Listen port of the Prometheus-compatible endpoint
# listen_port =

# [Optional]
# The refresh interval of "openwec_machines" gauge
# machines_refresh_interval = 30

# [Optional]
# Request duration buckets (in seconds) used by the "openwec_http_request_duration_seconds" histogram
# http_request_duration_buckets = [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0]

# [Optional]
# If set, a "machine" label will be added to the "openwec_input_events_total" metric
# Warning: this may cause a HUGE increase in metric cardinality
# count_input_events_per_machine = false

# [Optional]
# If set, a "machine" label will be added to the "openwec_input_event_bytes_total" metric
# Warning: this may cause a HUGE increase in metric cardinality
# count_input_event_bytes_per_machine = false

# [Optional]
# If set, a "machine" label will be added to the "openwec_http_request_body_network_size_bytes_total" metric
# Warning: this may cause a HUGE increase in metric cardinality
# count_http_request_body_network_size_per_machine = false

# [Optional]
# If set, a "machine" label will be added to the "openwec_http_request_body_real_size_bytes_total" metric
# Warning: this may cause a HUGE increase in metric cardinality
# count_http_request_body_real_size_per_machine = false

@vruello vruello marked this pull request as ready for review November 23, 2024 18:44
@vruello
Copy link
Contributor Author

vruello commented Dec 20, 2024

This seems stable enough to be merged soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant