Commit 1341bab6 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer

Changement de format des erreurs zabbix

parent 6f82ecdc
......@@ -57,7 +57,7 @@ irods_push(){
if [[ $s -ne 0 ]]; then
echo "[$KEY] Error 002 creating remote directory."
format_report $KEY $SIZEMB $(date +%Y-%m-%dT%H:%M:%S) - - 'Error 010. imkdir failed' >> $LOCAL_REPORT
zabbix_err "${KEY}:Error 002"
zabbix_err "${KEY} Error 002"
return 1
fi
......@@ -72,7 +72,7 @@ irods_push(){
irods_rollback $KEY
rm $RESIFDD_WORKDIR/${KEY}.tar
# Alert to zabbix
zabbix_err "${KEY}:Error 011"
zabbix_err "${KEY} Error 011"
else
duration=$(($(date +%s)-$start))
throughput=$(($SIZEMB / $duration ))
......@@ -127,7 +127,7 @@ irods_commit(){
imv $KEY/previous.tar $KEY/previous_to_delete.tar
if [[ $? -ne 0 ]]; then
echo "[$KEY] Error 003 moving previous.tar around. Corrective action has to be taken manualy"
zabbix_err "${KEY}:Error 003"
zabbix_err "${KEY} Error 003"
return 1
fi
)
......@@ -137,7 +137,7 @@ irods_commit(){
imv $KEY/latest.tar $KEY/previous.tar
if [[ $? -ne 0 ]]; then
echo "[$KEY] Error 004 moving latest.tar to previous.tar. Corrective action has to be taken manualy"
zabbix_err "${KEY}:Error 004"
zabbix_err "${KEY} Error 004"
return 1
fi
)
......@@ -145,7 +145,7 @@ irods_commit(){
imv $KEY/staging.tar $KEY/latest.tar
if [[ $? -ne 0 ]]; then
echo "[$KEY] Error 005 moving statging.tar to latest.tar. Corrective action has to be taken manualy"
zabbix_err "${KEY}:Error 005"
zabbix_err "${KEY} Error 005"
return 1
fi
ils $KEY/previous_to_delete.tar 2>/dev/null && irm -f $KEY/previous_to_delete.tar
......@@ -293,7 +293,7 @@ if [[ "x$DUMP_METADATA" = "xyes" ]]; then
tar cf $RESIFDD_WORKDIR/$KEY.tar --exclude portalproducts -C $SNAPSHOT_DIR .
if [[ $? -ne 0 ]]; then
echo "[$KEY] Error 001 while creating tar archive."
zabbix_err "${KEY}:Error 001"
zabbix_err "${KEY} Error 001"
exit 1
fi
irods_push $KEY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment