Can you provide me with an example of how to dump the messages out of the error database via TCL?
Here’s a screenshot of the alert. The alert action is:
exec {/quovadx/qdx5.7/integrator/scripts/errordb_alert.sh live1 “%A” david_barr@valleymed.org,zzzzz@valleymed.org “%F”}
errordb_alert.sh:
#! /bin/ksh
setroot
setsite $1
hcitcl /quovadx/qdx5.7/integrator/scripts/errordb_alert.tcl -a “$2” -e $3 -f “$4
errordb_alert.tcl:
#! /quovadx/qdx5.7/integrator/bin/hcitcl
#
#
#
###########################
proc main { argc argv } {
set optargs [list {a 1 alert} {e 1 email} {f 1 filename}]
catch {set args [getopt $argv $optargs]} err
#echo ALERT:$alert
#echo FILENAME:$filename
#set thread [lindex [split $alert ” “] 4]
set thread unknown
set tlist [split $alert “{”]
for { set i 1 } { $i threadm count] } {
if { $count > 0 } {
set thread $threadm
}
}
}
#echo $thread
set subj “Error Message from PWIM – [clock format [clock seconds] -format “%
D %R %p”] $alert”
foreach flag { o f d } {
catch {exec yes | hcidbdump -e -L -c -D -$flag $thread | fold} dump
if {[llength [split $dump n]] > 6} {
write_file $filename $dump
catch {[exec mailx -s $subj $email <$filename]} emailerr
}
}
}
main $argc $argv