Rather than figure out all the possible conditions, I just scripted for the ones I cared about and warned on the rest:
for STATUS in `tsm_run_command_as_admin $INSTANCE -tab "select status from events where domain_name like upper('${PREFIX}%') and scheduled_start>'${yesterday} 09:00' and scheduled_start<'${today} 09:00'"`; do if [[ "$STATUS" == Failed* ]]; then NODESFAILED="YES" elif [ "$STATUS" = "Missed" ]; then NODESMISSED="YES" # Some unknown exception will produce a "WARNING" elif [ ! "$STATUS" = "Completed" ] && [ ! "$STATUS" = "In Progress" ] && [ ! "$STATUS" = "Started" ] && [ ! "$STATUS" = "Pending" ]; then EXCEPTIONFOUND="YES" fi done … if [ "$NODESFAILED" = "YES" ]; then SUBJECT="[TSMCLIENT] NODES FAILED: $LABEL Daily Report" elif [ "$NODESMISSED" = "YES" ]; then SUBJECT="[TSMCLIENT] NODES MISSED: $LABEL Daily Report" elif [ "$EXCEPTIONFOUND" = "YES" ]; then SUBJECT="[TSMCLIENT] WARNING: $LABEL Daily Report" else SUBJECT="[TSMCLIENT] $LABEL Daily Report" fi Hopefully the variable names are obvious. Might have been better with `case`, but this works. -- Cameron Hanover chano...@umich.edu "A computer once beat me at chess, but it was no match for me at kick boxing." --Emo Philips > On Apr 8, 2015, at 2:55 PM, Lee, Gary <g...@bsu.edu> wrote: > > Is there a list somewhere of the possible values for different columns in the > tsm database? > > What I am particularly looking for are all the possible values of the status > column in the events table. > > Writing a script to notify backup schedules which have gone amiss. > > Don't care about restarted, in progress, etc. just error conditions. > > Thanks for any pointers.