node-exporter-textfile-collector-scripts icon indicating copy to clipboard operation
node-exporter-textfile-collector-scripts copied to clipboard

Improve node_reboot_required metric

Open debian777 opened this issue 1 year ago • 1 comments

https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/blob/a2b43e19be1e64c31b626ca827506977cac93488/apt_info.py#L112C31-L112C51

in Ubuntu,, script https://git.launchpad.net/ubuntu/+source/update-notifier/tree/data/update-motd-reboot-required#n6 not only tests if file exist but also examines content of this file.

The difference is that with live kernel patching, file exist but remains empty. This does not trigger *** System restart required *** message.

debian777 avatar Dec 05 '24 12:12 debian777

So, checking for a non-zero file size (if the file exists) would be a suitable test?

dswarbrick avatar Dec 05 '24 20:12 dswarbrick