Sergei G.
06/21/2023, 5:56 PMbastelfreak
06/21/2023, 5:57 PMSergei G.
06/21/2023, 6:04 PMkenyon
06/21/2023, 6:05 PMkenyon
06/21/2023, 6:07 PMkenyon
06/21/2023, 6:08 PMYury Bushmelev
06/21/2023, 6:19 PMSlackbot
06/21/2023, 6:38 PMSergei G.
06/21/2023, 6:57 PMbastelfreak
06/21/2023, 6:58 PMSlackbot
06/21/2023, 7:34 PMSlackbot
06/21/2023, 8:07 PMSlackbot
06/22/2023, 9:54 AMSlackbot
06/22/2023, 10:44 AMSlackbot
06/22/2023, 4:24 PMKen
06/22/2023, 4:29 PMYury Bushmelev
06/22/2023, 4:36 PMLumiere
06/22/2023, 5:01 PMLumiere
06/22/2023, 5:02 PMDavid Sandilands
06/22/2023, 5:39 PMDr Bunsen Honeydew
06/22/2023, 5:45 PMOleksandr Lytvyn
06/23/2023, 10:02 AMpuppet agent --disable "Reason XYZ"
For case when agent is disabled we've previously used "Monit" (service was running from root) which was checking last modification timestamp of the file /opt/puppetlabs/puppet/cache/state/last_run_report.yaml
/etc/monit$ cat conf-enabled/puppetagent.monit
### THIS FILE IS MANAGED BY PUPPET. ANY MANUAL CHANGES WILL GET OVERWRITTEN.
check file last_puppet_run with path /opt/puppetlabs/puppet/cache/state/last_run_report.yaml
if mtime older than 1440 minutes then exec "/etc/monit/conf-enabled/slack_bad.sh"
We tried to try to replicate what Monit was doing in Zabbix and Prometheus node exporter, but because of the permissions of this file Zabbix and Prometheus node exporter are not able to check timestamp of this file
ls -l /opt/puppetlabs/puppet/cache/state/last_run_report.yaml
-rw-r----- 1 root root 284420 Jun 23 09:46 /opt/puppetlabs/puppet/cache/state/last_run_report.yaml
What is the proper way to cover use case when agent is disabled?
ThanksMarkus Zilch
06/23/2023, 10:06 AMMarkus Zilch
06/23/2023, 10:06 AMbastelfreak
06/23/2023, 10:06 AMbastelfreak
06/23/2023, 10:07 AMbastelfreak
06/23/2023, 10:08 AMOleksandr Lytvyn
06/23/2023, 10:21 AMYury Bushmelev
06/23/2023, 11:45 AMMarty Ewings
06/23/2023, 11:56 AM