Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install check_mk agent on OSX
# Clone Repo
git clone
cd Check_MK
# Remove less common plugins
rm -f agents/plugins/monitor-jss-and-macos-updates agents/plugins/city-temperatures agents/plugins/monitor-kerio agents/plugins/smart*
# Install dependencies
brew install smartmontools osx-cpu-temp
# Modify the plist file (remove cwd)
sed -i '' '/<key>WorkingDirectory/{N;d;}' LaunchDaemon/de.mathias-kettner.check_mk.plist
# Create directories needed and copy files to required location
mkdir /usr/local/lib/check_mk_agent
mkdir /usr/local/lib/check_mk_agent/local
cp agents/check_mk_agent.macosx /usr/local/lib/check_mk_agent/
cp -r agents/plugins/ /usr/local/lib/check_mk_agent/
sudo cp LaunchDaemon/de.mathias-kettner.check_mk.plist /Library/LaunchDaemons/
ln -s /usr/local/lib/check_mk_agent/check_mk_agent.macosx /usr/local/bin/check_mk_agent
mkdir /etc/check_mk
sudo touch /var/run/de.arts-others.softwareupdatecheck
sudo touch /var/log/check_mk.err
# Permissions
chmod +x /usr/local/lib/check_mk_agent/check_mk_agent.macosx
sudo chmod o+rw /var/run/de.arts-others.softwareupdatecheck
sudo chmod 666 /var/log/check_mk.err
sudo chown -R root:admin /usr/local/lib/check_mk_agent
sudo chmod 644 /Library/LaunchDaemons/de.mathias-kettner.check_mk.plist
# Install LaunchDaemon
sudo launchctl load -w /Library/LaunchDaemons/de.mathias-kettner.check_mk.plist
# Once lnx_if fix is merged into the agent, the below is required (see:
brew install iproute2mac

This comment has been minimized.

Copy link
Owner Author

@catchdave catchdave commented Mar 4, 2020

I couldn't find instructions anywhere for how to install CMK agent onto a OSX machine. Above is what finally got things to work for me


This comment has been minimized.

Copy link

@sergiodadi sergiodadi commented Feb 10, 2021

Hi, thank you very much for this script. It helped me a lot !


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment