checkmk-agent-plugin-yum icon indicating copy to clipboard operation
checkmk-agent-plugin-yum copied to clipboard

Add a check to assess the output of "needs-restarting" and note the parents of the dependencies

Open swampdogmash opened this issue 2 years ago • 1 comments

To further enhance the yum check, report back the number of process that have a dependency on an updated package, so it is more visible why the reboot is required. Make it an optional check as it could be quite lengthy and make it cover all the various flavours of centos/rhel.

This should be achievable using "needs-restarting" but will vary on it's use between OS flavour.

swampdogmash avatar Apr 02 '24 16:04 swampdogmash

needs-restarting is not installed by default on many systems. This would need to be a check to see if the command exists first, then run if available.

Running the command on several our our RHEL servers did result in a very long wait time, so this may not be faesible anyway, as it would either timeout or take too long to report back. Without any switches the "needs-restarting" command will search through all smaps for file descriptors - which could potentially take hours. https://serverfault.com/questions/1044448/needs-restarting-hangs-on-rhel7

using --reboothint might work ok to get a faster response but only a higher level overview to add to the reported service output

swampdogmash avatar Nov 14 '24 16:11 swampdogmash