fixing the runtime check
This commit is contained in:
@@ -8,7 +8,7 @@ GMETRIC=$(which gmetric)
|
||||
FILE="/var/log/puppet/puppetd_run.log"
|
||||
[[ -r $FILE ]] || exit 0
|
||||
## BSD and Linux have different stat commands
|
||||
VALUE=$(grep "Finished catalog run" ${FILE} |tail -1 |sed 's/.*in \(.*\) seconds/\1/'|awk '{print int($1)')
|
||||
VALUE=$(grep "Finished catalog run" ${FILE} |tail -1 |sed 's/.*in \(.*\) seconds/\1/'|awk '{print int($1)}')
|
||||
|
||||
GMETRIC="${GMETRIC} --dmax=30000 --tmax=350 --units=Seconds --type=int32"
|
||||
$GMETRIC --value=${VALUE} --name="Puppet runtime"
|
||||
|
||||
Reference in New Issue
Block a user