Monitor a UPS Zen-X with a .txt file

Hi @mike1098

Yes, but you can abuse another host’s agent to run a local check that creates piggyback data for it.
As previously stated, I assume the UPS is connected to the Checkmk host, so we can use the
agent from the Checkmk host. It could be any other host, too, doesn’t matter.

This example, is completely fake, it’s just for show:

  • A new “dummy” host, called “otherhost”:
    image

  • My fake local check, does this:

#!/bin/sh
echo "<<<<otherhost>>>>"
echo "<<<local>>>"
echo "0 Status - I'm OK"
echo "0 Voltage - I'm OK, too"
echo "<<<<>>>>"
  • And this creates “piggyback” data for me in $OMD_ROOT/var/check_mk/piggyback/otherhost:
<<<local:cached(1643199412,90)>>>
0 Status - I'm OK
0 Voltage - I'm OK, too
  • Which I can then see, as services:

  • Finally, to not ping it (because we can’t), and to use my script output as status check whether the host is UP or not, I create a “Host check command” rule, like this:

  • Done. Coffee… :slight_smile:

Thomas

1 Like