Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CSD
public
zabbix-templates
Commits
7b143c49
Commit
7b143c49
authored
Feb 28, 2018
by
Fulvio Galeazzi
Browse files
2018-02-28: FG; Forgot to output value when exiting.
parent
e5211790
Changes
1
Hide whitespace changes
Inline
Side-by-side
Dell_MD38XX/Script/zbxDellStorageDeviceStatus.sh
View file @
7b143c49
...
...
@@ -19,7 +19,7 @@ version="0.1"
getopt
--test
>
/dev/null
if
[[
$?
!=
4
]]
;
then
echo
"
`
getopt
--test
`
failed in this environment."
exit
1
exit
1
1
fi
# Help function
...
...
@@ -135,7 +135,7 @@ WANTOBJECTS="Storage,RAID,Disk"
SHORT
=
vhep:m:r:w:i:z:s:q:c:k:dt
LONG
=
version,help,check,path:,match:,raid:,want:,interval:,zabbixserver:,sender:,zabbixport:,zabbixsource:,timeout:,config:,debug,dumpconfig,test
PARSED
=
`
getopt
--options
$SHORT
--longoptions
$LONG
--name
"
$0
"
--
"
$@
"
`
if
[
$?
!=
0
]
;
then
echo
"Terminating..."
>
&2
;
exit
1
;
fi
if
[
$?
!=
0
]
;
then
echo
"Terminating..."
>
&2
;
exit
1
0
;
fi
eval set
--
"
$PARSED
"
while
true
;
do
...
...
@@ -267,6 +267,7 @@ if [[ -z "$RAIDCTRLLIST" ]]; then
rm
$KNOWNARRAYS
else
echo
"
\"
$ZABBIXSOURCE
\"
\"
custom.dellmd38xx.device.failed[
${
raidNameThis
}
]
\"
2"
>>
$SENDERFILE
echo
2
fi
raidList
=
"
$raidCtrlThis
"
else
...
...
@@ -325,6 +326,7 @@ if [[ $RET_VAL = 0 ]]; then
done
<
$STATUSFILE
else
echo
"
\"
$ZABBIXSOURCE
\"
\"
custom.dellmd38xx.device.failed[
${
raidNameThis
}
]
\"
1"
>>
$SENDERFILE
echo
1
fi
# Send all information to Zabbix using zbbix_sender
...
...
@@ -385,3 +387,5 @@ rm -f $SENDERFILE
if
[[
-n
$tmpCONFIGFILE
]]
;
then
rm
-f
$CONFIGFILE
fi
echo
0
Write
Preview
Markdown
is supported
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