DB down alert script?

SpyKey

New Member
Hey y'all!
Anyone by any chance has a Unix script (an outline will do) which would check whether a db is running, and if it is not the case would send an alert of some sort to an admin, like SMS or an e-mail?
Thanks much.
 
Here's some "bones" to examine.
You can vary the message based on the return value $?. (Different versions of UNIX/Progress give different results).
Code:
proutil [i]database[/i] -C busy > /dev/null 2>&1
if [ $? = 0 ]; then
  echo "Database [i]database [/i]is down" > alert.d
  mailx -s "DATABASE DOWN" [email="user@domain.com"][i]user@domain.com[/i][/email] < alert.d
fi
 

SpyKey

New Member
Thanks a bunch! And I guess just let a cron job run it from time time?


Norman Biggar said:
Here's some "bones" to examine.
You can vary the message based on the return value $?. (Different versions of UNIX/Progress give different results).
Code:
proutil [i]database[/i] -C busy > /dev/null 2>&1
if [ $? = 0 ]; then
  echo "Database [i]database [/i]is down" > alert.d
  mailx -s "DATABASE DOWN" [email="user@domain.com"][i]user@domain.com[/i][/email] < alert.d
fi
 

emichael

New Member
Here you go.
The unix file db.base has a list of db's you would like to check.

:awink: for DB in `cat db.base`
do
proutil $DB -C holder > /dev/null
if test $? != 16
then
echo $DB is down > /tmp/mail-message
mail name@email.co.za < /tmp/mail-message
fi
done



SpyKey said:
Hey y'all!
Anyone by any chance has a Unix script (an outline will do) which would check whether a db is running, and if it is not the case would send an alert of some sort to an admin, like SMS or an e-mail?
Thanks much.
 

drunkahol

New Member
Fathom?

Not to do a sales pitch on Progress' behalf, but doesn't the Fathom Management tool include this along with a multitude of other performance monitoring alerts?

It doesn't come free though, but it is a supported product with defined results rather than home written code :eek:

Cheers

Duncan
 
Top