Agent Updater runs every minute despite setting the policy to 1 hour

CMK version: 2.1.0p9
OS version: Rocky Linux 8

Systemd journal looks like this:

Aug 17 15:37:41 myserver.local systemd[1]: check-mk-agent@107399-1915940-991.service: Succeeded.

Aug 17 15:38:31 myserver.local systemd[1]: Started Checkmk agent updater.

Aug 17 15:38:31 myserver.local systemd[1]: cmk-update-agent.service: Succeeded.

Aug 17 15:38:41 myserver.local systemd[1]: Started Checkmk agent (PID 1915940/UID 991).

Aug 17 15:38:43 myserver.local systemd[1]: check-mk-agent@107400-1915940-991.service: Succeeded.

Aug 17 15:39:26 myserver.local systemd[1]: Started Checkmk agent updater.

Aug 17 15:39:26 myserver.local systemd[1]: cmk-update-agent.service: Succeeded.

Aug 17 15:39:43 myserver.local systemd[1]: Started Checkmk agent (PID 1915940/UID 991).

Aug 17 15:39:45 myserver.local systemd[1]: check-mk-agent@107401-1915940-991.service: Succeeded.

Aug 17 15:40:31 myserver.local systemd[1]: Started Checkmk agent updater.

Aug 17 15:40:31 myserver.local systemd[1]: cmk-update-agent.service: Succeeded.

Aug 17 15:40:45 myserver.local systemd[1]: Started Checkmk agent (PID 1915940/UID 991).

Aug 17 15:40:46 myserver.local systemd[1]: check-mk-agent@107402-1915940-991.service: Succeeded.

Aug 17 15:41:31 myserver.local systemd[1]: Started Checkmk agent updater.

Aug 17 15:41:31 myserver.local systemd[1]: cmk-update-agent.service: Succeeded.

Aug 17 15:41:46 myserver.local systemd[1]: Started Checkmk agent (PID 1915940/UID 991).

Aug 17 15:41:48 myserver.local systemd[1]: check-mk-agent@107403-1915940-991.service: Succeeded.

Aug 17 15:42:31 myserver.local systemd[1]: Started Checkmk agent updater.

Aug 17 15:42:31 myserver.local systemd[1]: cmk-update-agent.service: Succeeded.

Aug 17 15:42:48 myserver.local systemd[1]: Started Checkmk agent (PID 1915940/UID 991).

Aug 17 15:42:50 myserver.local systemd[1]: check-mk-agent@107404-1915940-991.service: Succeeded.

Same behaviour with Version 2.1.0p8 and AlmaLinux 8.6

Systemd Unit-File says minutely:

cat /usr/lib/systemd/system/cmk-update-agent.timer

[Unit]
Description=Periodic Checkmk agent update

[Timer]
OnCalendar=minutely

[Install]
WantedBy=timers.target

FYI: cmk-update-agent: Prevent the minutely timer from flooding the journalctl on Linux

How can I prevent it from writing to syslog?

Hi Duven,

have you installed the patch version (or higher) from the werk’s link? So at least 2.1.0p12 and rolled out new agents accordingly?

Gerd

seems that werk #14733 does not fix the issue with systemd.

I have still the same issue with 2.1.0p25:

Apr  3 10:53:00 pi2 systemd[1]: Started Checkmk agent updater.
Apr  3 10:53:01 pi2 systemd[1]: cmk-update-agent.service: Succeeded.
Apr  3 10:54:00 pi2 systemd[1]: Started Checkmk agent updater.
Apr  3 10:54:01 pi2 systemd[1]: cmk-update-agent.service: Succeeded.
Apr  3 10:55:00 pi2 systemd[1]: Started Checkmk agent updater.
Apr  3 10:55:01 pi2 systemd[1]: cmk-update-agent.service: Succeeded.
Apr  3 10:56:00 pi2 systemd[1]: Started Checkmk agent updater.
Apr  3 10:56:01 pi2 systemd[1]: cmk-update-agent.service: Succeeded.
cat /etc/systemd/system/timers.target.wants/cmk-update-agent.timer
[Unit]
Description=Periodic Checkmk agent update

[Timer]
OnCalendar=minutely

[Install]
WantedBy=timers.target

Bug still present in 2.1.0p26

May  9 06:54:00 node2 systemd: Started Checkmk agent updater.
May  9 06:55:00 node2 systemd: Started Checkmk agent updater.
May  9 06:56:00 node2 systemd: Started Checkmk agent updater.
May  9 06:57:00 node2 systemd: Started Checkmk agent updater.
May  9 06:58:01 node2 systemd: Started Checkmk agent updater.
May  9 06:58:14 node2 systemd: Started Checkmk agent (PID 266257/UID 995).
May  9 06:59:00 node2 systemd: Started Checkmk agent updater.

Will update to p27 this week, to see if it is fixed. But I doubt, as the “fix” should be done in so many werks ago…

we are on 2.2 but the agent still is checking every minute

/etc/systemd/system/timers.target.wants/cmk-update-agent.timer :
[Timer]
OnCalendar=minutely

What was the Werk #14733 fix ?

The timer unit only checks if there is a pending agent installation. It is not checking every minute against the CMK server.
The triggered unit only does a

ExecStart=-/usr/bin/cmk-update-agent install

If you don’t want this execution every minute then it should be no problem to change the timer.
But after the next agent update the default timer would be back.

The journal don’t show this executions on my machines.

I was debugging why the agent updater was not registered, a complex AWS situation with a satelite running on proxy etc. The problem is the lock on cmk-update-agent when it’s run, quite annoying …