Closed GasCan1234 closed 1 year ago
Thanks - could you please create a pull request to ease getting your fixes into upstream?
Instead of @GasCan1234 I created an pull request. It would be nice if you could fix it upstream and release an updated version on https://exchange.checkmk.com.
Uploaded v2.4.1 to https://exchange.checkmk.com.
Hi,
we have a machine, there the check does not recognize the last date of the update run.
The check checks for "U" and "Upgrade" but from my point of view it should also check for "Update". Because if he makes only updates in the last runs, there is not U or Upgrade recorded, see the listing from the server.
https://github.com/HenriWahl/checkmk-agent-plugin-yum/blob/416c1243326b6758829fec0dcda4c228c0d465e6/agents/plugins/yum#L111
I have now changed the line to:
LAST_UPDATE_TIMESTAMP=$(/usr/bin/yum -C --quiet --noplugins history | awk '{if(NR>2)print}' | grep ' U \|Upgrade\|Update' | cut -d '|' -f3 | head -n 1 | date -f - +"%s" || echo "-1")
Maybe you would like to take over this as well.
Another problem we still had and I also overwrote with us is that the check is only executed with "--noplugins". If you use Spacewalk like we do and maintain your own repositories, the check doesn't find any packages or not all that should be updated. Is there a reason to check this way?
Thank you