{"id":17470897,"url":"https://github.com/matsumotory/mod_resource_checker","last_synced_at":"2026-02-12T06:12:50.146Z","repository":{"id":3312621,"uuid":"4355108","full_name":"matsumotory/mod_resource_checker","owner":"matsumotory","description":"Process Resource Logging Module using JSON format into file or piped program","archived":false,"fork":false,"pushed_at":"2017-01-18T06:12:10.000Z","size":89,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T08:51:59.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mahendra-singh/internet-speed-test","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matsumotory.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":"2012-05-17T05:12:02.000Z","updated_at":"2023-03-01T09:08:42.000Z","dependencies_parsed_at":"2022-09-21T11:41:15.500Z","dependency_job_id":null,"html_url":"https://github.com/matsumotory/mod_resource_checker","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/matsumotory/mod_resource_checker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_resource_checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_resource_checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_resource_checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_resource_checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matsumotory","download_url":"https://codeload.github.com/matsumotory/mod_resource_checker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_resource_checker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29360494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-18T16:12:08.352Z","updated_at":"2026-02-12T06:12:50.132Z","avatar_url":"https://github.com/matsumotory.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mod_resource_checker [![Build Status](https://travis-ci.org/matsumotory/mod_resource_checker.svg?branch=master)](https://travis-ci.org/matsumotory/mod_resource_checker)\n\nProcess Resource Logging Module using JSON format into file or piped program.\n\nSupported apache2.2.x and apache2.4.x with prefork mpm.\n\n[rcheck-analyze](https://github.com/matsumoto-r/rcheck-analyzer) is analyze tool for mod_resource_checker log.\n　\n\n- setup `conf.d/mod_resource_checker.conf`\n\n```apache\nLoadModule resource_checker_module modules/mod_resource_checker.so\n\nRCheckLogPath /var/log/httpd/resoruce.log\nRCheckRealServerName www.matsumoto-r.jp\n\n\u003cLocation /\u003e\n  RCheckALL On\n\u003c/Location\u003e\n```\n\n- check log file \n\n```\ntail -n 1 /var/log/httpd/resoruce.log | jq .\n```\n\n- output logs\n\n```json\n{\n  \"result\": {\n    \"RCheckMEM\": 31.289062,\n    \"RCheckSCPU\": 0.06999,\n    \"RCheckUCPU\": 0.360945\n  },\n  \"bytes_sent\": 59278,\n  \"size\": 418,\n  \"response_time\": 0,\n  \"threshold\": null,\n  \"pid\": 13990,\n  \"scheme\": \"http\",\n  \"filename\": \"/usr/local/apache/htdocs/blog/index.php\",\n  \"remote_ip\": \"127.0.0.1\",\n  \"location\": \"/\",\n  \"unit\": null,\n  \"type\": \"RCheckALL\",\n  \"date\": \"Fri Oct 23 21:24:23 2015\",\n  \"module\": \"mod_resource_checker\",\n  \"method\": \"GET\",\n  \"hostname\": \"blog.matsumoto-r.jp\",\n  \"server_ip\": \"127.0.0.1\",\n  \"uri\": \"/?m=200901\",\n  \"handler\": \"application/x-httpd-php\",\n  \"real_server_name\": \"www.matsumoto-r.jp\",\n  \"uid\": 500,\n  \"status\": 200\n}\n```\n\n##How To Compile\n- Build\n```\n(optional) yum install json-c json-c-devel\nmake\nsudo make install\n```\n\n- Add to  httpd.conf\n```apache\nLoadModule resource_checker_module modules/mod_resource_checker.so\n```\n\n\n##How To Use\n### Server Config\n- log file name (default /tmp/mod_resource_checker.log if no setting)\n\n    ```\n    RCheckLogPath \"/usr/local/apache/logs/resoruce.log\"\n    ```\n\n    or\n\n- if enable JSON Format `RCheckJSONFormat On`, for exmaple,\n\n    ```\n    RCheckLogPath \"| mongoimport -d apache -c resource_check\"\n    ```\n\n    It's very cool.\n\n- logging real server name\n\n```\nRCheckRealServerName www.matsumoto-r.jp\n```\n\n### Directive Config\n- Logging all status and resources log\n\n```apache\n\u003cLocation /\u003e\n  RCheckALL On\n\u003c/Location\u003e\n```\n\n```json\n{\n  \"result\": {\n    \"RCheckMEM\": 39.023438,\n    \"RCheckSCPU\": 0.055992,\n    \"RCheckUCPU\": 0.481926\n  },\n  \"response_time\": 0,\n  \"threshold\": null,\n  \"pid\": 22533,\n  \"status\": 200,\n  \"scheme\": \"http\",\n  \"filename\": \"/usr/local/apache244/htdocs/blog/index.php\",\n  \"remote_ip\": \"127.0.0.1\",\n  \"location\": \"/\",\n  \"unit\": null,\n  \"type\": \"RCheckALL\",\n  \"date\": \"Sun Oct 11 18:08:12 2015\",\n  \"module\": \"mod_resource_checker\",\n  \"method\": \"GET\",\n  \"hostname\": \"blog.matsumoto-r.jp\",\n  \"server_ip\": \"127.0.0.1\",\n  \"uri\": \"/index.php\",\n  \"real_server_name\": \"www.matsumoto-r.jp\",\n  \"uid\": 2,\n  \"size\": 418,\n  \"content_length\": 2498\n}\n```\n\n- Logging all request which don't include resouces data\n\n```apache\n\u003cLocation /\u003e\n  RCheckSTATUS On\n\u003c/Location\u003e\n```\n\n```json\n{\n  \"result\": 0,\n  \"response_time\": 0,\n  \"threshold\": null,\n  \"pid\": 22533,\n  \"status\": 200,\n  \"scheme\": \"http\",\n  \"filename\": \"/usr/local/apache244/htdocs/blog/index.php\",\n  \"remote_ip\": \"127.0.0.1\",\n  \"location\": \"/\",\n  \"unit\": null,\n  \"type\": \"RCheckSTATUS\",\n  \"date\": \"Sun Oct 11 18:08:12 2015\",\n  \"module\": \"mod_resource_checker\",\n  \"method\": \"GET\",\n  \"hostname\": \"blog.matsumoto-r.jp\",\n  \"server_ip\": \"127.0.0.1\",\n  \"uri\": \"/index.php\",\n  \"real_server_name\": \"www.matsumoto-r.jp\",\n  \"uid\": 2,\n  \"size\": 418,\n  \"content_length\": 2498\n}\n```\n\n- Logging CPUUserTime\n\n```apache\nRCheckUCPU \u003cthreashould\u003e \u003ctype\u003e\n```\n\n- Logging CPUSystemTime\n```apache\nRCheckSCPU \u003cthreashould\u003e \u003ctype\u003e\n```\n\n- Logging UsedMemory\n```apache\nRCheckMEM \u003cthreashould\u003e \u003ctype\u003e\n\n    \u003cthreashould\u003e    digit(non-zero)\n\n    \u003ctype\u003e           ALL\n                     SELF\n                     CHILD\n```\n\n- Directory Access Control\n```apache\n\u003cDirectory \"/var/www/html\"\u003e\n     RCheckUCPU 0.0001 ALL\n\u003c/Directory\u003e\n```\n\n- File Access Control\n```apache\n\u003cFiles \"ag.cgi\"\u003e\n     RCheckUCPU 0.003 SELF\n     RCheckSCPU 0.004 CHILD\n     RCheckJSONFormat On\n\u003c/Files\u003e\n```\n\n- Files Regex Access Control\n```apache\n\u003cFilesMatch \".*\\.cgi$\"\u003e\n     RCheckUCPU 0.005 ALL\n     RCheckMEM 1 ALL\n\u003c/FilesMatch\u003e\n```\n\n# License\nunder the MIT License:\n\n* http://www.opensource.org/licenses/mit-license.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fmod_resource_checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatsumotory%2Fmod_resource_checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fmod_resource_checker/lists"}