Adjust monitoring check for Puppet runs for Puppet master 4.x
/var/lib/puppet/yaml/node/*.yaml
don’t contain any “expiration” line
anymore, so this code:
EXPIRATION=$(grep -m1 expiration ${YAMLPATH}/$node.yaml | awk '{printf("%s %s", $2, $3);}')
typeset -i CHECKIN=$(date +"%s" -d "${EXPIRATION}")
DIFFERENCE=$((${NOW} - ${CHECKIN}))
… will set EXPIRATION=
and then date +"%s" -d ""
means “today at
00:00:00” so DIFFERENCE
will always be less than 24 hours => this
check will always pass regardless of the status of agent runs.
Parent Task: #11834 (closed)
Related issues
- Blocks #13284
Original created by @intrigeri on 15493 (Redmine)