net.conf 7.8 KB

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