Hello,
I’ve written a client plugin which provides data for the inventory.
A script in ~/local/share/check_mk/inventory
collects this data and feeds the inventory store.
When I look into the inventory tree of a host, the data is available there.
This is the inventory tree:
software.applications.snapshot_backup.version
software.applications.snapshot_backup.snapshot_version
software.applications.snapshot_backup.snapshot_version_info
software.applications.snapshot_backup.snapshot_build
software.applications.snapshot_backup.snapshot_date
Now I want to have a summary page to display this data across all hosts in a table.
Just like it is available with the builtin view Inventory\CPU Related Inventory of all Hosts
page like this:
Host | Version | Snapshot Version | … |
---|---|---|---|
Host1 | 3.12 | 1.48 | — |
Host2 | 3.08 | 1.46 | — |
Host3 | 3.11 | 1.46 | — |
From the informations from this page I’ve tried to adapt an own script to get a own view.
~/local/share/check_mk/web/plugins/views/my_inventory.py
#!/usr/bin/python
inventory_displayhints.update({
".software.applications.snapshot_backup:" : { "title" : _("Snapshot Inventory"),
"render" : render_inv_dicttable,
"view" : "invsnap_of_host",
"keyorder": ["version", "snapshot_version", "snapshot_build", "snapshot_date", "snapshot_version_info"] },
".software.applications.snapshot_backup:*.version" : { "title" : _("Version") },
".software.applications.snapshot_backup:*.snapshot_version" : { "title" : _("Snapshot Version") },
".software.applications.snapshot_backup:*.snapshot_build" : { "title" : _("Snapshot Build") },
".software.applications.snapshot_backup:*.snapshot_date" : { "title" : _("Snapshot Datum") },
".software.applications.snapshot_backup:*.snapshot_version_info" : { "title" : _("Snapshot Info") },
})
declare_invtable_view("invsnap", ".software.applications.snapshot_backup:", _("Snapshot Inventory"), _("Snapshot Inventory"))
Then I’ve restarted the site using omd restart apache && cmk -v -R
, but I cannot see any result in the UI.
What could I check? What did I possibly wrong?
Best regards,
Alexander