-
-
Notifications
You must be signed in to change notification settings - Fork 222
Implement Prometheus metrics support in Scrutiny #830
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
base: master
Are you sure you want to change the base?
Conversation
- Added configuration options for enabling Prometheus metrics in `example.scrutiny.yaml` and `config.go`. - Introduced a new `metrics` package to handle metrics collection and registration. - Created a `ScrutinyCollector` to gather device metrics and expose them via a `/metrics` endpoint. - Updated the web server to conditionally register the metrics endpoint based on configuration. - Implemented caching for device details to optimize metrics collection. - Added tests for utility functions related to metrics sanitization and parsing. This commit enhances the monitoring capabilities of Scrutiny by integrating Prometheus metrics support.
|
I also created a Grafana dashboard. If you need one, you can use this example. |
Change Summary1. Dependency Updates (
|
## [1.1.0](v1.0.0...v1.1.0) (2025-11-30) ### Features * Add "day" as resolution for temperature graph ([2670af2](2670af2)) * add day resolution for temperature graph (upstream PR [AnalogJ#823](https://github.com/Starosdev/scrutiny/issues/823)) ([2d6ffa7](2d6ffa7)) * add setting to enable/disable SCT temperature history (upstream PR [AnalogJ#557](https://github.com/Starosdev/scrutiny/issues/557)) ([c3692ac](c3692ac)) * Implement device-wise notification mute/unmute ([925e86d](925e86d)) * implement device-wise notification mute/unmute (upstream PR [AnalogJ#822](https://github.com/Starosdev/scrutiny/issues/822)) ([ea7102e](ea7102e)) * implement Prometheus metrics support (upstream PR [AnalogJ#830](https://github.com/Starosdev/scrutiny/issues/830)) ([7384f7d](7384f7d)) * support SAS temperature (upstream PR [AnalogJ#816](https://github.com/Starosdev/scrutiny/issues/816)) ([f954cc8](f954cc8)) ### Bug Fixes * better handling of ata_sct_temperature_history (upstream PR [AnalogJ#825](https://github.com/Starosdev/scrutiny/issues/825)) ([d134ad7](d134ad7)) * **database:** add missing temperature parameter in SCSI migration ([df7da88](df7da88)) * support transient SMART failures (upstream PR [AnalogJ#375](https://github.com/Starosdev/scrutiny/issues/375)) ([601775e](601775e)) * **ui:** fix temperature conversion in temperature.pipe.ts (upstream PR [AnalogJ#815](https://github.com/Starosdev/scrutiny/issues/815)) ([e0f2781](e0f2781)) ### Refactoring * use limit() instead of tail() for fetching smart attributes (upstream PR [AnalogJ#829](https://github.com/Starosdev/scrutiny/issues/829)) ([2849531](2849531))
Implement Prometheus metrics support in Scrutiny
example.scrutiny.yamlandconfig.go.metricspackage to handle metrics collection and registration.ScrutinyCollectorto gather device metrics and expose them via a/metricsendpoint.This commit enhances the monitoring capabilities of Scrutiny by integrating Prometheus metrics support.
During the test process, I discovered a bug, and the related PR is #829 .