Send TCP/UDP host metrics to the Datadog API

이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

To get insights about your TCP/UDP connections, you can gather statistics through a Crontab Entry and forward them to your Datadog platform.

To do this, use Linux sockstats located in: /proc/net/sockstat.

Here is an example code snippet to get you started:

https://gist.github.com/sage-oli-wood/70e0931f037ea0aac132

This submits your data to Datadog through an HTTP POST.

A more proper way to do this would be to send metrics and events using DogStatsD. You may adapt your cron job to forward your data locally in UDP to your Agent, find more here.

You retrieve from this:

  • TCP:
in usetotal established connectionsinteger (number)
OrphanOrphaned tcp connections
(not attached to any user file handle)integer (number)
TWTIME_WAIT connectionsineger (millisec )
AllocTCP sockets allocated( All type for example, ESTABLISH, CLOSE_WAIT, TIME_WAIT, etc)
memtotal memory for TCP socketinteger (KiloBytes)
  • UDP:
inusetotal established connectionsinteger
memtotal memory for UDP socketinteger (KB)
PREVIEWING: aliciascott/DOCS-9725-Cloudcraft