Reply To: tbllookup within Alert

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf tbllookup within Alert Reply To: tbllookup within Alert

#59045
Greg Eriksen
Participant

    Hi Michael,

    The result of the command is:

    221418 -rw-r


      1 hci      staff           534 Jun 12 13:22 /quovadx/qdx5.4/integrator/clotest1/Tables/alertTrigger_emails.tbl

    I’m not sure how much we “own” the entire alertTrigger.tcl proc, but the section covering the customization we asked for is:

           #build final email list

    set final_email_list “”

           foreach email $emails {

       if {[string first “@” $email] >= 0} {

    #found “@” sign, this is an email address

    lappend final_email_list $email

       } else {

    #do table lookup and append each additional email address

    set table_emails [tbllookup /quovadx/qdx5.4/integrator/clotest1/Tables/alertTrigger_emails.tbl $email]

    foreach new_email [split $table_emails] {

       lappend final_email_list $new_email

    }

       }

    }

    The variable $emails is one of the parameters passed into the proc when it is called.  In this instance it contains 2 items, my email address and a lookup string “cbordList”.  Because the latter doesn’t contain the “@” sign, it is supposed to be used as the value for the table lookup.  From the hcitcl prompt, a lookup to the table with this string returns the 2 additional email addresses I expect.  I had inserted an echo statement after the else in the above and confirmed that the variable $email is getting set to “cbordList” prior to the lookup.  I’ve tried the path both with and without backslash escaping the forward slashes, and the original code didn’t have an absolute or relative path, just the table name.

    Your request for the command caused me to pay attention to the permissions on the table file, and I did notice that they were not the same for that table as the others in the directory.  I used chmod to make it match the others so that the output from your command is now:

    221418 -rw-rw-r–   1 hci      staff           534 Jun 12 13:22 /quovadx/qdx5.4/integrator/clotest1/Tables/alertTrigger_emails.tbl

    Then I killed and started the monitor daemon, recreated the conditions that cause the alert to trigger, but I still see the same “unable to load table” error in the log.  Is boucing the monitor daemon enough, or do I need to stop and start the entire engine process in order for it to be able to find the table?