The command: echo “0 “My service” myvalue=73;80;90 My output” doesn’t work with a custom Nagios plugin, the graph isn’t available, event if I check the box “performance data” into the rule “Integrate Nagios Plugin”.
If you want to execute a Nagios plugin from the checkmk agent on the host have a look at the MRPE mechanism (search on docs.checkmk.com). It will also pass the metrics from the plugin.
Thank for this advice but the goal is to not use the agent because this custom Nagios plugin checks a specific status of internet service, not of a host.
If I use the agent to execute this custom script (MRPE or local check), custom check will be associated with this agent-based host.
Maybe, is there a way to associate the HostA service to the HostB?
Then you need to have the Nagios plugin in /usr/lib/nagios/plugins on the monitoring server or even better in $OMD_ROOT/local/lib/nagios/plugins of the checkmk site.
In the ruleset “Integrate Nagios Plugin” create a rule that has the command line of the Nagios plugin (including the path if installed in /usr/lib/nagios/plugins). That’s all.