You could start with Local Checks: Extending an agent is simple
They are simple scripts on the monitoring host that get called by the agent.
Other examples are available in our github repo: GitHub - HeinleinSupport/check_mk_extensions: check_mk Plugins