diff --git a/cloudbackup_mon.sh b/cloudbackup_mon.sh old mode 100755 new mode 100644 index 1a65be4..39f3860 --- a/cloudbackup_mon.sh +++ b/cloudbackup_mon.sh @@ -1,6 +1,3 @@ -#!/usr/bin/env bash -# -# cloudbackup_mon.sh # Rackspace Cloud Monitoring Plugin to help detect if there are # problems with Cloud Backups. # @@ -54,9 +51,6 @@ # if (metric['agent_running'] == 0) { # return new AlarmStatus(CRITICAL, 'Agent is not running.'); # } -# -# return new AlarmStatus(OK, 'Cloud Backups Successful.'); - function help { cat < $tmpfile + curl -s -H "X-Auth-Token: $token" https://$api_hostname/v1.0/$ddi/backup/report/$backup_id | python -m json.tool > $tmpfile conf_id=`grep BackupConfigurationId < $tmpfile | sed -e 's/"BackupConfigurationId": //g' -e 's/,//g' -e 's/[ \t]*//g'` if [ "X$this_backup_conf_id" != "X" -a "X$conf_id" != "X$this_backup_conf_id" ]; then