Is there a way to list all registered instances of Metric & Graph? Use case is that when developing a plugin, whatever its type, its useful to re-use existing metric & graph definitions as not having to reinvent the wheel. However, it seems pretty difficult to determine which actually exist, given that we aren’t used metric_info anymore.
I often find myself instantiating a Metric only to find errors about it having been defined already in ~site/var/log/apache/error.log
I’d be fine with any method, be it some kind of clever CLI tool usage or even a piece of code to insert somewhere that goes through the registered instances & prints them to some kind of log file. Ideally I’d like a method that not only goes through base CheckMK, but also through installed third-party packages.
Thanks.
PS: I’m aware of this list, but that one has a couple of drawbacks:
- seems to be pre-2.3.0/2.4.0 era
- only lists the metric names, not their definitions, which is kind of important for scaling (bits? bytes?) and type to get right (e.g. number of bytes vs. bytes per second…)