{"id":16310575,"url":"https://github.com/astj/negroni-server-status","last_synced_at":"2026-01-14T23:59:35.509Z","repository":{"id":57493600,"uuid":"101270956","full_name":"astj/negroni-server-status","owner":"astj","description":"[deprecated] A negroni middleware which serves server-status endpoint","archived":true,"fork":false,"pushed_at":"2020-12-04T09:35:37.000Z","size":6,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T09:44:56.373Z","etag":null,"topics":["golang","negroni","negroni-middleware-handler"],"latest_commit_sha":null,"homepage":"","language":"Go","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/astj.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":"2017-08-24T08:14:51.000Z","updated_at":"2024-08-06T11:28:47.000Z","dependencies_parsed_at":"2022-08-28T13:53:37.434Z","dependency_job_id":null,"html_url":"https://github.com/astj/negroni-server-status","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/astj/negroni-server-status","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astj%2Fnegroni-server-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astj%2Fnegroni-server-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astj%2Fnegroni-server-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astj%2Fnegroni-server-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astj","download_url":"https://codeload.github.com/astj/negroni-server-status/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astj%2Fnegroni-server-status/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","negroni","negroni-middleware-handler"],"created_at":"2024-10-10T21:42:17.600Z","updated_at":"2026-01-14T23:59:35.495Z","avatar_url":"https://github.com/astj.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# negroni-server-status\n\nA [negroni](https://github.com/urfave/negroni) middleware to monitor HTTP request stats like [`Plack::Middleware::ServerStatus::Lite`](https://metacpan.org/pod/Plack::Middleware::ServerStatus::Lite)\n\n## deprecation notice\n\nCurrently I don't use this middleware anymore. It may still work, but may not anymore.\n\n## Current Limitations\n\nComparing to original `Plack::Middleware::ServerStatus::Lite`, this middleware has following limitations.\n- IdleWorker value is always empty\n  - `net/http` server does not limit total numbers of workers, so this field is meaningless\n- Always returns response in JSON formats\n- Response does not contain individual processing requests (`stats` field)\n- Access Restriction is not implemented\n\nThe lattar three are not implemented because I don't need them currently, but patches are welcome.\n\n## Usage\n\nSee example/main.go.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\tnss \"github.com/astj/negroni-server-status\"\n\t\"github.com/urfave/negroni\"\n)\n\nfunc main() {\n\tmux := http.NewServeMux()\n\n\tmux.HandleFunc(\"/\", func(w http.ResponseWriter, req *http.Request) {\n\t\tfmt.Fprint(w, \"This is from internal\")\n\t})\n\n\tn := negroni.New()\n\n\tn.Use(nss.NewMiddleware(\"/server-status\"))\n\n\tn.UseHandler(mux)\n\n\tn.Run(\":3000\")\n}\n```\n\nIn this case, a response from `http://localhost:3000/server-status` is somewhat like this:\n```json\n{\"Uptime\":\"60\",\"TotalAccesses\":\"67\",\"TotalKbytes\":\"1\",\"BusyWorkers\":\"1\",\"IdleWorkers\":\"\",\"stats\":[]}\n```\n\n| key         | type of value | meaning                                                                |\n|-------------|---------------|------------------------------------------------------------------------|\n| Uptime      | string        | Elapsed seconds from this server starts                                |\n| TotalAccess | string        | Number of requests processed by this server                            |\n| TotalKbytes | string        | Sum of response body size processed by this server, in KB units        |\n| BusyWorkers | string        | Number of currently processing requests                                |\n| IdleWorkers | string        | Just empty. Available for compatibility with original Plack middleware |\n| stats       | []            | Should be information about current connections (not implemented)      |\n\n## License\n\nMIT\n\n## Author\n\n@astj (Asato Wakisaka)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastj%2Fnegroni-server-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastj%2Fnegroni-server-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastj%2Fnegroni-server-status/lists"}