tcp_listen.conf 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #
  2. # There are two queues involved when incoming TCP connections are handled
  3. # (both at the kernel):
  4. #
  5. # SYN queue
  6. # The SYN queue tracks TCP handshakes until connections are fully established.
  7. # It overflows when too many incoming TCP connection requests hang in the
  8. # half-open state and the server is not configured to fall back to SYN cookies.
  9. # Overflows are usually caused by SYN flood DoS attacks (i.e. someone sends
  10. # lots of SYN packets and never completes the handshakes).
  11. #
  12. # Accept queue
  13. # The accept queue holds fully established TCP connections waiting to be handled
  14. # by the listening application. It overflows when the server application fails
  15. # to accept new connections at the rate they are coming in.
  16. #
  17. #
  18. # -----------------------------------------------------------------------------
  19. # tcp accept queue (at the kernel)
  20. alarm: 1m_tcp_accept_queue_overflows
  21. on: ip.tcp_accept_queue
  22. class: Workload
  23. type: System
  24. component: Network
  25. os: linux
  26. hosts: *
  27. lookup: average -60s unaligned absolute of ListenOverflows
  28. units: overflows
  29. every: 10s
  30. warn: $this > 1
  31. crit: $this > (($status == $CRITICAL) ? (1) : (5))
  32. delay: up 0 down 5m multiplier 1.5 max 1h
  33. info: average number of overflows in the TCP accept queue over the last minute
  34. to: sysadmin
  35. # THIS IS TOO GENERIC
  36. # CHECK: https://github.com/netdata/netdata/issues/3234#issuecomment-423935842
  37. alarm: 1m_tcp_accept_queue_drops
  38. on: ip.tcp_accept_queue
  39. class: Workload
  40. type: System
  41. component: Network
  42. os: linux
  43. hosts: *
  44. lookup: average -60s unaligned absolute of ListenDrops
  45. units: drops
  46. every: 10s
  47. warn: $this > 1
  48. crit: $this > (($status == $CRITICAL) ? (1) : (5))
  49. delay: up 0 down 5m multiplier 1.5 max 1h
  50. info: average number of dropped packets in the TCP accept queue over the last minute
  51. to: sysadmin
  52. # -----------------------------------------------------------------------------
  53. # tcp SYN queue (at the kernel)
  54. # When the SYN queue is full, either TcpExtTCPReqQFullDoCookies or
  55. # TcpExtTCPReqQFullDrop is incremented, depending on whether SYN cookies are
  56. # enabled or not. In both cases this probably indicates a SYN flood attack,
  57. # so i guess a notification should be sent.
  58. alarm: 1m_tcp_syn_queue_drops
  59. on: ip.tcp_syn_queue
  60. class: Workload
  61. type: System
  62. component: Network
  63. os: linux
  64. hosts: *
  65. lookup: average -60s unaligned absolute of TCPReqQFullDrop
  66. units: drops
  67. every: 10s
  68. warn: $this > 1
  69. crit: $this > (($status == $CRITICAL) ? (0) : (5))
  70. delay: up 10 down 5m multiplier 1.5 max 1h
  71. info: average number of SYN requests was dropped due to the full TCP SYN queue over the last minute \
  72. (SYN cookies were not enabled)
  73. to: sysadmin
  74. alarm: 1m_tcp_syn_queue_cookies
  75. on: ip.tcp_syn_queue
  76. class: Workload
  77. type: System
  78. component: Network
  79. os: linux
  80. hosts: *
  81. lookup: average -60s unaligned absolute of TCPReqQFullDoCookies
  82. units: cookies
  83. every: 10s
  84. warn: $this > 1
  85. crit: $this > (($status == $CRITICAL) ? (0) : (5))
  86. delay: up 10 down 5m multiplier 1.5 max 1h
  87. info: average number of sent SYN cookies due to the full TCP SYN queue over the last minute
  88. to: sysadmin