Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
aurelien.clavier
byaurelien.clavier, August 31, 2015
Thank you for this plugin ;)
I modify it in order to ignore DSM updates. It works perfectly.
These are the lines for add option -I to ignore DSM updates :
...
case $DSMUpgradeAvailable in
"1") DSMUpgradeAvailable="Available"; healthWarningStatus=1; updateMessage="DSM update available";;
"2") DSMUpgradeAvailable="Unavailable"; healthWarningStatus=0; updateMessage="Update unavailable";;
"3") DSMUpgradeAvailable="Connecting"; healthWarningStatus=0; updateMessage="Update in progress";;
"4") DSMUpgradeAvailable="Disconnected"; healthWarningStatus=1; updateMessage="DSM Update Disconnected";;
"5") DSMUpgradeAvailable="Others"; healthWarningStatus=1; updateMessage="Check DSM Update";;
esac
if [ "$ignoreUpdate" = "yes" ] ; then
healthWarningStatus=0;
healthString="$healthString, Info : $updateMessage";
else
healthString="$healthString, $updateMessage";
fi
...
and on the last lines, I modify the output for Ok status :
...
if [ "$healthCriticalStatus" = "0" ] && [ "$healthWarningStatus" = "0" ] ; then
echo "OK - $healthString Appliance is in good health"
exit 0
fi
...
I modify it in order to ignore DSM updates. It works perfectly.
These are the lines for add option -I to ignore DSM updates :
...
case $DSMUpgradeAvailable in
"1") DSMUpgradeAvailable="Available"; healthWarningStatus=1; updateMessage="DSM update available";;
"2") DSMUpgradeAvailable="Unavailable"; healthWarningStatus=0; updateMessage="Update unavailable";;
"3") DSMUpgradeAvailable="Connecting"; healthWarningStatus=0; updateMessage="Update in progress";;
"4") DSMUpgradeAvailable="Disconnected"; healthWarningStatus=1; updateMessage="DSM Update Disconnected";;
"5") DSMUpgradeAvailable="Others"; healthWarningStatus=1; updateMessage="Check DSM Update";;
esac
if [ "$ignoreUpdate" = "yes" ] ; then
healthWarningStatus=0;
healthString="$healthString, Info : $updateMessage";
else
healthString="$healthString, $updateMessage";
fi
...
and on the last lines, I modify the output for Ok status :
...
if [ "$healthCriticalStatus" = "0" ] && [ "$healthWarningStatus" = "0" ] ; then
echo "OK - $healthString Appliance is in good health"
exit 0
fi
...
Owner's reply
I added directy on the script! Thanks