1 # -----------------------------------------------------------------------------
2 # make sure we collect values for each interface
4 template: interface_last_collected_secs
6 calc: $now - $last_collected_t
9 warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
10 crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
11 delay: down 5m multiplier 1.5 max 1h
12 info: number of seconds since the last successful data collection
16 # -----------------------------------------------------------------------------
19 # check if an interface is dropping packets
20 # the alarm is checked every 1 minute
21 # and examines the last hour of data
23 template: 1hour_packet_drops
25 lookup: sum -1h unaligned absolute
29 delay: down 30m multiplier 1.5 max 1h
30 info: interface dropped packets in the last hour
34 # -----------------------------------------------------------------------------
37 # check if an interface is having FIFO
39 # the alarm is checked every 1 minute
40 # and examines the last hour of data
42 template: 1hour_fifo_errors
44 lookup: sum -1h unaligned absolute
48 delay: down 30m multiplier 1.5 max 1h
49 info: interface fifo errors in the last hour
53 # -----------------------------------------------------------------------------
54 # check for packet storms
56 # 1. calculate the rate packets are received in 1m: 1m_received_packets_rate
57 # 2. do the same for the last 10s
58 # 3. raise an alarm if the later is 10x or 20x the first
59 # we assume the minimum packet storm should at least have
60 # 10000 packets/s, average of the last 10 seconds
62 template: 1m_received_packets_rate
64 lookup: average -1m of received
67 info: the average number of packets received during the last minute
69 template: 10s_received_packets_storm
71 lookup: average -10s of received
72 calc: $this * 100 / (($1m_received_packets_rate < 1000)?(1000):($1m_received_packets_rate))
75 warn: $this > (($status >= $WARNING)?(200):(1000))
76 crit: $this > (($status >= $WARNING)?(1000):(2000))
77 info: the % of the rate of received packets in the last 10 seconds, compared to the rate of the last minute