Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
datadump
Commits
1341bab6
Commit
1341bab6
authored
Aug 20, 2019
by
Jonathan Schaeffer
Browse files
Changement de format des erreurs zabbix
parent
6f82ecdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/resifdatadump
View file @
1341bab6
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment