How to install this .mkp package

Hello Forum,

I want to install this package: https://github.com/HeinleinSupport/check_mk_extensions/tree/master/sslcertificates

i jumped in as SITE user and downloaded the .mkp file with wget. When I try to install it, I get the following error:

OMD[xx]:~/etc$ check_mk -P install sslcertificates-7.1.mkp
Traceback (most recent call last):
  File "/omd/sites/xx/bin/check_mk", line 94, in <module>
    exit_status = modes.call(mode_name, mode_args, opts, args)
  File "/omd/sites/xx/lib/python/cmk_base/modes/__init__.py", line 72, in call
    return mode.handler_function(*handler_args)
  File "/omd/sites/xx/lib/python/cmk_base/modes/check_mk.py", line 626, in mode_packaging
    cmk_base.packaging.do_packaging(*args)
  File "/omd/sites/xx/lib/python/cmk_base/packaging.py", line 185, in do_packaging
    f(args)
  File "/omd/sites/xx/lib/python/cmk_base/packaging.py", line 513, in package_install
    return install_package(file_name=path)
  File "/omd/sites/xx/lib/python/cmk_base/packaging.py", line 517, in install_package
    tar = tarfile.open(name=file_name, fileobj=file_object, mode="r:gz")
  File "/omd/sites/xx/lib/python2.7/tarfile.py", line 1693, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/omd/sites/xx/lib/python2.7/tarfile.py", line 1751, in gzopen
    raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file

Because we are using the RAW version I don´t have the option to install it with WATO.

Cheers :slight_smile:

Hallo,
download broken or missing package tool?
Ralf

think also … try again

What is the right folder to download the file to?

use the installer
https://checkmk.com/cms_mkps.html
chapter 3
Ralf

Tried again … same error. What is the correct way to download the .mpk file? I tried it with wget like that:

wget https://github.com/HeinleinSupport/check_mk_extensions/raw/master/sslcertificates/sslcertificates-7.1.mkp

Best regards

Hi,
what’s the output of:

file sslcertificates-7.1.mkp

Who is the owner of the file?
How have you switched to the site user?

Karl

Hi kdeutsch,

the output is the following:

sslcertificates-7.1.mkp: gzip compressed data, was "sslcertificates-7.1.mkp", last modified: Mon Oct 28 12:27:32 2019, max compression

Owner of the file is the site user which I used to download it to /tmp. I don´t have any more ideas …

Hi,

… that’s the error message, when you downloaded the webpage and not the mkp-file.

That’s correct.
Let’s try to untar the file:

tar xzf sslcertificates-7.1.mkp

Karl

After that, we can´t find the file. Sorry I´m not a regular linux user … :slight_smile:

mkp install /tmp/sslcertificates-7.1.mkp
No such file /tmp/sslcertificates-7.1.mkp.

On most Linux distributions, the contents of the systemwide /tmp directory is usually deleted on reboot, either by some startup script or because it’s only a memory-based filesystem (tmpfs) anyway.
The same goes for ~/tmp in your site user’s home which is also a tmpfs by default.
You can use /var/tmp instead for files that should be kept across reboots.

Hi,

so let’s start at the beginning:
Switch into the monitoring user:

su - MONITORINGUSER

Check if the mkp package is already installed:

mkp list

If not, then download the mkp file:

wget https://github.com/HeinleinSupport/check_mk_extensions/raw/master/sslcertificates/sslcertificates-7.1.mkp

Now let’s install the file:

mkp install sslcertificates-7.1.mkp

Karl

1 Like

This solved it for me! I don´t know where the error was but it is running fine now. Are you familiar with the plugin? I just can´t find any instructions on the web on how to setup the plugin.

As for my understanding: Do I need to use a PowerShell Script on the machines I want to check?

Hi,
on CEE you deploy the plugin with the agent bakery.
On CRE you have to copy the ps1-script to the plugin directory on your windows servers (C:\ProgramData\checkmk\agent\plugins).

Karl

@kdeutsch

Hello , may i ask you how to deploy config files with the enterprise version to the windows agents ?

thanks Patrick