Skip to content

Instantly share code, notes, and snippets.

@cdbessig
Forked from mathse/gist:09d56d5aa473917d8852
Last active November 24, 2021 23:26
Show Gist options
  • Save cdbessig/17aecfb7daa35e8ba604d9b3631ce46c to your computer and use it in GitHub Desktop.
Save cdbessig/17aecfb7daa35e8ba604d9b3631ce46c to your computer and use it in GitHub Desktop.
check_mk on freenas
## you need to enable tftp under services->tftp
login via ssh
su
cd /usr/local/bin/
mount -uw /
wget -O check_mk_agent "https://raw.githubusercontent.com/tribe29/checkmk/master/agents/check_mk_agent.freebsd"
chmod a+x check_mk_agent
# restrict access
echo "check_mk 6556/tcp #check_mk agent" >> /etc/services
echo "check_mk stream tcp nowait root /usr/local/bin/check_mk_agent check_mk_agent" >> /etc/inetd.conf
echo "check_mk_agent : <your nagios host> : allow" >> /etc/hosts.allow
echo "check_mk_agent : 127.0.0.1 : allow" >> /etc/hosts.allow
echo "check_mk_agent : ALL : deny" >> /etc/hosts.allow
echo "check_mk 6556/tcp #check_mk agent" >> /conf/base/etc/services
echo "check_mk stream tcp nowait root /usr/local/bin/check_mk_agent check_mk_agent" >> /conf/base/etc/inetd.conf
echo "check_mk_agent : <your nagios host> : allow" >> /conf/base/etc/hosts.allow
echo "check_mk_agent : 127.0.0.1 : allow" >> /conf/base/etc/hosts.allow
echo "check_mk_agent : ALL : deny" >> /conf/base/etc/hosts.allow
# create plugin directory
mkdir -p /usr/lib/check_mk_agent/plugins
cd /usr/lib/check_mk_agent/plugins
# enable smart plugin
wget -O smart "https://raw.githubusercontent.com/tribe29/checkmk/master/agents/plugins/smart"
chmod +x /usr/lib/check_mk_agent/plugins/smart
mount -ur /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment