Please don't merge yet, it's a fully working concept, but needs to be accepted and finished (documentation updates and post-review fixes).
Fixes panics when metric namespace is incomplete.
Fixes problems with unavailable metrics on some Ceph setups (fixes #26)
Fixes #9 - now all /metric/avgcount and /metric/sum metrics are collapsed into /metric (with value of /sum divided by /avgcount).
Summary of changes:
Refactored code with support for dynamic metric catalog generation based on Ceph socket data (both namespaces and descriptions are gathered from Ceph)
Added support for delta metrics
Added dynamic metric unit detection and metric data type (float64 or uint64) based on unit
Updated unit tests to support dynamic metric gathering and delta metrics
Updated plugin and unit tests to support snap-plugin-lib-go
Removed fixed metric list documentation files and replaced with single METRICS.md (complete metric list for all daemons with latest Ceph version)
How to verify it:
Load plugin
Create global config with ceph socket path and binary path provided (global config is needed for GetMetricTypes to build metric catalog dynamically)
Create task for collection of /intel/storage/ceph/*
Try to call snaptel metric list, complete metric list should be available
Try to call snaptel task watch to get values for all available Ceph metrics.
Please don't merge yet, it's a fully working concept, but needs to be accepted and finished (documentation updates and post-review fixes).
Fixes panics when metric namespace is incomplete. Fixes problems with unavailable metrics on some Ceph setups (fixes #26) Fixes #9 - now all
/metric/avgcount
and/metric/sum
metrics are collapsed into/metric
(with value of /sum divided by /avgcount).Summary of changes:
How to verify it:
Testing done: