Can we monitor a host without an active connection

As Dirk said:

  1. run the agent on the host (monitoring client) - e.g. scheduled from cron, probably as root (or with sudo) to get all the information
  2. capture the agent output and transfer it to the monitoring server - use whichever method best fits your environment. Like, copy the file via scp to ~/tmp/check_mk/agent-output-from-your-hostname on the monitoring server.
  3. configure a WATO rule “Individual program call instead of agent access” for this host:
    “Command line to execute” cat ~/tmp/check_mk/agent-output-from-your-hostname. So instead of trying to connect to the agent on the host, the monitoring server just reads the information from the local file you copied there.
  4. If you cannot ping the host, then add another WATO rule, “Host Check Command” for this host:
    “Use a custom check plugin …” check_file_age -w 120 -c 120 -f ~/tmp/check_mk/agent-output-from-your-hostname. So if the file is older than 120 seconds, the host will be considered down.
6 Likes