Created
October 27, 2016 18:51
-
-
Save Samgarr/1e957034abbb6d8b39f7710bdf8a5e83 to your computer and use it in GitHub Desktop.
Monitoring debian security updates with Prometheus Textfile collector. Don't forget run node_exporter with appropriate parameters!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://www.robustperception.io/monitoring-directory-sizes-with-the-textfile-collector/ | |
33 * * * * unattended-upgrade --dry-run -d 2> /dev/null | grep 'Checking' | wc -l | sed -ne 's/^\([0-9]\+\).*$/security_updates_count \1/p' > /var/lib/node_exporter/textfile_collector/security_updates_count.prom.$$ && mv /var/lib/node_exporter/textfile_collector/security_updates_count.prom.$$ /var/lib/node_exporter/textfile_collector/security_updates_count.prom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment