Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

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

Changement de format des erreurs zabbix

parent 6f82ecdc
...@@ -57,7 +57,7 @@ irods_push(){ ...@@ -57,7 +57,7 @@ irods_push(){
if [[ $s -ne 0 ]]; then if [[ $s -ne 0 ]]; then
echo "[$KEY] Error 002 creating remote directory." echo "[$KEY] Error 002 creating remote directory."
format_report $KEY $SIZEMB $(date +%Y-%m-%dT%H:%M:%S) - - 'Error 010. imkdir failed' >> $LOCAL_REPORT 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 return 1
fi fi
...@@ -72,7 +72,7 @@ irods_push(){ ...@@ -72,7 +72,7 @@ irods_push(){
irods_rollback $KEY irods_rollback $KEY
rm $RESIFDD_WORKDIR/${KEY}.tar rm $RESIFDD_WORKDIR/${KEY}.tar
# Alert to zabbix # Alert to zabbix
zabbix_err "${KEY}:Error 011" zabbix_err "${KEY} Error 011"
else else
duration=$(($(date +%s)-$start)) duration=$(($(date +%s)-$start))
throughput=$(($SIZEMB / $duration )) throughput=$(($SIZEMB / $duration ))
...@@ -127,7 +127,7 @@ irods_commit(){ ...@@ -127,7 +127,7 @@ irods_commit(){
imv $KEY/previous.tar $KEY/previous_to_delete.tar imv $KEY/previous.tar $KEY/previous_to_delete.tar
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "[$KEY] Error 003 moving previous.tar around. Corrective action has to be taken manualy" 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 return 1
fi fi
) )
...@@ -137,7 +137,7 @@ irods_commit(){ ...@@ -137,7 +137,7 @@ irods_commit(){
imv $KEY/latest.tar $KEY/previous.tar imv $KEY/latest.tar $KEY/previous.tar
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "[$KEY] Error 004 moving latest.tar to previous.tar. Corrective action has to be taken manualy" 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 return 1
fi fi
) )
...@@ -145,7 +145,7 @@ irods_commit(){ ...@@ -145,7 +145,7 @@ irods_commit(){
imv $KEY/staging.tar $KEY/latest.tar imv $KEY/staging.tar $KEY/latest.tar
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "[$KEY] Error 005 moving statging.tar to latest.tar. Corrective action has to be taken manualy" 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 return 1
fi fi
ils $KEY/previous_to_delete.tar 2>/dev/null && irm -f $KEY/previous_to_delete.tar 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 ...@@ -293,7 +293,7 @@ if [[ "x$DUMP_METADATA" = "xyes" ]]; then
tar cf $RESIFDD_WORKDIR/$KEY.tar --exclude portalproducts -C $SNAPSHOT_DIR . tar cf $RESIFDD_WORKDIR/$KEY.tar --exclude portalproducts -C $SNAPSHOT_DIR .
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "[$KEY] Error 001 while creating tar archive." echo "[$KEY] Error 001 while creating tar archive."
zabbix_err "${KEY}:Error 001" zabbix_err "${KEY} Error 001"
exit 1 exit 1
fi fi
irods_push $KEY 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