No, it’s not. I actually want to write custom checks for my Mikrotik router (the existing Mikrotik extension and SNMP are not enough). So, It’s a python script which already successfully runs on the monitoring host (inside the docker container). Question is just how to make the script called.
Apologies, maybe I have a misunderstanding here. Yes, I am using local checks but they are executed by the check-mk-agent, right? And check-mk-agent runs on some other host (usually the host to be monitored). But I want to execute the script on the monitoring host (checkmk raw docker container) itself. Does it include agent functionality? If so, how?
The script itself is not the issue and probably I would also be able to execute a script for a single service. But, I want to output the results of multiple services in a simple command run, similar as piggyback.
Let me clarify again: The host to be monitored is “gate01” and does not have any agents running (it’s a proprietary system).
On the monitoring host (i.e., the checkmk system itself) is a script that outputs the following:
OMD[cmk]:~$ /omd/sites/cmk/local/lib/nagios/plugins/mikrotik_inactive
<<<<gate01>>>>
<<<local>>>
0 BFD - All sessions up
0 Internet - OK to 8.8.8.8
2 DefaultRoute - No active default route
OMD[cmk]:~$
<<<<>>>>
I want the services BFD, Internet and DefaultRoute show up as individual services of host “gate01”
What do I need to do that script mikrotik_inactive is executed on the monitoring host?
EDIT: Ok, I understand now what you mean. Indeed, “Datasource program” would work with the exception of @mschlenker 's remark:
IIRC, when using a data source program, other ways of obtaining agent data for a host are not possible.
Because the host does have other data sources as well.