How to convert bi.mk (CheckMK 1.x) to bi_config.bi (CheckMK 2.x)

CMK version: 2.0.0p22 CEE
OS version: RHEL 7.4

I want to convert the bi_mk (from a 1.6.0p28 site) into bi_config.bi (to a 2.0.0p27 site).
I’ve found a 2.x script named

~/lib/python3/cmk/utils/bi/bi_legacy_config_converter.py

which, I guess, is the right tool to use, but I have no idea how.

Can anyone shed some light upon this utility?

Thanks in advance

Well, you simply upgrade your site and let the upgrade process handle the conversion.

I must admit I have not explained properly what I want to get:

I need to convert manually a bi.mk file into a bi_config.bi file.

But why?
This is a Checkmk-internal file, so you should not tamper with it.

Because we created a special CheckMK 1.x site which displays the BIs of many other sites in the same CheckMK server.

How is that?

When other .mk files (having similar BI contents) are located in the same subdirectory where bi.mk is found (~/etc/check_mk/multisite.d/wato), the contents of all BIs in those other .mk files are displayed too.

That behaviour is no longer available in CheckMK 2.x because

  1. filename has been changed from bi.mk to bi_config.bi.
  2. file format has also changed. bi_config.bi content has only one very long line.
  3. copying others .bi files has no effect.

P.D: We are also engineering the way to merge different .bi files into one.