ID: 10601
Title: Auto migration of check plugins to new section definitions
Component: Checks & agents
Level: 2
Class: New feature
Version: 1.7.0i1
We are now converting all plugins to the new format expected by
the future API. Migrated are plugins from
<ul>
<li>share/check_mk/checks</li>
<li>local/share/check_mk/checks</li>
<li>share/check_mk/inventory</li>
<li>local/share/check_mk/inventory</li>
</ul>
Although we are trying to migrate as many check and inventory plugins
as possible on the fly, for some plugins this may fail.
These are the anticipated reasons why auto-migration may fail:
<h4>A cluster aware checkplugin</h4>
Checkmk refuses to auto-migrate cluster aware (those with node_info
set to True) check plugins. Auto converting the data layout
is too error prone. These plugins must be migrated manually.
<h4>Checkplugins using 'extra_sections'</h4>
Checkmk refuses to auto-migrate check plugins that make use of the
'extra_sections' feature. In the new API the destiction between the
regular section and additional 'extra_sections' is not made, and all
section content will be passed in its 'parsed' version.
Therefore these Plugins have to be migrated manually.
<h4>A missing SNMP scan function</h4>
Every Checkplugin that specifies an 'snmp_info' key must
specify 'snmp_scan_function' as well.
<h4>A complex SNMP scan function</h4>
If Checkmk fails to auto-migrate a legacy SNMP plugin to a section
definition, this is most likely due to an elaborate scan function.
For the auto-migration to work, the scan function must be fairly
simple. Make sure your scan function has the following properties:
<ul>
<li>it only consists of one single return statement</li>
<li>it does not in turn call other functions (not even 'all' or
'any')</li>
<li>it does not negate compound expressions</li>
</ul>
If in doubt, take a look at scan functions that succeed to be migrated
to see what options are available.
<h4> Known limitations</h4>
<ul>
<li>HostLabels that are generated in a subchecks discovery function are
lost</li>
</ul>