Inventory display hints in new check plugin API

I have an check plugin with v1 API that uses inventory display hints like this:

# File: web/plugins/views/foo.py

from cmk.gui.i18n import _
from cmk.gui.views.inventory.registry import inventory_displayhints

inventory_displayhints.update({
    ".software.applications.foo.": {
        "title" : _("My Foo"),
    },

How can I create display hints in the new check plugin API?

@moritz Unfortunately the Developing agent-based check plug-ins has no information about inventories. Is there some documentation/examples how to implement inventories?

Hi Daniel!

The inventory UI plug-ins are not part of any of the new (versioned) APIs. For now you have to resort to doing it the old way.

But: We are already working on it. We intend to include an API for inventory UI plug-ins with Checkmk 2.5 – I am not sure if it will be stable or in beta; but I am confident it will be available for tests (and feedback!) during the 2.5 beta phase.

1 Like

@moritz Great news. This means for now I have to leave with this wrong deprecated info because there is no way the get rid of it:

OMD[cmk]:~$ mkp find
File                                                                     Package Version Part                                         Mode      
------------------------------------------------------------------------ ------- ------- -------------------------------------------- ----------
plugins/views/foo.py                                                                     Legacy GUI extensions (deprecated)           -rw-------
plugins/foo.sql                                                                          Agents                                       -rwx------
myfamily/rulesets/foo.py                                                                 Additional Checkmk plug-ins by third parties -rw-------
myfamily/agent_based/foo.py                                                              Additional Checkmk plug-ins by third parties -rw-------

I’m afraid so. I already looked into it, it’s surprisingly difficult to get rid of it in the correct subset of cases :expressionless: