Description

This mkp includes:

  1. the script to import the cmcdump config and state file from a remote directory

~/local/bin/cmcdump_import.py* You can run the script with -h to get a help

  1. You can run the script via cronjob inside the site etc/cron.d/cmcdump_import OMD[at]:~$ cat ~/etc/cron.d/cmcdump_import ############# #/2 * * * * mk-job cmc-import-state cmcdump_import.py -S >/dev/null #/2 * * * * mk-job cmc-import-config cmcdump_import.py -C >/dev/null

For monitoring the cronjob, I'm using mk-job. Please see this manual for configuring mk-job: https://docs.checkmk.com/latest/en/monitoring_jobs.html

after modifying this file, please run omd reload crontab

Inside the script, you need to modify the following lines:

The path of the config and state file. In my case both files are in the directory

35 remotepath="/tmp/path"

The regex for the config and state file

49 cmcdumpdir = re.search("conf.", config) 57 cmcdumpdirump = re.search("conf.", dump) 72 match = re.search("state.*", statefile)

Version 2.0.5
Latest version
Note: This version requires Checkmk version 2.0.0 or higher.

Uploaded on: 21 Dec 2021

Built on Checkmk version: 2.0.0p16

Minimum Checkmk version required: 2.0.0p12

MKP MD5 hash: eb300f10c237ac47b92ea959e736f843