Hello,
Multiple hours later and nothing. I’ve gone through the NTP plugin like a million times, through the docs and cant seem to figure out how exactly I can pass the data received from the custom plugin and to which file the data should be passed?
Currently, the structure is the following:
The actual check that will output the data is located here:
./local/lib/nagios/plugins/uptime
The check inside ./local/share/check_mk/checks/uptime has this code:
active_check_info['uptime'] = {
'command_line': 'uptime $ARG1$',
'argument_function': uptime_check_arguments,
'service_description': _check_description,
'has_perfdata': True,
}
The ‘plugins/wato’ has the actual graphical fields and:
rulespec_registry.register(
HostRulespec(
group=RulespecGroupActiveChecks,
match_type='dict',
name='active_checks:uptime',
valuespec=_valuespec_active_checks_upt,
)
)
The ‘plugins/metrics/’ have not been yet edited, but I can seem to figure out how the data is being passed there.
Can I pass a JSON like data structure like so:
{‘dns_resolution_time’: 0.002, ‘ttfb’: 0.169, ‘tplt’: 1.394, ‘db_err’: 0, ‘http_err’: 0, ‘unknown_err’: 0, ‘up’: 0}
Any help is greatly, greatly appreciated.
Regards,
Marcus