Skip to content

Instantly share code, notes, and snippets.

@jshufro

jshufro/how.md Secret

Last active May 24, 2023 10:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jshufro/81583eb08417731d0a2044f7f80622a5 to your computer and use it in GitHub Desktop.
Save jshufro/81583eb08417731d0a2044f7f80622a5 to your computer and use it in GitHub Desktop.
Clearing Reboot-Required Metric After Reboots

Background

Rocket Pool's Grafana dashboard only checks if a reboot is required after it installs updates to the system. This means that after you reboot, until the next automatic update or next manual sudo apt update or sudo apt upgrade, the dashboard will still show that a reboot is required. To resolve this, we can simply update root's crontab

Process

Run sudo crontab -e

At the end of the file it opens in your editor of choice, add

@reboot /usr/share/apt-metrics.sh | sponge /var/lib/node_exporter/textfile_collector/apt.prom

Save and exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment