{"id":21461861,"url":"https://github.com/cherusk/prometheus_ss_exporter","last_synced_at":"2025-07-15T03:30:35.621Z","repository":{"id":65650448,"uuid":"153596826","full_name":"cherusk/prometheus_ss_exporter","owner":"cherusk","description":"Open Operating System Socket Statistics Exporter","archived":false,"fork":false,"pushed_at":"2023-11-24T19:44:14.000Z","size":158,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T20:47:53.329Z","etag":null,"topics":["linux","metrics","monitoring","network","network-monitoring","prometheus","prometheus-exporter","prometheus-ss-exporter","pyroute2","socket","ss2","statistics","tcp-ip","tcpip","traffic"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cherusk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-18T09:17:32.000Z","updated_at":"2023-08-11T15:51:20.000Z","dependencies_parsed_at":"2023-11-24T08:27:25.104Z","dependency_job_id":"cc6a34fb-6370-41c8-8a7b-debc67dee184","html_url":"https://github.com/cherusk/prometheus_ss_exporter","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/cherusk/prometheus_ss_exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cherusk%2Fprometheus_ss_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cherusk%2Fprometheus_ss_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cherusk%2Fprometheus_ss_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cherusk%2Fprometheus_ss_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cherusk","download_url":"https://codeload.github.com/cherusk/prometheus_ss_exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cherusk%2Fprometheus_ss_exporter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265397504,"owners_count":23758443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","metrics","monitoring","network","network-monitoring","prometheus","prometheus-exporter","prometheus-ss-exporter","pyroute2","socket","ss2","statistics","tcp-ip","tcpip","traffic"],"created_at":"2024-11-23T07:11:45.021Z","updated_at":"2025-07-15T03:30:35.331Z","avatar_url":"https://github.com/cherusk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prometheus_ss_exporter\n\nExporter that gathers Operating System Network Socket Statistics as Metrics.\n\nUnderlying collection logic consumed is [pyroute2](https://github.com/svinota/pyroute2) - more specifically ss2.\n\n\n# Hints \n\nAlthough the label space for individual flows is bounded by the underlying\nflowing constraints configured on kernel level.\n\nNontheless, for very variadic traffic flow patterns with many flows being\ncreated and being phased out, this exporter may does lead to a overwhelming\nlabel space. That can already hold true for short amounts of times.\n\nHence, depending on the specific granularity requirements and resources of the\nscenario to run this exporter in, one should deliberately consider to make use of\nfollowing options:\n\nMitigation tactics are:\n+ The --storage.tsdb.retention=\u003cyours\u003e option of the prometheus server. It\n  gives bounds to the metrics label data held available can relieve capacity\n  constraints significantly. Nigh this is not necessarily confined to ad-hoc\n  oriented introspection deployments of the exporter. That's also correct on\n  vaster scale, let's say  when one is apt at forming a distinct retention\n  (sub)hierarchy of servers, maybe within a set of prometheus federations.\n+ To further reduce the flow metrics label cardinality, use the data selection\n  configration aspects of the exporter. That confines the collection to only\n  selected flows with certain characteristics.\n\n\n# Sample Scrape\n\n```\n# TYPE tcp_rtt gauge\ntcp_rtt{flow=\"(SRC#192.168.10.58|39366)(DST#104.19.199.151|443)\"} 53.376\ntcp_rtt{flow=\"(SRC#192.168.10.58|50484)(DST#212.227.17.170|993)\"} 39.129\ntcp_rtt{flow=\"(SRC#127.0.0.1|58334)(DST#127.0.0.1|22)\"} 2.178\ntcp_rtt{flow=\"(SRC#127.0.0.1|43908)(DST#127.0.0.1|8020)\"} 0.038\ntcp_rtt{flow=\"(SRC#192.168.10.58|36918)(DST#104.16.233.151|443)\"} 51.017\ntcp_rtt{flow=\"(SRC#192.168.10.58|36534)(DST#172.217.22.6|443)\"} 44.335\ntcp_rtt{flow=\"(SRC#127.0.0.1|58640)(DST#127.0.0.1|5037)\"} 0.011\ntcp_rtt{flow=\"(SRC#192.168.10.58|47192)(DST#194.25.134.114|993)\"} 36.689\ntcp_rtt{flow=\"(SRC#192.168.10.58|42410)(DST#216.58.205.226|443)\"} 40.242\ntcp_rtt{flow=\"(SRC#192.168.10.58|54412)(DST#104.16.22.133|443)\"} 56.069\ntcp_rtt{flow=\"(SRC#192.168.10.58|50626)(DST#172.217.18.2|443)\"} 46.931\ntcp_rtt{flow=\"(SRC#127.0.0.1|5037)(DST#127.0.0.1|58640)\"} 0.01\ntcp_rtt{flow=\"(SRC#192.168.10.58|45014)(DST#192.30.253.124|443)\"} 120.324\ntcp_rtt{flow=\"(SRC#127.0.0.1|8020)(DST#127.0.0.1|43908)\"} 0.015\n# HELP tcp_cwnd tcp socket perflow congestionwindow stats\n# TYPE tcp_cwnd gauge\ntcp_cwnd{flow=\"(SRC#192.168.10.58|39366)(DST#104.19.199.151|443)\"} 10.0\ntcp_cwnd{flow=\"(SRC#192.168.10.58|50484)(DST#212.227.17.170|993)\"} 10.0\ntcp_cwnd{flow=\"(SRC#127.0.0.1|58334)(DST#127.0.0.1|22)\"} 10.0\ntcp_cwnd{flow=\"(SRC#127.0.0.1|43908)(DST#127.0.0.1|8020)\"} 10.0\ntcp_cwnd{flow=\"(SRC#192.168.10.58|36918)(DST#104.16.233.151|443)\"} 10.0\ntcp_cwnd{flow=\"(SRC#192.168.10.58|36534)(DST#172.217.22.6|443)\"} 10.0\ntcp_cwnd{flow=\"(SRC#127.0.0.1|58640)(DST#127.0.0.1|5037)\"} 10.0\ntcp_cwnd{flow=\"(SRC#192.168.10.58|47192)(DST#194.25.134.114|993)\"} 10.0\ntcp_cwnd{flow=\"(SRC#192.168.10.58|42410)(DST#216.58.205.226|443)\"} 10.0\ntcp_cwnd{flow=\"(SRC#192.168.10.58|54412)(DST#104.16.22.133|443)\"} 10.0\ntcp_cwnd{flow=\"(SRC#192.168.10.58|50626)(DST#172.217.18.2|443)\"} 10.0\ntcp_cwnd{flow=\"(SRC#127.0.0.1|5037)(DST#127.0.0.1|58640)\"} 10.0\ntcp_cwnd{flow=\"(SRC#192.168.10.58|45014)(DST#192.30.253.124|443)\"} 10.0\ntcp_cwnd{flow=\"(SRC#127.0.0.1|8020)(DST#127.0.0.1|43908)\"} 10.0\n# HELP tcp_rtt_hist_ms tcp flowslatency outline\n# TYPE tcp_rtt_hist_ms histogram\ntcp_rtt_hist_ms_bucket{le=\"0.1\"} 4.0\ntcp_rtt_hist_ms_bucket{le=\"0.5\"} 0.0\ntcp_rtt_hist_ms_bucket{le=\"1.0\"} 0.0\ntcp_rtt_hist_ms_bucket{le=\"5.0\"} 1.0\ntcp_rtt_hist_ms_bucket{le=\"10.0\"} 0.0\ntcp_rtt_hist_ms_bucket{le=\"50.0\"} 5.0\ntcp_rtt_hist_ms_bucket{le=\"100.0\"} 3.0\ntcp_rtt_hist_ms_bucket{le=\"200.0\"} 1.0\ntcp_rtt_hist_ms_bucket{le=\"500.0\"} 0.0\ntcp_rtt_hist_ms_bucket{le=\"+Inf\"} 10.0\ntcp_rtt_hist_ms_count 10.0\ntcp_rtt_hist_ms_sum 24.0\n```\n\n# Run as Docker Container\n\n```\n\nYOUR_CONFIG_FILE=\u003cpath_to_file\u003e\nRELEASE_TAG=1.2.0\nIMAGE=\"ghcr.io/cherusk/prometheus_ss_exporter:${RELEASE_TAG}\"\n\ndocker run --privileged --network host --pid host --rm \\\n           -p 8090:8090 -e PORT=8090 -e CONFIG_FILE=\"${YOUR_CONFIG_FILE}\" \\\n           -v $(pwd):/exporter --name=prometheus_ss_exporter \\\n           \"${IMAGE}\"\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcherusk%2Fprometheus_ss_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcherusk%2Fprometheus_ss_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcherusk%2Fprometheus_ss_exporter/lists"}