Hello everyone,
I need to develop a plugin, which has the following attributes:
- Executed from a monitored host instead of the CMK server
- Must be distributable via agent bakery
- Must be configurable with service monitoring rule
First, I’d like to make sure that I get the correct kind of check here: Since it has to be executed remotely and not on the CMK Server, my understanding is that what I need is an “agent-based ckeck-plugin”, since most of the other kind of checks are either executed from the CMK server directly or have to be manually saved in specific folders (which makes distribution via agent bakery impossible).
Is this correct?
Assumed this is correct:
I am pretty much done with the development of the plugin. The goal is to have the script execute a tcp-port-scan just as the native “check_tcp” check is doing it, but executed from the remote host instead of the CMK Server (which seems not to be possible with the existing check).
I have successfully achieved most things: The agent plug-in is working and provides the results in the agent output, the check plug-in successfully parses the returned values including response time metrics and the service monitoring rules for different port states and response time thresholds are successfully evaluated.
The only thing missing is that the agent plugin is currently scanning a hardcoded IP and Port. How can I achieve these two parameters to be configurable in the service monitoring rule and have the agent plug-in use these instead of the hardcoded values?