Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Restructure and clarify.

Problem

If you experience that the Checkmk agent is failing on CentOS 7 with systemd like so:

Code Block
languagebash
themeMidnight
systemctl list-units | grep check-mk
...
check-mk-agent@99995-<ipofhost><$IP_OF_HOST>:6556-<ipofcheckmkserver>56520<$IP_OF_CHECKMK_SERVER>56520.service loaded failed failed Checkmk agent (<ipofcheckmkserver>56520<$IP_OF_CHECKMK_SERVER>56520)
check-mk-agent@99997-<ipofhost><$IP_OF_HOST>:6556-<ipofcheckmkserver>57602<$IP_OF_CHECKMK_SERVER>57602.service loaded failed failed Checkmk agent (<ipofcheckmkserver>57602<$IP_OF_CHECKMK_SERVER>57602)
check-mk-agent@99999-<ipofhost><$IP_OF_HOST>:6556-<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616.service loaded failed failed Checkmk agent (<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616)
check-mk-agent.socket


Code Block
languagebash
themeMidnight
systemctl status check-mk-agent@99999-<ipofhost><$IP_OF_HOST>:6556-<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616.service
check-mk-agent@99999-<ipofhost><$IP_OF_HOST>:6556-<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616.service - Checkmk agent (<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616)
Loaded: loaded (/etc/systemd/system/check-mk-agent@.service; static; vendor preset: disabled)
Active: failed (Result: resources) since Fri 2021-11-19 23:24:49 UTC; 3 weeks 3 days ago
Process: 23951 ExecStart=/usr/bin/check_mk_agent (code=exited, status=0/SUCCESS)
Main PID: 23951 (code=exited, status=0/SUCCESS)


Code Block
languagebash
themeMidnight
Nov 19 23:24:48 <hostname> systemd[1]: Starting Checkmk agent (<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616)...
Nov 19 23:24:49 <hostname> systemd[1]: check-mk-agent@99999-<ipofhost><$IP_OF_HOST>:6556-<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616.service failed to run 'stop-post' task: Transport endpoint is not connected
Nov 19 23:24:49 <hostname> systemd[1]: Failed to start Checkmk agent (<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616).
Nov 19 23:24:49 <hostname> systemd[1]: Unit check-mk-agent@99999-<ipofhost><$IP_OF_HOST>:6556-<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616.service entered failed state.
Nov 19 23:24:49 <hostname>systemd[1]: check-mk-agent@99999-<ipofhost><$IP_OF_HOST>:6556-<ipofcheckmkserver>58616<$IP_OF_CHECKMK_SERVER>58616.service failed.

Reason

The root cause for this is that CentOS 7 is shipping an old systemd version. Checkmk requires systemd >=235.

You can check your systemd version with systemctl --version

Solution

Then there are two options you can get this working:

...

to resolve this issue.

  1. Contact the agent through xinetd or SSH. For xinetd have a look at the rule set: Checkmk agent network service (Linux)
  2. Upgrade to CentOS 8 or a suitable (preferably binary compatible) alternative (e.g., Rocky Linux or AlmaLinux)

The root cause for this is that CentOS 7 might use an old systemd version. Checkmk requires systemd >=235.

...

Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("troubleshooting","workaround") and type = "page" and space = "KB"
labelsworkaround troubleshooting

...