Exporting and importing BI packs
Checkmk cannot export or import BI packs.
Comments: 4
Oldest
•
Newest
•
Most likes
•
Fewest likes
-
07 Oct, '22
MarkusHighlighted comment
With two systems the former bi packs were easier to compare (until 1.6). With new bi packs it is really hard to compare. Only pretty print can help out. Therefore: yes please do it! -
05 May, '23
StefanI can supply a CLI based solution/idea for inserting/deleting rulepacks. The export should be easy to implement with the right imports.
I programmatically generate my rulepacks from a directory structure and textfiles and needed a way to import rulesets with 100-300 rules each.
$ ./deleteBI-v2.py
These rulepacks are installed:
['ruleset1', 'ruleset2']
usage: deleteBI-v2.py [-h] --id ID
$ ./insertBI-v2.py -i rulesettest.mk
Using rulesettest.mk as input-file...
Adding the following rules...:
Infrastructure
Hardware
Network
Storage
...
Essential imports are:
from cmk.gui.bi import BIManager
from cmk.utils.bi.bi_packs import BIAggregationPack, BIAggregationPacks
And the functions for loading/saving the config:
bi_packs = BIAggregationPacks(BIManager.bi_configuration_file())
bi_packs.load_config()
bi_packs.add_pack(BIAggregationPack({'id': 'Test', 'title': ...}))
bi_packs.save_config() -
19 Oct, '23
LGEAuf Linux Ebene vermutlich gut möglich für diesen Use-Case:
~/etc/check_mk/multisite.d/wato/bi_config.bi