{"id":16634149,"url":"https://github.com/yano3/http-status-counter","last_synced_at":"2025-03-03T07:32:29.818Z","repository":{"id":66560736,"uuid":"55497999","full_name":"yano3/http-status-counter","owner":"yano3","description":"Count and output sent http status code using mruby code.","archived":false,"fork":false,"pushed_at":"2020-07-29T13:27:35.000Z","size":27,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-12T11:53:12.981Z","etag":null,"topics":["ngx-mruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/yano3.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-05T10:13:20.000Z","updated_at":"2020-09-24T07:10:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"8a9b93ba-39cd-4f65-ab37-48a52fe66f47","html_url":"https://github.com/yano3/http-status-counter","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3%2Fhttp-status-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3%2Fhttp-status-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3%2Fhttp-status-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3%2Fhttp-status-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yano3","download_url":"https://codeload.github.com/yano3/http-status-counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241629120,"owners_count":19993702,"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":["ngx-mruby"],"created_at":"2024-10-12T05:29:50.381Z","updated_at":"2025-03-03T07:32:29.380Z","avatar_url":"https://github.com/yano3.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http-status-counter\n\nCount and output sent http status code using mruby code.\n\n## Configuration\n\n### nginx\n\n```nginx\nhttp {\n  mruby_init /path/to/nginx/conf.d/status_counter/status_counter_init.rb cache;\n\n  server {\n    location / {\n      mruby_log_handler /path/to/nginx/conf.d/status_counter/status_counter.rb cache;\n    }\n\n    location /status_count {\n      mruby_content_handler /path/to/nginx/conf.d/status_counter/status_counter_output.rb cache;\n    }\n  }\n}\n```\n\n```shell\n$ curl http://localhost/status_count | jq\n{\n  \"requests\": 6218,\n  \"status\": {\n    \"200\": 3344,\n    \"301\": 1192,\n    \"302\": 901,\n    \"404\": 781\n  },\n  \"body_bytes_sent\": 5200307169,\n  \"request_time\": 379091,\n  \"avg_request_time\": 61.084822695035,\n  \"upstream_response_time\": 351707,\n  \"avg_upstream_response_time\": 57.210212765957\n}\n```\n\n## use case\n\n- [mackerel-plugin-http-status-counter](https://github.com/yano3/mackerel-plugin-http-status-counter)\n\n## dependent mrbgem\n\n```ruby\n  conf.gem :github =\u003e 'matsumotory/mruby-localmemcache'\n  conf.gem :github =\u003e 'matsumotory/mruby-mutex'\n  conf.gem :github =\u003e 'mattn/mruby-json'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyano3%2Fhttp-status-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyano3%2Fhttp-status-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyano3%2Fhttp-status-counter/lists"}