blob: 924acccc3d1b3d7f7e5fff3812854574b1379fba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# -----------------------------------------------------------------------------
# make sure we collect values for each interface
template: interface_last_collected_secs
on: net.net
families: *
calc: $now - $last_collected_t
units: seconds ago
every: 10s
warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
delay: down 5m multiplier 1.5 max 1h
info: number of seconds since the last successful data collection
to: sysadmin
# -----------------------------------------------------------------------------
# dropped packets
# check if an interface is dropping packets
# the alarm is checked every 1 minute
# and examines the last 10 minutes of data
template: inbound_packets_dropped
on: net.drops
families: *
lookup: sum -10m unaligned absolute of inbound
units: packets
every: 1m
warn: $this > 0
delay: down 1h multiplier 1.5 max 2h
info: interface inbound dropped packets in the last 10 minutes
to: sysadmin
template: outbound_packets_dropped
on: net.drops
families: *
lookup: sum -10m unaligned absolute of outbound
units: packets
every: 1m
warn: $this > 0
delay: down 1h multiplier 1.5 max 2h
info: interface outbound dropped packets in the last 10 minutes
to: sysadmin
template: inbound_packets_dropped_ratio
on: net.packets
families: *
lookup: sum -10m unaligned absolute of received
calc: (($inbound_packets_dropped != nan AND $this > 0) ? ($inbound_packets_dropped * 100 / $this) : (0))
units: %
every: 1m
warn: $this > 0.5
crit: $this > 3
delay: down 1h multiplier 1.5 max 2h
info: the ratio of inbound dropped packets vs the total number of received packets of the network interface, during the last 10 minutes
to: sysadmin
template: outbound_packets_dropped_ratio
on: net.packets
families: *
lookup: sum -10m unaligned absolute of sent
calc: (($outbound_packets_dropped != nan AND $this > 0) ? ($outbound_packets_dropped * 100 / $this) : (0))
units: %
every: 1m
warn: $this > 0.5
crit: $this > 3
delay: down 1h multiplier 1.5 max 2h
info: the ratio of outbound dropped packets vs the total number of sent packets of the network interface, during the last 10 minutes
to: sysadmin
# -----------------------------------------------------------------------------
# FIFO errors
# check if an interface is having FIFO
# buffer errors
# the alarm is checked every 1 minute
# and examines the last 10 minutes of data
template: 10min_fifo_errors
on: net.fifo
families: *
lookup: sum -10m unaligned absolute
units: errors
every: 1m
warn: $this > 0
delay: down 1h multiplier 1.5 max 2h
info: interface fifo errors in the last 10 minutes
to: sysadmin
# -----------------------------------------------------------------------------
# check for packet storms
# 1. calculate the rate packets are received in 1m: 1m_received_packets_rate
# 2. do the same for the last 10s
# 3. raise an alarm if the later is 10x or 20x the first
# we assume the minimum packet storm should at least have
# 10000 packets/s, average of the last 10 seconds
template: 1m_received_packets_rate
on: net.packets
families: *
lookup: average -1m of received
units: packets
every: 10s
info: the average number of packets received during the last minute
template: 10s_received_packets_storm
on: net.packets
families: *
lookup: average -10s of received
calc: $this * 100 / (($1m_received_packets_rate < 1000)?(1000):($1m_received_packets_rate))
every: 10s
units: %
warn: $this > (($status >= $WARNING)?(200):(1000))
crit: $this > (($status >= $WARNING)?(1000):(2000))
info: the % of the rate of received packets in the last 10 seconds, compared to the rate of the last minute
to: silent
|