net.conf 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. # you can disable an alarm notification by setting the 'to' line to: silent
  2. # -----------------------------------------------------------------------------
  3. # net traffic overflow
  4. template: interface_speed
  5. on: net.net
  6. class: Latency
  7. type: System
  8. component: Network
  9. os: *
  10. hosts: *
  11. calc: ( $nic_speed_max > 0 ) ? ( $nic_speed_max / 1000) : ( nan )
  12. units: Mbit
  13. every: 10s
  14. info: Network interface ${label:device} current speed
  15. template: 1m_received_traffic_overflow
  16. on: net.net
  17. class: Workload
  18. type: System
  19. component: Network
  20. os: linux
  21. hosts: *
  22. lookup: average -1m unaligned absolute of received
  23. calc: ($interface_speed > 0) ? ($this * 100 / ($interface_speed * 1000)) : ( nan )
  24. units: %
  25. every: 10s
  26. warn: $this > (($status >= $WARNING) ? (85) : (90))
  27. delay: up 1m down 1m multiplier 1.5 max 1h
  28. summary: System network interface ${label:device} inbound utilization
  29. info: Average inbound utilization for the network interface ${label:device} over the last minute
  30. to: silent
  31. template: 1m_sent_traffic_overflow
  32. on: net.net
  33. class: Workload
  34. type: System
  35. component: Network
  36. os: linux
  37. hosts: *
  38. lookup: average -1m unaligned absolute of sent
  39. calc: ($interface_speed > 0) ? ($this * 100 / ($interface_speed * 1000)) : ( nan )
  40. units: %
  41. every: 10s
  42. warn: $this > (($status >= $WARNING) ? (85) : (90))
  43. delay: up 1m down 1m multiplier 1.5 max 1h
  44. summary: System network interface ${label:device} outbound utilization
  45. info: Average outbound utilization for the network interface ${label:device} over the last minute
  46. to: silent
  47. # -----------------------------------------------------------------------------
  48. # dropped packets
  49. # check if an interface is dropping packets
  50. # the alarm is checked every 1 minute
  51. # and examines the last 10 minutes of data
  52. #
  53. # it is possible to have expected packet drops on an interface for some network configurations
  54. # look at the Monitoring Network Interfaces section in the proc.plugin documentation for more information
  55. template: net_interface_inbound_packets
  56. on: net.packets
  57. class: Workload
  58. type: System
  59. component: Network
  60. os: *
  61. hosts: *
  62. lookup: sum -10m unaligned absolute of received
  63. units: packets
  64. every: 1m
  65. summary: Network interface ${label:device} received packets
  66. info: Received packets for the network interface ${label:device} in the last 10 minutes
  67. template: net_interface_outbound_packets
  68. on: net.packets
  69. class: Workload
  70. type: System
  71. component: Network
  72. os: *
  73. hosts: *
  74. lookup: sum -10m unaligned absolute of sent
  75. units: packets
  76. every: 1m
  77. summary: Network interface ${label:device} sent packets
  78. info: Sent packets for the network interface ${label:device} in the last 10 minutes
  79. template: inbound_packets_dropped_ratio
  80. on: net.drops
  81. class: Errors
  82. type: System
  83. component: Network
  84. os: *
  85. hosts: *
  86. chart labels: device=!wl* *
  87. lookup: sum -10m unaligned absolute of inbound
  88. calc: (($net_interface_inbound_packets > 10000) ? ($this * 100 / $net_interface_inbound_packets) : (0))
  89. units: %
  90. every: 1m
  91. warn: $this >= 2
  92. delay: up 1m down 1h multiplier 1.5 max 2h
  93. summary: System network interface ${label:device} inbound drops
  94. info: Ratio of inbound dropped packets for the network interface ${label:device} over the last 10 minutes
  95. to: silent
  96. template: outbound_packets_dropped_ratio
  97. on: net.drops
  98. class: Errors
  99. type: System
  100. component: Network
  101. os: *
  102. hosts: *
  103. chart labels: device=!wl* *
  104. lookup: sum -10m unaligned absolute of outbound
  105. calc: (($net_interface_outbound_packets > 1000) ? ($this * 100 / $net_interface_outbound_packets) : (0))
  106. units: %
  107. every: 1m
  108. warn: $this >= 2
  109. delay: up 1m down 1h multiplier 1.5 max 2h
  110. summary: System network interface ${label:device} outbound drops
  111. info: Ratio of outbound dropped packets for the network interface ${label:device} over the last 10 minutes
  112. to: silent
  113. template: wifi_inbound_packets_dropped_ratio
  114. on: net.drops
  115. class: Errors
  116. type: System
  117. component: Network
  118. os: linux
  119. hosts: *
  120. chart labels: device=wl*
  121. lookup: sum -10m unaligned absolute of received
  122. calc: (($net_interface_inbound_packets > 10000) ? ($this * 100 / $net_interface_inbound_packets) : (0))
  123. units: %
  124. every: 1m
  125. warn: $this >= 10
  126. delay: up 1m down 1h multiplier 1.5 max 2h
  127. summary: System network interface ${label:device} inbound drops ratio
  128. info: Ratio of inbound dropped packets for the network interface ${label:device} over the last 10 minutes
  129. to: silent
  130. template: wifi_outbound_packets_dropped_ratio
  131. on: net.drops
  132. class: Errors
  133. type: System
  134. component: Network
  135. os: linux
  136. hosts: *
  137. chart labels: device=wl*
  138. lookup: sum -10m unaligned absolute of sent
  139. calc: (($net_interface_outbound_packets > 1000) ? ($this * 100 / $net_interface_outbound_packets) : (0))
  140. units: %
  141. every: 1m
  142. warn: $this >= 10
  143. delay: up 1m down 1h multiplier 1.5 max 2h
  144. summary: System network interface ${label:device} outbound drops ratio
  145. info: Ratio of outbound dropped packets for the network interface ${label:device} over the last 10 minutes
  146. to: silent
  147. # -----------------------------------------------------------------------------
  148. # interface errors
  149. template: interface_inbound_errors
  150. on: net.errors
  151. class: Errors
  152. type: System
  153. component: Network
  154. os: freebsd
  155. hosts: *
  156. lookup: sum -10m unaligned absolute of inbound
  157. units: errors
  158. every: 1m
  159. warn: $this >= 5
  160. delay: down 1h multiplier 1.5 max 2h
  161. summary: System network interface ${label:device} inbound errors
  162. info: Number of inbound errors for the network interface ${label:device} in the last 10 minutes
  163. to: silent
  164. template: interface_outbound_errors
  165. on: net.errors
  166. class: Errors
  167. type: System
  168. component: Network
  169. os: freebsd
  170. hosts: *
  171. lookup: sum -10m unaligned absolute of outbound
  172. units: errors
  173. every: 1m
  174. warn: $this >= 5
  175. delay: down 1h multiplier 1.5 max 2h
  176. summary: System network interface ${label:device} outbound errors
  177. info: Number of outbound errors for the network interface ${label:device} in the last 10 minutes
  178. to: silent
  179. # -----------------------------------------------------------------------------
  180. # FIFO errors
  181. # check if an interface is having FIFO
  182. # buffer errors
  183. # the alarm is checked every 1 minute
  184. # and examines the last 10 minutes of data
  185. template: 10min_fifo_errors
  186. on: net.fifo
  187. class: Errors
  188. type: System
  189. component: Network
  190. os: linux
  191. hosts: *
  192. lookup: sum -10m unaligned absolute
  193. units: errors
  194. every: 1m
  195. warn: $this > 0
  196. delay: down 1h multiplier 1.5 max 2h
  197. summary: System network interface ${label:device} FIFO errors
  198. info: Number of FIFO errors for the network interface ${label:device} in the last 10 minutes
  199. to: silent
  200. # -----------------------------------------------------------------------------
  201. # check for packet storms
  202. # 1. calculate the rate packets are received in 1m: 1m_received_packets_rate
  203. # 2. do the same for the last 10s
  204. # 3. raise an alarm if the later is 10x or 20x the first
  205. # we assume the minimum packet storm should at least have
  206. # 10000 packets/s, average of the last 10 seconds
  207. template: 1m_received_packets_rate
  208. on: net.packets
  209. class: Workload
  210. type: System
  211. component: Network
  212. os: linux freebsd
  213. hosts: *
  214. lookup: average -1m unaligned of received
  215. units: packets
  216. every: 10s
  217. info: Average number of packets received by the network interface ${label:device} over the last minute
  218. template: 10s_received_packets_storm
  219. on: net.packets
  220. class: Workload
  221. type: System
  222. component: Network
  223. os: linux freebsd
  224. hosts: *
  225. lookup: average -10s unaligned of received
  226. calc: $this * 100 / (($1m_received_packets_rate < 1000)?(1000):($1m_received_packets_rate))
  227. every: 10s
  228. units: %
  229. warn: $this > (($status >= $WARNING)?(200):(5000))
  230. crit: $this > (($status == $CRITICAL)?(5000):(6000))
  231. options: no-clear-notification
  232. summary: System network interface ${label:device} inbound packet storm
  233. info: Ratio of average number of received packets for the network interface ${label:device} over the last 10 seconds, \
  234. compared to the rate over the last minute
  235. to: silent