Skip to content

Custom Datadog agent check for collecting TCP queue metrics using "ss" command

Notifications You must be signed in to change notification settings

adulmovits/ss_tcp_queue

Repository files navigation

ss_tcp_queue

Custom Datadog agent check for collecting TCP queue metrics using "ss" command

Dashboard

Description

This check runs the command ss --numeric --listening --tcp every 1 second on the host and parses the output to collect Send-Q and Recv-Q bytes broken down by port.

Metrics Collected

ss.listening.sendq

ss.listening.recvq

Enabling the Check

To enable this check follow the same steps as a custom agent check: https://docs.datadoghq.com/developers/metrics/agent_metrics_submission/?tab=count#tutorial

  1. Install the Datadog agent: https://app.datadoghq.com/account/settings#agent

  2. Create the directory ss_tcp_queue.d/ in /etc/datadog-agent/conf.d/

  3. Within /etc/datadog-agent/conf.d/ss_tcp_queue.d add the file ss_tcp_queue.yaml

  4. Go to /etc/datadog-agent/checks.d/ and add the file ss_tcp_queue.py

  5. Restart the agent

  6. Validate the custom check is running correctly with the Agent’s status subcommand. Look for ss_tcp_queue under the Checks section:

=========
Collector
=========

  Running Checks
  ==============

    (...)

    ss_tcp_queue (1.0.0)
    -----------------------
      Instance ID: metrics_example:d884b5186b651429 [OK]
      Total Runs: 2
      Metric Samples: Last Run: 8, Total: 16
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 2ms

    (...)
    ```

About

Custom Datadog agent check for collecting TCP queue metrics using "ss" command

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages