{"id":28386251,"url":"https://github.com/statsd/system","last_synced_at":"2025-06-26T13:31:50.016Z","repository":{"id":19041659,"uuid":"22266836","full_name":"statsd/system","owner":"statsd","description":"System metrics for statsd (cpu, mem, disk, io, etc)","archived":false,"fork":false,"pushed_at":"2019-10-24T18:49:59.000Z","size":25,"stargazers_count":93,"open_issues_count":9,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-30T17:17:47.331Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/statsd.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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":"2014-07-25T18:36:55.000Z","updated_at":"2024-12-30T16:34:28.000Z","dependencies_parsed_at":"2022-07-12T23:50:35.599Z","dependency_job_id":null,"html_url":"https://github.com/statsd/system","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/statsd/system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statsd%2Fsystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statsd%2Fsystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statsd%2Fsystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statsd%2Fsystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statsd","download_url":"https://codeload.github.com/statsd/system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statsd%2Fsystem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262076682,"owners_count":23255045,"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":"2025-05-30T13:40:59.975Z","updated_at":"2025-06-26T13:31:49.999Z","avatar_url":"https://github.com/statsd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# System\n\n System statistics collector for statsd on linux written in Go .\n\n## Usage\n\n```\n\n  Usage:\n    system-stats\n      [--statsd-address addr]\n      [--memory-interval i]\n      [--disk-interval i]\n      [--cpu-interval i]\n      [--extended]\n      [--name name]\n    system-stats -h | --help\n    system-stats --version\n\n  Options:\n    --statsd-address addr   statsd address [default: :8125]\n    --memory-interval i     memory reporting interval [default: 10s]\n    --disk-interval i       disk reporting interval [default: 1m]\n    --cpu-interval i        cpu reporting interval [default: 2s]\n    --name name             node name defaulting to hostname [default: hostname]\n    --extended              output additional extended metrics\n    -h, --help              output help information\n    -v, --version           output version\n\n````\n\n## Installation\n\n Via go-get:\n\n```\n$ go get github.com/statsd/system\n```\n\n Via binaries:\n\nComing soon!\n\n## Metrics\n\n Metrics are prefixed with the hostname (or `--name`), and\n namespaced by the resource, for example:\n\n```\napi-2.cpu.blocked:7|c\napi-2.cpu.running:4|c\napi-2.cpu.interrupts:19695796035|c\napi-2.cpu.percent:26|g\napi-2.cpu.switches:25195265352|c\napi-2.cpu.processes:20027|c\napi-2.cpu.blocked:7|c\napi-2.cpu.running:4|c\napi-2.cpu.interrupts:19695796035|c\napi-2.cpu.percent:26|g\n...\n```\n\n Depending on the statd implementation that you use this\n may result in different outputs. For example with the\n [armon/statsite](https://github.com/armon/statsite) implementation\n this would result in `gauges.api-2.memory.free`.\n\n The `--extended` flag enables extended metrics per resource\n and are listed as __extended__ below.\n\n### CPU\n\n- `cpu.percent` gauge\n- `cpu.switches` counter __extended__\n- `cpu.interrupts` counter __extended__\n- `cpu.blocked` counter __extended__\n\n### Memory\n\n Memory values are represented in bytes.\n\n- `memory.percent` gauge\n- `memory.used` gauge\n- `memory.active` gauge __extended__\n- `memory.total` gauge __extended__\n- `memory.free` gauge __extended__\n- `memory.swap.percent` gauge\n- `memory.swap.total` gauge __extended__\n- `memory.swap.free` gauge __extended__\n\n### Disk\n\n Disk values are represented in bytes. `\u003cvolume\u003e` is the\n path the fs is mounted on (/, /data, etc).\n\n- `disk.\u003cvolume\u003e.percent` gauge\n- `disk.\u003cvolume\u003e.free` gauge\n- `disk.\u003cvolume\u003e.used` gauge\n\n### IO\n\n  Coming soon!\n\n## Daemonization\n\n system-stats(1) doesn't support running as a daemon natively, you'll\n want to use upstart or similar for this. Add the following example\n upstart script to /etc/init/system-stats.conf:\n\n```\nrespawn\n\nstart on runlevel [2345]\nstop on runlevel [016]\n\nexec system-stats --statsd-address 10.0.0.214:5000\n```\n\n Then run `sudo start system-stats` and you're good to go!\n\n## Debugging\n\nRun with `DEBUG=stats` to view the [go-debug](http://github.com/visionmedia/go-debug) output:\n\n```\n2014-08-13 22:04:36 INFO - cpu: reporting\n22:04:36.098 2s     2s     statsd - vagrant-ubuntu-precise-64.cpu.switches:20384|c\n22:04:36.098 4us    4us    statsd - vagrant-ubuntu-precise-64.cpu.processes:0|c\n22:04:36.098 3us    3us    statsd - vagrant-ubuntu-precise-64.cpu.running:0|c\n22:04:36.098 3us    3us    statsd - vagrant-ubuntu-precise-64.cpu.interrupts:656|c\n22:04:36.098 3us    3us    statsd - vagrant-ubuntu-precise-64.cpu.percent:100|g\n2014-08-13 22:04:38 INFO - cpu: reporting\n22:04:38.098 2s     2s     statsd - vagrant-ubuntu-precise-64.cpu.switches:24074|c\n22:04:38.098 23us   13us   statsd - vagrant-ubuntu-precise-64.cpu.processes:0|c\n22:04:38.098 15us   8us    statsd - vagrant-ubuntu-precise-64.cpu.running:1|c\n22:04:38.098 12us   7us    statsd - vagrant-ubuntu-precise-64.cpu.interrupts:638|c\n22:04:38.099 11us   7us    statsd - vagrant-ubuntu-precise-64.cpu.percent:100|g\n```\n\n# License\n\n MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatsd%2Fsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatsd%2Fsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatsd%2Fsystem/lists"}