net.conf 7.7 KB

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