Repository navigation
Split collectors into sub-collectors, test each collector, support new resources - #14
Conversation
Tested against 2026.2 with a chassis with no link status, and one with link status.
The pedantic registry performs metadata validation at collector registration instead of at collection time. Also enforces that only described metrics are sent.
In order to allow deserialisation of Power data from uncompliant BMCs which send PowerLimit.LimitInWatts as a string not a float64.
08222a2 to
529d787
Compare
dougszumski
left a comment
There was a problem hiding this comment.
Thanks for this @MurrayGroves it looks great.
Please could you add support to the Makefile to run the tests and get pull_request.yml to use it via make test. It would save having to worry about setting the FIXTURES_DIR. It was easy to get going locally, good stuff.
The core looks good to me though. I haven't checked all the test data, it almost crashed the browser :D
dougszumski
left a comment
There was a problem hiding this comment.
Thanks for this @MurrayGroves it looks great.
Please could you add support to the Makefile to run the tests and get pull_request.yml to use it via make test. It would save having to worry about setting the FIXTURES_DIR. It was easy to get going locally, good stuff.
The core looks good to me though. I haven't checked all the test data, it almost crashed the browser :D
|
@dougszumski added makefile testing |
Splits all the collectors out into a hierarchy of sub-collectors to reflect the hierarchy in Redfish and to allow for better parallelisation of collection.
Generally tidies up all collectors, and ensures proper use of waitgroups and spawning of goroutines (e.g. system collector called sub-collectors sequentially).
Adds testing for all metrics. Tests spin up a Docker container serving the specified Redfish mockup, and the Prometheus output produced by the exporter is compared against correct values. From project root, tests can be run with
FIXTURES_DIR="$(pwd)/test_dependencies" go test ./....Allows multiple HTTP requests to be in-flight at once (currently fixed at 1024, but will be specifiable in config in future PR).
Also allows re-use of TCP connections between requests (connections time out after one minute of inactivity).
Added support for the new
Portsresource, sinceNetworkPortswas deprecated in Redfish v1.5.0Added support for getting power metrics from the new
PowerSubsystemresource, sincePowerwas deprecated in redfish v1.15.0. Note that voltage readings and power control data are unavailable with the newPowerSubsystemuntil a future PR where support for the newEnvironmentMetricsandSensorresources is added.Added support for getting thermal metrics from the new
ThermalSubsystemresource, sinceThermalwas deprecated in redfish v1.15.0. Note that fan RPM readings are unavailable withThermalSubsystemdue to an upstream bug (stmcginnis/gofish#585).