-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup-daily-reports.sh
executable file
·20 lines (17 loc) · 1.11 KB
/
setup-daily-reports.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
QPROFILEPATH=$(ls -1ra ~/.*profile* | tail -1)
python3 app.py --op verify_config
RESULT=$?
if [ $RESULT -ne 0 ] ; then
echo "********** config.json verification failed! **********"
echo "Check your installation, settings and/or fix the config.json file and run this script again."
exit 1
fi
python3 app.py --op api_pull --api-data iops_by_path
python3 app.py --op api_pull --api-data {dashstats,cluster_status,capacity_by_path}
python3 app.py --op aggregate_data
# Pull IOPS data from the qumulo cluster once per minute
(crontab -l ; echo "* * * * * . $QPROFILEPATH; cd $PWD; python3 app.py --op api_pull --api-data iops_by_path >> cron-api-data-1-minute.log 2>&1")| crontab -
# Pull capacity and activity data from the qumulo every six hours
(crontab -l ; echo "1 */6 * * * . $QPROFILEPATH; cd $PWD; python3 app.py --op api_pull --api-data {dashstats,cluster_status,capacity_by_path} >> cron-api-data-6-hour.log 2>&1")| crontab -
# Aggregate Qumulo csv data every six hours
(crontab -l ; echo "31 */6 * * * . $QPROFILEPATH; cd $PWD; python3 app.py --op aggregate_data >> cron-api-aggregate-data.log 2>&1")| crontab -