chrisss404 / check-mk-arm

Checkmk for Raspberry Pi.
183 stars 23 forks source link

Also possible with Enterprise? #3

Closed flix87 closed 6 years ago

flix87 commented 6 years ago

Hi,

we are able to use the enterprise edition. I replace all raw with enterprise and cre with cee and try to use the script but i ran into an error:

make[2]: Entering directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_mk' rm -f /root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/debian/check-mk-enterprise-1.4.0p21/omd/versions/1.4.0p21.cee/skel/etc/check_mk/main.mk- rm -f /root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/debian/check-mk-enterprise-1.4.0p21/omd/versions/1.4.0p21.cee/skel/etc/check_mk/multisite.mk- make[2]: Leaving directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_mk' make[2]: Entering directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_multi'

Optional target called to create additional files below skel

make[2]: Leaving directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_multi' make[2]: Entering directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_mysql_health' make[2]: Nothing to be done for 'skel'. make[2]: Leaving directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_mysql_health' make[2]: Entering directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_oracle_health' make[2]: Nothing to be done for 'skel'. make[2]: Leaving directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_oracle_health' make[2]: Entering directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_webinject' make[2]: Nothing to be done for 'skel'. make[2]: Leaving directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages/check_webinject' make[2]: Entering directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages' make[2]: cmc: No such file or directory. Stop. make[2]: Leaving directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee/packages' Makefile:105: recipe for target 'pack' failed make[1]: [pack] Error 2 make[1]: Leaving directory '/root/check-mk-arm/check-mk-enterprise-1.4.0p21.cee' debian/rules:67: recipe for target 'install' failed make: [install] Error 2 dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 debuild: fatal error at line 1116: dpkg-buildpackage -rfakeroot -us -uc -i.git -I.git -icheck-mk-enterprise-bin-1.4.0p21.cee.tar.gz -Icheck-mk-enterprise-bin-1.4.0p21.cee.tar.gz -i.gitignore -I.gitignore failed Makefile:361: recipe for target 'deb' failed make: [deb] Error 29

someone has an idea to solve this?

chrisss404 commented 6 years ago

Sorry, I don't have access to the enterprise edition, so I can not support you with this issue.

PLanB2008 commented 5 years ago

Couldn't we teste against the demo build to get a builchain running for check_mk enterprise?

chrisss404 commented 5 years ago

Sure, you can try to build it.

Here are the basic steps, feel free to try them:

wget -qO- https://mathias-kettner.de/support/1.5.0p9/check-mk-enterprise-1.5.0p9.cee.demo.tar.gz | tar -xvz
cd check-mk-enterprise-1.5.0p9.cee.demo
make -C omd setup
make deb DEBFULLNAME="Mr. Buildmaster" DEBEMAIL="mail@buildmaster.com"

If snap7 is used in the enterprise edition you might have to modify the package before you start compiling, as it it is done here: https://github.com/chrisss404/check-mk-arm/blob/master/build_check_mk.sh#L43-L49

PLanB2008 commented 5 years ago

Thanks for your reply. I'll give it a shot.

Am I right you are compiling check_mk on a arm processor, right? No cross compiling?

This is one thing I've to figure out for sure. Probably just a missing library. Running

./configure --with-boost-libdir=/usr/lib/arm-linux-gnueabihf --host=arm-linux-gnueabihf

I reveive:

checking for library containing rrd_xport... no configure: error: unable to find the rrd_xport function

chrisss404 commented 5 years ago

Yes, I compile it on a 1st gen pi.

Just a guess, but you can check if you have the packages rrdtool and librrd-dev and install them if not.

chrisss404 commented 5 years ago

Jup, build of enterprise demo works: 1.5.0p9.demo.

Taken steps:

wget -qO- https://mathias-kettner.de/support/1.5.0p9/check-mk-enterprise-1.5.0p9.cee.demo.tar.gz | tar -xvz
cd check-mk-enterprise-1.5.0p9.cee.demo
make -C omd setup
tar -xvzf omd/packages/snap7/snap7-full-1.3.0.tar.gz -C omd/packages/snap7
cp omd/packages/snap7/snap7-full-1.3.0/build/unix/arm_v6_linux.mk omd/packages/snap7/snap7-full-1.3.0/build/unix/armv6l_linux.mk
ln -s arm_v6-linux omd/packages/snap7/snap7-full-1.3.0/build/bin/armv6l-linux
cp omd/packages/snap7/snap7-full-1.3.0/build/unix/arm_v7_linux.mk omd/packages/snap7/snap7-full-1.3.0/build/unix/armv7l_linux.mk
ln -s arm_v7-linux omd/packages/snap7/snap7-full-1.3.0/build/bin/armv7l-linux
tar czf omd/packages/snap7/snap7-full-1.3.0.tar.gz -C omd/packages/snap7 snap7-full-1.3.0
make deb DEBFULLNAME="Mr. Buildmaster" DEBEMAIL="mail@buildmaster.com"
PLanB2008 commented 5 years ago

Sorry for the late reply, and thanks for your support.

I was able to build it this way myself. There are still some minor issues, I'll collect them and do a pull request If you want to support this as well.

Another small hint:

Yout should run make with -j parameter to use all cores of your device, this speeds up the compiling process a lot.

You can use make -j$(nproc) to determine the cores and set it to max.

PLanB2008 commented 5 years ago

I ran into an error launching the webpage complaining about a sla module.

grafik

Are you able to start an instance using the cee demo package?

EDIT:

Okay for now I solved it by providing the sla.py from a amd64 cee installation to /omd/sites/test1/share/check_mk/web/htdocs/

chrisss404 commented 5 years ago

No, I haven't tested the package.

Thanks for pointing out the -j parameter, I will add it for people who want to compile on a more recent hardware than me.

I wish you good luck on your continuing journey.