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_inbound
25 lookup: sum -1h unaligned absolute of inbound
29 delay: down 30m multiplier 1.5 max 1h
30 info: interface inbound dropped packets in the last hour
33 template: 1hour_packet_drops_outbound
35 lookup: sum -1h unaligned absolute of outbound
39 delay: down 30m multiplier 1.5 max 1h
40 info: interface outbound dropped packets in the last hour
43 template: 1hour_packet_drops_ratio_inbound
45 lookup: sum -1h unaligned absolute of received
46 calc: (($1hour_packet_drops_inbound != nan AND $this > 0) ? ($1hour_packet_drops_inbound * 100 / $this) : (0))
51 delay: down 30m multiplier 1.5 max 1h
52 info: the ratio of inbound dropped packets vs the total number of received packets of the network interface, during the last hour
55 template: 1hour_packet_drops_ratio_outbound
57 lookup: sum -1h unaligned absolute of sent
58 calc: (($1hour_packet_drops_outbound != nan AND $this > 0) ? ($1hour_packet_drops_outbound * 100 / $this) : (0))
63 delay: down 30m multiplier 1.5 max 1h
64 info: the ratio of outbound dropped packets vs the total number of sent packets of the network interface, during the last hour
68 # -----------------------------------------------------------------------------
71 # check if an interface is having FIFO
73 # the alarm is checked every 1 minute
74 # and examines the last hour of data
76 template: 1hour_fifo_errors
78 lookup: sum -1h unaligned absolute
82 delay: down 30m multiplier 1.5 max 1h
83 info: interface fifo errors in the last hour
87 # -----------------------------------------------------------------------------
88 # check for packet storms
90 # 1. calculate the rate packets are received in 1m: 1m_received_packets_rate
91 # 2. do the same for the last 10s
92 # 3. raise an alarm if the later is 10x or 20x the first
93 # we assume the minimum packet storm should at least have
94 # 10000 packets/s, average of the last 10 seconds
96 template: 1m_received_packets_rate
98 lookup: average -1m of received
101 info: the average number of packets received during the last minute
103 template: 10s_received_packets_storm
105 lookup: average -10s of received
106 calc: $this * 100 / (($1m_received_packets_rate < 1000)?(1000):($1m_received_packets_rate))
109 warn: $this > (($status >= $WARNING)?(200):(1000))
110 crit: $this > (($status >= $WARNING)?(1000):(2000))
111 info: the % of the rate of received packets in the last 10 seconds, compared to the rate of the last minute