]> arthur.barton.de Git - netdata.git/blob - conf.d/health.d/net.conf
Merge pull request #1239 from ktsaou/master
[netdata.git] / conf.d / health.d / net.conf
1 # -----------------------------------------------------------------------------
2 # make sure we collect values for each interface
3
4 template: interface_last_collected_secs
5       on: net.net
6     calc: $now - $last_collected_t
7    units: seconds ago
8    every: 10s
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
13       to: sysadmin
14
15
16 # -----------------------------------------------------------------------------
17 # dropped packets
18
19 # check if an interface is dropping packets
20 # the alarm is checked every 1 minute
21 # and examines the last hour of data
22
23 template: 1hour_packet_drops_inbound
24       on: net.drops
25   lookup: sum -1h unaligned absolute of inbound
26    units: packets
27    every: 1m
28     warn: $this > 0
29    delay: down 30m multiplier 1.5 max 1h
30     info: interface inbound dropped packets in the last hour
31       to: sysadmin
32
33 template: 1hour_packet_drops_outbound
34       on: net.drops
35   lookup: sum -1h unaligned absolute of outbound
36    units: packets
37    every: 1m
38     warn: $this > 0
39    delay: down 30m multiplier 1.5 max 1h
40     info: interface outbound dropped packets in the last hour
41       to: sysadmin
42
43 template: 1hour_packet_drops_ratio_inbound
44       on: net.packets
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))
47    units: %
48    every: 1m
49     warn: $this > 0.5
50     crit: $this > 3
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
53       to: sysadmin
54
55 template: 1hour_packet_drops_ratio_outbound
56       on: net.packets
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))
59    units: %
60    every: 1m
61     warn: $this > 0.5
62     crit: $this > 3
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
65       to: sysadmin
66
67
68 # -----------------------------------------------------------------------------
69 # FIFO errors
70
71 # check if an interface is having FIFO
72 # buffer errors
73 # the alarm is checked every 1 minute
74 # and examines the last hour of data
75
76 template: 1hour_fifo_errors
77       on: net.fifo
78   lookup: sum -1h unaligned absolute
79    units: errors
80    every: 1m
81     warn: $this > 0
82    delay: down 30m multiplier 1.5 max 1h
83     info: interface fifo errors in the last hour
84       to: sysadmin
85
86
87 # -----------------------------------------------------------------------------
88 # check for packet storms
89
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
95
96 template: 1m_received_packets_rate
97       on: net.packets
98   lookup: average -1m of received
99    units: packets
100    every: 10s
101     info: the average number of packets received during the last minute
102
103 template: 10s_received_packets_storm
104       on: net.packets
105   lookup: average -10s of received
106     calc: $this * 100 / (($1m_received_packets_rate < 1000)?(1000):($1m_received_packets_rate))
107    every: 10s
108    units: %
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
112      to: silent
113