PDA

View Full Version : Experssion for triggers


sauron
02-03-2005, 05:24
Hello i'm setting ifInOctets1 & ifOutOctets1 with custom multiplier 8 and units Bps and delta (speed per seconds) Yes i'm need monitor speed on interface ;) How write expression for trigger enable on ifOutOctets1 delta up to 5Mbps ?

cooper
02-03-2005, 12:24
The easiest way would be to store the delta of ifInOctets1 instead of the real value. This is done on the item configuration screen. The option "Store Value". It defaults to 'As is', you would need to change it to 'Delta'

Then all you need to do is:
server.your.net:ifInOctets1.last(0)}>5000000

That would check the last value comited to the database and alarm if it is greater than 5Mb.

HTH

cooper

sauron
02-03-2005, 14:16
No-no i'm need Mbs ;)

sauron
03-03-2005, 15:38
The easiest way would be to store the delta of ifInOctets1 instead of the real value. This is done on the item configuration screen. The option "Store Value". It defaults to 'As is', you would need to change it to 'Delta'

I'm can do this. But in history tables it's saves as right i'e 1500000 eq 1.5 Mbps
Why i'm can't got real value by function ?


Then all you need to do is:
server.your.net:ifInOctets1.last(0)}>5000000

Very well why i'm need got dublicate values from 48 port used only by triggers ? It's uselless.


That would check the last value comited to the database and alarm if it is greater than 5Mb.

See below. This uselless. If i'm planning use this for one port this realy cool. But for 48 ports this nightmare :cool:

cooper
04-03-2005, 16:50
Hard linked trigger templates are just around the corner. That should help some with getting it to all you hosts.

cooper

sauron
04-03-2005, 17:04
Hmm... I'm thinking creating small patch for example

{HOSTNAME}:last(0) return 12Mbps

and

{HOSTNAME}:last(0,n) return 12000000

What do you think ?

sauron
09-03-2005, 05:12
Hey what you calculate functions for alerts text body and functions in triggers separate ? On more research code i'm finding expression in triggers calculate at native value. Thanks you for i'm creating useless code.