Congratulations!
What you need is a metric plugin or an extension to the existing metric plugin.
Add the following code in the new file ~/local/share/check_mk/web/plugins/metrics/smart.py
:
# define a new metric:
metric_info["harddrive_helium_level"] = {
"title": _("Helium Level"),
"unit": "count",
"color": "24/a",
}
# map the performance counter 'Helium_Level' to the new metric:
check_metrics["check_mk-smart.stats"].update({
"Helium_Level": {
"name": "harddrive_helium_level"
},
})
This usually requires a cmk -R
. Occasionally the graph is shown twice because checkmk caches some things. If that is the case, try omd restart
.
The original metric definition can be found in ~/lib/python/cmk/gui/plugins/metrics/check_mk.py
. See there for more examples. Search for check_mk-smart.stats
.