{"id":13471531,"url":"https://github.com/fukata/golang-stats-api-handler","last_synced_at":"2025-05-16T18:03:24.445Z","repository":{"id":12206307,"uuid":"14812234","full_name":"fukata/golang-stats-api-handler","owner":"fukata","description":"Golang cpu, memory, gc, etc information api handler.","archived":false,"fork":false,"pushed_at":"2016-03-25T10:50:45.000Z","size":21,"stargazers_count":268,"open_issues_count":0,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-25T05:38:57.230Z","etag":null,"topics":["go","munin","stats","zabbix"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fukata.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}},"created_at":"2013-11-29T23:41:36.000Z","updated_at":"2025-04-18T00:17:37.000Z","dependencies_parsed_at":"2022-08-25T10:41:13.105Z","dependency_job_id":null,"html_url":"https://github.com/fukata/golang-stats-api-handler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fukata%2Fgolang-stats-api-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fukata%2Fgolang-stats-api-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fukata%2Fgolang-stats-api-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fukata%2Fgolang-stats-api-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fukata","download_url":"https://codeload.github.com/fukata/golang-stats-api-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582901,"owners_count":22095518,"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":["go","munin","stats","zabbix"],"created_at":"2024-07-31T16:00:46.314Z","updated_at":"2025-05-16T18:03:24.377Z","avatar_url":"https://github.com/fukata.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"golang-stats-api-handler\n========================\n\nGolang cpu, memory, gc, etc information api handler.\n\n[![Build Status](https://travis-ci.org/fukata/golang-stats-api-handler.svg?branch=master)](https://travis-ci.org/fukata/golang-stats-api-handler)\n\n## Install\n\n    go get github.com/fukata/golang-stats-api-handler\n\n## Example\n\n```go\nimport (\n    \"net/http\"\n    \"log\"\n    \"github.com/fukata/golang-stats-api-handler\"\n)\nfunc main() {\n    http.HandleFunc(\"/api/stats\", stats_api.Handler)\n    log.Fatal( http.ListenAndServe(\":8080\", nil) )\n}\n```\n\n## Response\n\n    $ curl -i http://localhost:8080/api/stats/\n    HTTP/1.1 200 OK\n    Content-Length: 712\n    Content-Type: application/json\n    Date: Sun, 23 Aug 2015 16:52:13 GMT\n    \n    {\n        \"time\": 1440348733548339479,\n        \"go_version\": \"go1.5\",\n        \"go_os\": \"darwin\",\n        \"go_arch\": \"amd64\",\n        \"cpu_num\": 8,\n        \"goroutine_num\": 24,\n        \"gomaxprocs\": 8,\n        \"cgo_call_num\": 9,\n        \"memory_alloc\": 3974536,\n        \"memory_total_alloc\": 12857888,\n        \"memory_sys\": 12871928,\n        \"memory_lookups\": 52,\n        \"memory_mallocs\": 144922,\n        \"memory_frees\": 118936,\n        \"memory_stack\": 688128,\n        \"heap_alloc\": 3974536,\n        \"heap_sys\": 8028160,\n        \"heap_idle\": 2170880,\n        \"heap_inuse\": 5857280,\n        \"heap_released\": 0,\n        \"heap_objects\": 25986,\n        \"gc_next\": 4833706,\n        \"gc_last\": 1440348732827834419,\n        \"gc_num\": 4,\n        \"gc_per_second\": 0,\n        \"gc_pause_per_second\": 0,\n        \"gc_pause\": [\n            0.196828,\n            2.027442,\n            0.181887,\n            0.312866\n        ]\n    }\n\n|Key                |Value|\n|-------------------|----------------|\n|time               |unix timestamp as nano-seconds|\n|go_version         |runtime.Version()|\n|go_os              |runtime.GOOS|\n|go_arch            |runtime.GOARCH|\n|cpu_num            |number of CPUs|\n|goroutine_num      |number of goroutines|\n|gomaxprocs         |runtime.GOMAXRPOCS(0)|\n|cgo_call_num       |runtime.NumCgoCall()|\n|memory_alloc       |bytes allocated and not yet freed|\n|memory_total_alloc |bytes allocated (even if freed)|\n|memory_sys         |bytes obtained from system|\n|memory_lookups     |number of pointer lookups|\n|memory_mallocs     |number of mallocs|\n|memory_frees       |number of frees|\n|memory_stack       |bytes used by stack allocator|\n|heap_alloc         |bytes allocated and not yet freed (same as memory_alloc above)|\n|heap_sys           |bytes obtained from system (not same as memory_sys)|\n|heap_idle          |bytes in idle spans|\n|heap_inuse         |bytes in non-idle span|\n|heap_released      |bytes released to the OS|\n|heap_objects       |total number of allocated objects|\n|gc_next            |next collection will happen when HeapAlloc ≥ this amount|\n|gc_last            |end time of last collection|\n|gc_num             |number of GC-run|\n|gc_per_second      |number of GC-run per second|\n|gc_pause_per_second|pause duration by GC per seconds|\n|gc_pause           |pause durations by GC|\n\n## Plugins\n\n- Zabbix: [fukata/golang-stats-api-handler-zabbix-userparameter](https://github.com/fukata/golang-stats-api-handler-zabbix-userparameter)\n- Munin: [fukata/golang-stats-api-handler-munin-plugin](https://github.com/fukata/golang-stats-api-handler-munin-plugin) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffukata%2Fgolang-stats-api-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffukata%2Fgolang-stats-api-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffukata%2Fgolang-stats-api-handler/lists"}