Werk #12678: UNIX agent: Better error communication for failed python plugins

Component Checks & agents
Title UNIX agent: Better error communication for failed python plugins
Date May 25, 2021
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 2.1.0i1 2.0.0p6
Level Trivial Change
Class New Feature
Compatibility Compatible - no manual interaction needed

Werk #12149 states out that, on UNIX, a python agent plugin called plugin.py is always executed with Python 3, while a plugin called plugin_2.py is always executed with Python 2.

While an error will be communicated if there is no suitable Python installation available, some other Python agent plugin related error situations pass silently. The cause for this is that the agent assumes that python plugins always come as a pair of Python 3 and Python 2 version, but this is not always the case in reality.

With this Werk, the communication is improved, by showing a WARN state in the Check_MK service for the following situations:

  • plugin.py is deployed, but found no Python 3 installation, and there is no plugin_2.py counterpart. The reason "Missing Python 3 installation" will be displayed alongside the failed plugin.
  • The other way round: plugin_2.py is deployed, but found no Python 2 installation, and there is no plugin.py counterpart. The reason "Missing Python 2 installation" will be displayed alongside the failed plugin.