{"id":18286761,"url":"https://github.com/xrstf/logstats","last_synced_at":"2026-04-19T10:32:06.920Z","repository":{"id":142640569,"uuid":"129696654","full_name":"xrstf/logstats","owner":"xrstf","description":"primitive tool to gather statistics from nginx logfiles","archived":false,"fork":false,"pushed_at":"2018-04-21T18:14:51.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-12T04:56:02.054Z","etag":null,"topics":["go","log","monitoring","nginx","statistics"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/xrstf.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":"2018-04-16T06:40:26.000Z","updated_at":"2022-04-26T09:00:03.000Z","dependencies_parsed_at":"2023-04-07T09:31:07.402Z","dependency_job_id":null,"html_url":"https://github.com/xrstf/logstats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xrstf/logstats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrstf%2Flogstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrstf%2Flogstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrstf%2Flogstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrstf%2Flogstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xrstf","download_url":"https://codeload.github.com/xrstf/logstats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrstf%2Flogstats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32004035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","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":["go","log","monitoring","nginx","statistics"],"created_at":"2024-11-05T13:22:02.118Z","updated_at":"2026-04-19T10:32:06.897Z","avatar_url":"https://github.com/xrstf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logstats - A Simple Logfile Analyzer\n\nThis project implements a very basic parser for nginx access logs, which counts\nthe number of requests and sent bytes and things like that.\n\n## Why?\n\nI'm using this to monitor some of my web projects. I have a cronjob running this\nprogram once every minute, letting it count how many requests hit my project and\nwhat HTTP status codes I generated. The result is then consumed by a script that\npumps the data into InfluxDB.\n\nIt's useful for projects that have no telemetry built into them, but are proxied\nbehind a reverse proxy.\n\n## How?\n\n1. Clone the repository\n2. Run `make deps` to fetch the required dependencies.\n3. To build the app, run `make app`. For a statically compiled version, run\n   `make static`.\n3. Run it.\n\nTo run, copy the `config.dist.yaml`, adjust to your needs and fire away:\n\n    $ ./logstats myconfig.yaml access.log\n    2018/04/16 15:14:23 Range start: 2018-04-16 05:14:23\n    2018/04/16 15:14:23 Range end:   2018-04-16 15:14:23\n    {\n      \"hits\": {\n        \"fonts\": 0,\n        \"images\": 0,\n        \"media\": 0,\n        \"robots\": 9450,\n        \"styles\": 0,\n        \"total\": 669375\n      },\n      \"traffic\": {\n        \"fonts\": 0,\n        \"images\": 0,\n        \"media\": 0,\n        \"robots\": 982800,\n        \"styles\": 0,\n        \"total\": 7976381175\n      },\n      \"status\": {\n        \"200\": 612675,\n        \"301\": 44100,\n        \"304\": 12600\n      },\n      \"methods\": {\n        \"GET\": 669375\n      },\n      \"protocols\": {\n        \"HTTP/1.0\": 582750,\n        \"HTTP/1.1\": 81900,\n        \"HTTP/2.0\": 4725\n      },\n      \"uniqueIPs\": 28\n    }\n\nMake sure to pipe the log output (stderr) away to only process the resulting\nJSON on stdout.\n\n## Caveats\n\nIf you're using a custom nginx log format, this will not work for you without\nadjusting the code base.\n\nThe code is probably not the most efficient. Make sure to use the `read` parameter\nin the config file accordingly. Reading a 500MB log file is somewhere around\n20 seconds, but is relatively memory efficient (using less than 10 MB).\n\n## License\n\nWTFPL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrstf%2Flogstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxrstf%2Flogstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrstf%2Flogstats/lists"}