Skip to content

Instantly share code, notes, and snippets.

@nitrag
Created March 6, 2018 03:04
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save nitrag/ada99daf364f5c5b27049d51ae740e25 to your computer and use it in GitHub Desktop.
Save nitrag/ada99daf364f5c5b27049d51ae740e25 to your computer and use it in GitHub Desktop.
Setup check_mk_agent via systemd on Ubuntu 16.04 (OMD, Check_MK)
# How to install Check MK Agent on ubuntu 16.04
# Install check_mk_agent:
# - sudo apt-get install check-mk-agent (will install older version)
# - On your Check_MK dashboard, go to "Monitoring Agents", click the link for "Check_MK Agent for Linux", save the raw text
# on your server:
sudo vi /usr/bin/check_mk_agent
# paste Check_MK dashboard > Monitoring Agents > Check_MK Agent for Linux
sudo chmod +x /usr/bin/check_mk_agent
#
# Setup Systemd
#
sudo vi /etc/systemd/system/check_mk.socket
# paste Check_MK dashboard > Monitoring Agents > systemd SOCKET definition file
sudo vi /etc/systemd/system/check_mk@.service
# paste Check_MK dashboard > Monitoring Agents > systemd SERVICE definition file
#start
sudo systemctl daemon-reload
sudo systemctl enable check_mk.socket
sudo systemctl start check_mk.socket
# Add firewall rule from specific OMD Server IP
sudo ufw allow from 15.15.15.0/24 to any port 6556
#test on another host
nc -v <ip address> 6556
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment