You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
LAST_UPDATE_TIMESTAMP=$(/usr/bin/yum -C --quiet --noplugins history| awk '{if(NR>2)print}'| grep ' U \|Upgrade'| cut -d '|' -f3 | head -n 1 | date -f - +"%s"||echo"-1")
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
The text was updated successfully, but these errors were encountered:
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.
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.
checkmk-agent-plugin-yum/agents/plugins/yum
Line 111 in 416c124
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
The text was updated successfully, but these errors were encountered: