Werk #12500: Call parse function even for empty data

Komponente Checks und Agenten
Titel Call parse function even for empty data
Datum 06.04.2021
Checkmk-Editon Checkmk Raw (CRE)
Checkmk-Version 2.1.0i1 2.0.0p2
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein

This change only affect users with own SNMP section plugins developed against the *new* API.

Previously the parse function of an SNMP section (or SNMP check plugin) has only been called if at least *some* data could be fetched from the host (the SNMP device).

In the old API (Checkmk version

The new API will *allways* call the parse function, if the sections raw data is present in the fetched data (even if it is empty). It is the programmers responsibility to deal with an potentially empty data set.

This allows for a subtle distiction: If the parse function returns `None`, no further processing is done, it is regarded as 'not present'. An empty return value could represent some valid information, such as an empty list of error messages.

Note that this behaviour is consistent with the TCP data sources' sections, where we also may encounter sections that are present, but empty.

Zur Liste aller Werks