Python Plugin gets removed

CMK version:2.1.0p1
**OS version: Debian 10 **
**Error message: none - no services found **

Hello CMK-Users,

i created my first Windows Plugin for the new agent. The plugin was written after the guidelines in the main documentation. [ Updates und Upgrades (checkmk.com)]

The powershell script works properly and delivers the correct output. I check that on the windows host and on the cmk server. On the cmk-server shell i can see the <<>> when i ask per cmk command as follows

cmk -d myserver01 | grep -A5 '^<<<rds_session_host'

I placed the corresponding python plugin in /omd/site/local/lib/check_mk/base/plugins/agent_based/ like the documentation says.

Now to the problem:
i cant get any services in the service configuration under the host.

I checked the Output with

cmk -II --debug --detect-plugins=rds_session_host myserver01

i tested also with following command:

cmk --debug -vvn myserver01

i get as output:

<<<rds_session_host>>> / Transition NOOPParser → HostSectionParser

→ Add sections: [‘check_mk’, ‘checkmk_agent_plugins_win’, ‘cmk_agent_ctl_status’, ‘df’, ‘dotnet_clrmemory’, ‘fileinfo’, ‘logwatch’, ‘mem’, ‘ps’, ‘rds_session_host’, ‘services’, ‘systemtime’, ‘uptime’, ‘winperf_if’, ‘winperf_phydisk’, ‘winperf_processor’, ‘wmi_cpuload’]

Extension
After i tested a bit with it, it seems that the plugin.py gets removed from that path. I saw an error in the service discovery. The plugin seems to crash. However, it cant be right, that the plugin gets removed right?
How can i investigate further ?

is this your actual plugin output? If so I think there should be a new line after the <<<rds_session_host>>>.

Like this

<<<rds_session_host>>>
 / Transition NOOPParser → HostSectionParser

no, thats some of the Output of the command:

cmk --debug -vvn myserver01

it outputs all Sections and some debugging info. that seem to work now.

The problem is still that the plugin gets deleted after every Service discovery from wato.

That’s the problem. If your check is only found on discovery if you use the “detect-plugins”, then your parse or discovery function has a problem.
Without your code it is complicated to say more.
Also the agent output of your script would help.

1 Like