[INUG-Users] Automations in 7.2.1

Don Wildman WILDMAN at uk.ibm.com
Tue Apr 14 11:59:46 EDT 2009


Hi James,

The statement from your email below is close
begin
for each row intruder in alerts.status where Summary like 'has been locked 
because of too many intruder attempts' and Tally > 4
        begin
                 execute 
Intruder_Lockout_Notification_Email(intruder.EventDetail);
        end;
end

It is missing the intruder. prefix on the where clause fields.  Try:-

begin
for each row intruder in alerts.status where intruder.Summary like 'has 
been locked because of too many intruder attempts' and intruder.Tally > 4
        begin
                 execute 
Intruder_Lockout_Notification_Email(intruder.EventDetail);
        end;
end

More efficient, check Tally first:-

begin
for each row intruder in alerts.status where intruder.Tally > 4 and 
intruder.Summary like 'has been locked because of too many intruder 
attempts'
        begin
                 execute 
Intruder_Lockout_Notification_Email(intruder.EventDetail);
        end;
end

By placing the integer test first, the more costly string match will only 
execute on the subset of events whose Tally is greater than 4.

You may want to ensure that the procedure is only executed once for each 
event in which case add an indicator field which I will call NotifiedFlag 
to be set to 1 when the email procedure has been executed:-


begin
for each row intruder in alerts.status where intruder.NotifiedFlag < 1 and 
intruder.Tally > 4 and intruder.Summary like 'has been locked because of 
too many intruder attempts'
        begin
                 execute 
Intruder_Lockout_Notification_Email(intruder.EventDetail);
          set intruder.NotifiedFlag = 1;
-- Note here that you do not need an update statement, use of set in this 
context will update the current row in alerts.status
        end;
end


-hth-
Don Wildman 
World Wide Product Manager ** Event Management ** +44 207 021 8144

Please use these links for Product Questions -- 

 IBM Tivoli OMNIbus & Network Manager 
 IBM Technical Forum 

 Internal - Network and Event Management Wiki 
 Internal - Consolidated Operations Wiki 
 Internal - Omnitech Forum 

 

users-bounces at netcoolusers.org wrote on 13/04/2009 20:01:42:

> [image removed] 
> 
> Re: [INUG-Users] Automations in 7.2.1
> 
> James Pifer 
> 
> to:
> 
> users
> 
> 13/04/2009 19:06
> 
> Sent by:
> 
> users-bounces at netcoolusers.org
> 
> Please respond to users
> 
> On Mon, 2009-04-13 at 13:06 -0400, chick.wells at wachovia.com wrote:
> > Procedure: MyScript
> > params: in summary Char(255)
> > exec /opt/netcool/omnibus/utils/myscript.sh
> > arg '\''+Summary+'\''
> > host: guess
> > uid: choose gid: choose
> > 
> > Auto (Temporal): Intrudy
> > settings: choose
> > when: blank
> > eval: blank
> > action:
> > 
> > begin
> > for each row poo in alerts.status where Summary like 
> > 'has been locked because of too many intruder attempts' and 
> > Tally > 4
> >         begin
> >         execute myscript(poo.Summary);
> >         delete from alerts.status via poo.Identifier;
> >         end;
> > end
> > 
> > 
> > PS set a keyfield for these events and switch it to = from like 
'...too 
> > many..'
> > 
> > 
> > 
> 
> So I have a procedure called Intruder_Lockout_Notification_Email that
> takes one parameter called EventDetail. I have the following under
> Action in my temporal trigger:
> 
> begin
> for each row intruder in alerts.status where Summary like 'has been 
locked 
> because of too many intruder attempts' and Tally > 4
>         begin
>    execute Intruder_Lockout_Notification_Email(intruder.EventDetail);
>         end;
> end
> 
> I get the following error:
> 
> ERROR=Object not found on line 2 of statement 'CHECK STATEMENT' create
> or replace trigger lntruder_Lockout_Notification group MyGroup debug
> false enabled false priority 1 comment \'\' every 1 minutes begin...',
> at or near 'Summary'
> 
> Anyone see the problem?
> 
> Thanks,
> James
> 
> 
> 
> _______________________________________________
> Sent by the netcoolusers.org "users" mailing list
> Post: users at netcoolusers.org
> Unsubscribe: users-unsubscribe at netcoolusers.org
> Search: http://netcoolusers.org/Search






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 749 bytes
Desc: not available
URL: <http://lists.netcoolusers.org/archives/users/attachments/20090414/0b20a548/attachment.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1027 bytes
Desc: not available
URL: <http://lists.netcoolusers.org/archives/users/attachments/20090414/0b20a548/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 749 bytes
Desc: not available
URL: <http://lists.netcoolusers.org/archives/users/attachments/20090414/0b20a548/attachment-0001.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 749 bytes
Desc: not available
URL: <http://lists.netcoolusers.org/archives/users/attachments/20090414/0b20a548/attachment-0002.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1027 bytes
Desc: not available
URL: <http://lists.netcoolusers.org/archives/users/attachments/20090414/0b20a548/attachment-0001.gif>


More information about the Users mailing list