Fix perms on queue_stats

collect_rabbitmq_stats.sh creates
/var/lib/rabbitmq/data/{}_queue_stats.dat with 600 perms which
cannot be read by the monitoring user. This bug was introduced by
a8f7dea1 which uses mktemp which creates the file with restricted
permissions.

Change-Id: Idf3022bf925dd02b4bb6c979980ec1c6211b6923
Closes-Bug: #1730604
This commit is contained in:
Liam Young 2018-01-02 13:42:46 +00:00
parent 039e22feb9
commit 0024aefd13
1 changed files with 1 additions and 0 deletions

View File

@ -51,5 +51,6 @@ while read VHOST; do
awk "{print \"$VHOST \" \$0 \" $(date +'%s') \"}" >> ${TMP_DATA_FILE} 2>${LOG_DIR}/list_queues.log
done
mv ${TMP_DATA_FILE} ${DATA_FILE}
chmod 644 ${DATA_FILE}
echo "mnesia_size: ${MNESIA_DB_SIZE}@$NOW" > $RABBIT_STATS_DATA_FILE
echo "rss_size: ${RABBIT_RSS}@$NOW" >> $RABBIT_STATS_DATA_FILE