{"id":20980707,"url":"https://github.com/statful/statful-statsd-exporter","last_synced_at":"2025-07-30T09:38:46.501Z","repository":{"id":53292234,"uuid":"147832338","full_name":"statful/statful-statsd-exporter","owner":"statful","description":"Simple exporter - receives metrics in statsd format via tcp/udp, transforms them and sends them to statful","archived":false,"fork":false,"pushed_at":"2022-11-15T23:46:22.000Z","size":26,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-20T06:33:51.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/statful.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-07T14:10:58.000Z","updated_at":"2020-05-25T00:50:17.000Z","dependencies_parsed_at":"2022-08-19T23:40:23.775Z","dependency_job_id":null,"html_url":"https://github.com/statful/statful-statsd-exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statful%2Fstatful-statsd-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statful%2Fstatful-statsd-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statful%2Fstatful-statsd-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statful%2Fstatful-statsd-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statful","download_url":"https://codeload.github.com/statful/statful-statsd-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243382934,"owners_count":20282051,"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":[],"created_at":"2024-11-19T05:29:45.492Z","updated_at":"2025-03-13T10:17:36.628Z","avatar_url":"https://github.com/statful.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Statsd metric exporter\n======================\n\nReactor Netty based application that listens to metrics over tcp and udp and sends transformed metrics via UDP.\nMain goal is to map satsd metric format into [Statful](https://www.statful.com/) format. The implementation allows customization of metric senders, mappers and receivers. Meaning that,\nyou can easily create a new sender other than statful, by implementing MetricsSender. Check StatfulSender for an example.\n\nInspired on: https://github.com/prometheus/statsd_exporter\n\n    +----------+                         +-------------------+                        +--------------+\n    |  StatsD  |---(UDP/TCP repeater)---\u003e|  statsd_exporter  |--(UDP relay metrics)--\u003e|  Relay       |\n    +----------+                         +-------------------+                        +--------------+\n\nRefer to Envoy metric documentation to make sense of the example below [Envoy Metrics](https://www.envoyproxy.io/docs/envoy/latest/configuration/cluster_manager/cluster_stats)\n\nConfiguration\n=============\nAn example configuration file\n\n    tcp:\n      port: 8080\n    udp:\n      port: 8125\n      host: 127.0.0.1\n    mappings:\n      - match: envoy.cluster.*.canary.upstream_rq_time\n        name: \"http.canary.requests.upstream\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_rq_active\n        name: \"active_requests\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_rq_pending_active\n        name: \"pending_active_requests\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_rq_pending_total\n        name: \"pending_total_requests\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_cx_active\n        name: \"active_connections\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.membership_healthy\n        name: \"membership_healthy\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.membership_total\n        name: \"membership_total\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_rq_timeout\n        name: \"requests_timeout\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_rq_total\n        name: \"requests_total\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_cx_http1_total\n        name: \"total_http1_requests\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_cx_http2_total\n        name: \"total_http2_requests\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_rq_time\n        name: \"http.requests.upstream\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.external.upstream_rq_time\n        name: \"http.external.requests.upstream\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.internal.upstream_rq_time\n        name: \"http.internal.requests.upstream\"\n        tags:\n          upstream: \"$3\"\n      - match: envoy.cluster.*.upstream_rq_[0-9]+(xx)?\n        name: \"http.requests.upstream\"\n        tags:\n          upstream: \"$3\"\n          status_code: \"$4\"\n      - match: envoy.cluster.*.external.upstream_rq_[0-9]+(xx)?\n        name: \"http.external.requests.upstream\"\n        tags:\n          upstream: \"$3\"\n          status_code: \"$5\"\n      - match: envoy.cluster.*.internal.upstream_rq_[0-9]+(xx)?\n        name: \"http.internal.requests.upstream\"\n        tags:\n          upstream: \"$3\"\n          status_code: \"$5\"\n      - match: envoy.cluster.*.canary.upstream_rq_[0-9]+(xx)?\n        name: \"http.canary.requests.upstream\"\n        tags:\n          upstream: \"$3\"\n          status_code: \"$5\"\n      - match: \"*.*.*.*\"\n        action: DROP\n      - match: \"*.*.*.*.*\"\n        action: DROP\n    statful:\n      flushInterval: 5000\n      flushSize: 10\n      dryRun: false\n      host: localhost\n      port: 2013\n      app: statsdexporter\n      namespace: statsdexporter\n      environment: local\n\nMappings match incoming metrics and are applied sequentially, stopping when a match is found. If no match is found, the metric is sent as is.\nA Match can be viewed as a regex that will be applied to an incoming metric, where wildcard `*` is replaced by `[a-zA-Z_]+`  \nWhen a match occurs, the metric will then be split by `.` and $X will get the value associated with the according position.\n\nMappings have two actions available: DROP or MATCH. The default is MATCH.\n\ne.g: \n\n    - match: envoy.cluster.*.upstream_rq_[0-9]+(xx)?\n      name: \"http.requests.upstream\"\n      tags:\n        upstream: \"$3\"\n        status_code: \"$4\"\n    \n    for metric: envoy.cluster.cluster_hold_auth.upstream_rq_2xx\n    \n    will yield the following metric:\n    \n    metric: http.requests.upstream\n    tags:\n      upstream: \"cluster_hold_auth\"\n      status_code: \"upstream_rq_2xx\"\n\nNOTE: Be careful with regex that match more specific matches. Since its a first match found within the mappings list,\nyou should put more generic mappings at the bottom of the list.\n\nBuild\n=====\n    mvn clean install\n\nRun\n=====\n    java -jar target/statsd-statful-exporter-*-jar-with-dependencies.jar /optional/absolute/path/to/config\n    \nIf no path to external config is provided, by default the app looks for /tmp/config.json\n    \nDocker\n======\n\n    docker build -t statsdexporter .\n    docker run -p 8125:8125/udp \\ \n    -p 8080:8080\u003e \\ \n    -e CONFIG_PATH=/tmp/config.yaml \\\n    -e ENVIRONMENT=MY_ENV \\\n    -v $PWD/.config/config.yaml:/tmp/config.yaml \\\n    statsdexporter:latest\n\nTODO\n====\n- Tests\n- Improve documentation\n- Release artifacts\n\nMaintainer\n==========\nhugo.barrigas@mindera.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatful%2Fstatful-statsd-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatful%2Fstatful-statsd-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatful%2Fstatful-statsd-exporter/lists"}