User Tools

Site Tools


operations:monitoring

This is an old revision of the document!


Monitoring Setup

How to add hosts to Checkmk monitoring.

Agent Types

Type Use When
TLS Host supports cmk-agent-ctl-daemon
Legacy Unprivileged LXC containers

Current Hosts

Host Type Notes
traefik (CT 102) TLS nesting=1 required
hv-04 (Proxmox) TLS Native host
openclaw (CT 103) TLS UFW port 6556
postgres (CT 110) Legacy TCP 6556
n8n (CT 111) Legacy TCP 6556
vaultwarden (CT 112) Legacy TCP 6556
dokuwiki (CT 113) Legacy TCP 6556
uptime-kuma (CT 114) Legacy TCP 6556

Adding a New Host

1. Install Agent

# Get agent package from Checkmk
scp root@10.100.161.115:/omd/sites/monitoring/share/check_mk/agents/check-mk-agent_*.deb /tmp/
 
# Install
dpkg -i /tmp/check-mk-agent_*.deb

2a. TLS Mode (if daemon works)

cmk-agent-ctl register \
  --hostname <HOSTNAME> \
  --server 10.100.161.115 \
  --site monitoring \
  --user cmkadmin \
  --password <PASSWORD> \
  --trust-cert

2b. Legacy Mode (unprivileged LXC)

# Delete TLS registration
cmk-agent-ctl delete-all --enable-insecure-connections
 
# Enable TCP socket
mkdir -p /etc/systemd/system/check-mk-agent.socket.d
cat > /etc/systemd/system/check-mk-agent.socket.d/tcp.conf << EOF
[Socket]
ListenStream=
ListenStream=6556
EOF
 
systemctl daemon-reload
systemctl restart check-mk-agent.socket
 
# Disable broken daemon
systemctl disable --now cmk-agent-ctl-daemon

3. Add Host in Checkmk

# Via CLI
pct exec 115 -- su - monitoring -c "cmk -II <hostname> && cmk -R"
 
# Or via Web UI: Setup > Hosts > Add host

Troubleshooting

# Test agent from Checkmk
pct exec 115 -- su - monitoring -c "cmk -d <hostname>"
 
# Test TCP connectivity
nc -v <host-ip> 6556
operations/monitoring.1770409394.txt.gz ยท Last modified: by admin