{"id":13621636,"url":"https://github.com/matsuu/kataribe","last_synced_at":"2025-04-07T11:10:56.569Z","repository":{"id":23072985,"uuid":"26426621","full_name":"matsuu/kataribe","owner":"matsuu","description":"Access log profiler based on response time","archived":false,"fork":false,"pushed_at":"2022-06-13T12:32:17.000Z","size":49,"stargazers_count":365,"open_issues_count":4,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T15:34:13.977Z","etag":null,"topics":["analyzer","apache","go","h2o","log","nginx","profiler","varnishncsa"],"latest_commit_sha":null,"homepage":"","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/matsuu.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":"2014-11-10T07:57:16.000Z","updated_at":"2024-11-30T08:29:24.000Z","dependencies_parsed_at":"2022-07-27T03:47:19.728Z","dependency_job_id":null,"html_url":"https://github.com/matsuu/kataribe","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsuu%2Fkataribe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsuu%2Fkataribe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsuu%2Fkataribe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsuu%2Fkataribe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matsuu","download_url":"https://codeload.github.com/matsuu/kataribe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640465,"owners_count":20971557,"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":["analyzer","apache","go","h2o","log","nginx","profiler","varnishncsa"],"created_at":"2024-08-01T21:01:08.924Z","updated_at":"2025-04-07T11:10:56.540Z","avatar_url":"https://github.com/matsuu.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"Kataribe\n========\n\nAccess log profiler based on response time\n\n## Prerequisites\n\n### Apache\n\nAdd `%D` to [LogFormat](http://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat).\n```\nLogFormat \"%h %l %u %t \\\"%r\\\" %\u003es %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\" %D\" with_time\nCustomLog logs/access_log with_time\n```\n\n### Nginx\n\nAdd `$request_time` to [log\\_format](http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format).\n```\nlog_format with_time '$remote_addr - $remote_user [$time_local] '\n                     '\"$request\" $status $body_bytes_sent '\n                     '\"$http_referer\" \"$http_user_agent\" $request_time';\naccess_log /var/log/nginx/access.log with_time;\n```\n\n### H2O\n\nAdd `%{duration}x` to [access-log directive](https://h2o.examp1e.net/configure/access_log_directives.html)\n```\naccess-log:\n  path: /var/log/h2o/access.log\n  format: \"%h %l %u %t \\\"%r\\\" %s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\" %{duration}x\"\n```\n\n### Envoy\n\nUse [default format](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#config-access-log-default-format)\n\n### Varnishncsa\n\nAdd `%D` to [varnishncsa -F option](https://www.varnish-cache.org/docs/trunk/reference/varnishncsa.html).\n```\nvarnishncsa -a -w $logfile -D -P $pidfile -F '%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\" %D'\n```\n\n### Rack\n\nAdd `Rack::CommonLogger` to config.ru.\n```\nlogger = Logger.new(\"/tmp/app.log\")\nuse Rack::CommonLogger, logger\n```\n\n## Usage\n\nInstall via go command or download [release file](https://github.com/matsuu/kataribe/releases)\n\n```sh\n# go \u003e=1.16\ngo install github.com/matsuu/kataribe@latest\n\n# go \u003c1.16\ngo get -u github.com/matsuu/kataribe\n```\n\nGenerate kataribe.toml\n\n```sh\nkataribe -generate\n```\n\nEdit kataribe.toml\n\n```sh\n${EDITOR} kataribe.toml\n```\n\nPass access log to kataribe by stdin\n```sh\ncat /path/to/access.log | kataribe\n```\n\n## Example\n\n```\nSort By Count\nCount   Total      Mean    Stddev    Min    P50    P90    P95    P99    Max    2xx   3xx  4xx  5xx  Request\n17238   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000  17238     0    0    0  GET /stylesheets/*\n 5746   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000   5746     0    0    0  GET /images/*\n 5198  12.449  0.002395  0.002292  0.001  0.002  0.003  0.005  0.009  0.069   5198     0    0    0  GET / HTTP/1.1\n 2873  22.753  0.007920  0.007529  0.004  0.006  0.011  0.015  0.035  0.193      0  2873    0    0  POST /login HTTP/1.1\n  548   2.851  0.005203  0.004015  0.003  0.004  0.007  0.009  0.021  0.066    548     0    0    0  GET /mypage HTTP/1.1\n    1   0.303  0.303000  0.000000  0.303  0.303  0.303  0.303  0.303  0.303      0     0    0    1  GET /report HTTP/1.1\n\nSort By Total\nCount   Total      Mean    Stddev    Min    P50    P90    P95    P99    Max    2xx   3xx  4xx  5xx  Request\n 2873  22.753  0.007920  0.007529  0.004  0.006  0.011  0.015  0.035  0.193      0  2873    0    0  POST /login HTTP/1.1\n 5198  12.449  0.002395  0.002292  0.001  0.002  0.003  0.005  0.009  0.069   5198     0    0    0  GET / HTTP/1.1\n  548   2.851  0.005203  0.004015  0.003  0.004  0.007  0.009  0.021  0.066    548     0    0    0  GET /mypage HTTP/1.1\n    1   0.303  0.303000  0.000000  0.303  0.303  0.303  0.303  0.303  0.303      0     0    0    1  GET /report HTTP/1.1\n17238   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000  17238     0    0    0  GET /stylesheets/*\n 5746   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000   5746     0    0    0  GET /images/*\n\nSort By Mean\nCount   Total      Mean    Stddev    Min    P50    P90    P95    P99    Max    2xx   3xx  4xx  5xx  Request\n    1   0.303  0.303000  0.000000  0.303  0.303  0.303  0.303  0.303  0.303      0     0    0    1  GET /report HTTP/1.1\n 2873  22.753  0.007920  0.007529  0.004  0.006  0.011  0.015  0.035  0.193      0  2873    0    0  POST /login HTTP/1.1\n  548   2.851  0.005203  0.004015  0.003  0.004  0.007  0.009  0.021  0.066    548     0    0    0  GET /mypage HTTP/1.1\n 5198  12.449  0.002395  0.002292  0.001  0.002  0.003  0.005  0.009  0.069   5198     0    0    0  GET / HTTP/1.1\n17238   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000  17238     0    0    0  GET /stylesheets/*\n 5746   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000   5746     0    0    0  GET /images/*\n\nSort By Standard Deviation\nCount   Total      Mean    Stddev    Min    P50    P90    P95    P99    Max    2xx   3xx  4xx  5xx  Request\n 2873  22.753  0.007920  0.007529  0.004  0.006  0.011  0.015  0.035  0.193      0  2873    0    0  POST /login HTTP/1.1\n  548   2.851  0.005203  0.004015  0.003  0.004  0.007  0.009  0.021  0.066    548     0    0    0  GET /mypage HTTP/1.1\n 5198  12.449  0.002395  0.002292  0.001  0.002  0.003  0.005  0.009  0.069   5198     0    0    0  GET / HTTP/1.1\n    1   0.303  0.303000  0.000000  0.303  0.303  0.303  0.303  0.303  0.303      0     0    0    1  GET /report HTTP/1.1\n17238   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000  17238     0    0    0  GET /stylesheets/*\n 5746   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000   5746     0    0    0  GET /images/*\n\nSort By Maximum(100 Percentile)\nCount   Total      Mean    Stddev    Min    P50    P90    P95    P99    Max    2xx   3xx  4xx  5xx  Request\n    1   0.303  0.303000  0.000000  0.303  0.303  0.303  0.303  0.303  0.303      0     0    0    1  GET /report HTTP/1.1\n 2873  22.753  0.007920  0.007529  0.004  0.006  0.011  0.015  0.035  0.193      0  2873    0    0  POST /login HTTP/1.1\n 5198  12.449  0.002395  0.002292  0.001  0.002  0.003  0.005  0.009  0.069   5198     0    0    0  GET / HTTP/1.1\n  548   2.851  0.005203  0.004015  0.003  0.004  0.007  0.009  0.021  0.066    548     0    0    0  GET /mypage HTTP/1.1\n17238   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000  17238     0    0    0  GET /stylesheets/*\n 5746   0.000  0.000000  0.000000  0.000  0.000  0.000  0.000  0.000  0.000   5746     0    0    0  GET /images/*\n\nTOP 37 Slow Requests\n 1  0.303  GET /report HTTP/1.1\n 2  0.193  POST /login HTTP/1.1\n 3  0.149  POST /login HTTP/1.1\n 4  0.108  POST /login HTTP/1.1\n 5  0.105  POST /login HTTP/1.1\n 6  0.101  POST /login HTTP/1.1\n 7  0.084  POST /login HTTP/1.1\n 8  0.080  POST /login HTTP/1.1\n 9  0.080  POST /login HTTP/1.1\n10  0.069  GET / HTTP/1.1\n11  0.066  GET /mypage HTTP/1.1\n12  0.063  POST /login HTTP/1.1\n13  0.063  POST /login HTTP/1.1\n14  0.057  POST /login HTTP/1.1\n15  0.056  POST /login HTTP/1.1\n16  0.056  GET / HTTP/1.1\n17  0.054  POST /login HTTP/1.1\n18  0.054  POST /login HTTP/1.1\n19  0.048  POST /login HTTP/1.1\n20  0.046  GET /mypage HTTP/1.1\n21  0.045  POST /login HTTP/1.1\n22  0.045  POST /login HTTP/1.1\n23  0.044  POST /login HTTP/1.1\n24  0.042  POST /login HTTP/1.1\n25  0.041  GET / HTTP/1.1\n26  0.040  POST /login HTTP/1.1\n27  0.039  GET / HTTP/1.1\n28  0.038  POST /login HTTP/1.1\n29  0.038  GET / HTTP/1.1\n30  0.037  POST /login HTTP/1.1\n31  0.037  POST /login HTTP/1.1\n32  0.036  GET / HTTP/1.1\n33  0.036  POST /login HTTP/1.1\n34  0.036  GET / HTTP/1.1\n35  0.036  POST /login HTTP/1.1\n36  0.035  POST /login HTTP/1.1\n37  0.035  POST /login HTTP/1.1\n```\n\n## License\n\nApache-2.0\n\n## Author\n\n[matsuu](https://github.com/matsuu)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsuu%2Fkataribe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatsuu%2Fkataribe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsuu%2Fkataribe/lists"}