{"id":49156366,"url":"https://github.com/alexrynas/apache-access-logs-analytical-parser","last_synced_at":"2026-04-22T09:05:58.998Z","repository":{"id":326419295,"uuid":"1105249196","full_name":"AlexRynas/Apache-Access-Logs-Analytical-Parser","owner":"AlexRynas","description":"Self-contained Apache access log analyzer for Windows that uses PowerShell and Geoapify IP Geolocation API to generate Markdown reports with geo (country/city) and page-view analytics.","archived":false,"fork":false,"pushed_at":"2025-11-27T16:58:56.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-30T09:18:43.876Z","etag":null,"topics":["apache","apache-log-analysis","apache-logs","cli-tool","geoapify","ip-geolocation","log-analysis","log-parser","markdown-report","powershell","web-analytics","windows"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/AlexRynas.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-27T10:43:39.000Z","updated_at":"2025-11-27T17:00:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AlexRynas/Apache-Access-Logs-Analytical-Parser","commit_stats":null,"previous_names":["alexrynas/apache-access-logs-analytical-parser"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AlexRynas/Apache-Access-Logs-Analytical-Parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRynas%2FApache-Access-Logs-Analytical-Parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRynas%2FApache-Access-Logs-Analytical-Parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRynas%2FApache-Access-Logs-Analytical-Parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRynas%2FApache-Access-Logs-Analytical-Parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexRynas","download_url":"https://codeload.github.com/AlexRynas/Apache-Access-Logs-Analytical-Parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRynas%2FApache-Access-Logs-Analytical-Parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32128706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"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":["apache","apache-log-analysis","apache-logs","cli-tool","geoapify","ip-geolocation","log-analysis","log-parser","markdown-report","powershell","web-analytics","windows"],"created_at":"2026-04-22T09:05:55.574Z","updated_at":"2026-04-22T09:05:58.987Z","avatar_url":"https://github.com/AlexRynas.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Access Logs Analytical Parser\n\nA small, self-contained Apache access log analyzer for Windows. It uses a PowerShell script and a simple batch launcher to produce a Markdown report with geo analytics (country/city via Geoapify) and page analytics.\n\n## Features\n\n- Geo analytics by country and city (Geoapify IP Geolocation API)\n- Page analytics: most-viewed pages (index.htm / index.html; also counts .htm/.html)\n- ASCII bar charts rendered in Markdown tables\n- Caches IP → Geo results to reduce API usage\n\n## Prerequisites\n\n- Windows with PowerShell 5.1+ (default on Windows)\n- Geoapify API key (free tier available): https://www.geoapify.com/\n\n## Quick Start\n\n1. Download the ZIP of this GitHub repo and unzip anywhere.\n2. Place your Apache access log files (`*.log`, `*.txt`) into the `logs` folder.\n   - If the folder doesn't exist yet, run the script once; it will create `logs/` and ask you to re-run after adding files.\n3. Double-click `run_report.bat`.\n4. **Optional**: When prompted, enter a partial URL to filter analytics for a specific page (e.g., \"2025SomePage\"), or press Enter to analyze all pages.\n5. If prompted, paste your Geoapify API key. The script will save it to `config.json`.\n6. When done, open the generated report file in the `reports` folder (e.g., `reports/report_2025-11-01_to_2025-11-07.md`).\n\n### Alternative: Run from PowerShell\n\n```powershell\ncd \"d:\\Projects\\Apache-Access-Logs-Analytical-Parser\"\npowershell -ExecutionPolicy Bypass -File \".\\Analyze-ApacheLog.ps1\"\n```\n\nThe script will interactively prompt you for:\n1. **Page filter** (optional) - Enter a partial URL to analyze only specific pages, or press Enter to skip\n2. **Geoapify API key** (if not already saved in `config.json`)\n\n### Optional: Provide API key via environment variable\n\n```powershell\n$env:GEOAPIFY_API_KEY = \"YOUR_GEOAPIFY_KEY\"\npowershell -ExecutionPolicy Bypass -File \".\\Analyze-ApacheLog.ps1\"\n```\n\n## Output Files\n\n- **Report files** – Saved in the `reports/` folder with dynamic names based on the time period and page filter (if used):\n  - `reports/report_2025-11-01_to_2025-11-07.md` (for logs spanning multiple days)\n  - `reports/report_2025-11-27.md` (for logs from a single day)\n  - `reports/report_2025-11-01_to_2025-11-07_2025SomePage.md` (when using page filter)\n- `config.json` – stores your Geoapify API key\n- `ip_cache.json` – caches IP → Country/City to reduce API calls\n\n## Example Report Snippet\n\n```md\n# Apache Access Log Analytics\n\nGenerated at: 2025-11-27 13:00  \nLog folder: ./logs  \nLog files processed: 2\n\n---\n\n## 1. Overview\n\n- Total requests: 4321\n- Unique IPs: 987\n- Time range: 2025-11-01 00:00:09 → 2025-11-07 23:59:59\n- Parsed lines: 4300\n- Skipped lines: 21\n\n---\n\n## 2. Top Countries\n\n| Rank | Country | ISO | Unique IPs | Requests | Bar |\n|------|---------|-----|------------|----------|-----|\n| 1    | Germany | DE  | 120        | 3210     | ########## |\n| 2    | France  | FR  |  95        | 2845     | #######    |\n\n---\n\n## 3. Top Cities\n\n| Rank | Country | City      | Unique IPs | Requests |\n|------|---------|-----------|------------|----------|\n| 1    | Germany | Nuremberg | 45         | 350      |\n| 2    | France  | Paris     | 38         | 290      |\n\n---\n\n## 4. Top Pages (index.htm / index.html)\n\n| Rank | Page (Path)                             | Unique IPs | Pageviews | Bar        |\n|------|-----------------------------------------|------------|-----------|------------|\n| 1    | /SomePage/SomeSubRoute/index.htm        | 123        |  9876     | ########## |\n| 2    | /SomeOtherSite/index.html               |  45        |  1234     | ####       |\n\n---\n\n## 5. Notes\n\n- Geo data powered by Geoapify IP Geolocation API.\n- IP -\u003e Geo results cached in ip_cache.json to reduce API usage.\n```\n\n## Troubleshooting\n\n- \"No log files found\": Ensure your `*.log` or `*.txt` files are in the `logs` folder next to the script.\n- API key prompt keeps appearing: If `config.json` is not writable, you can set the `GEOAPIFY_API_KEY` environment variable instead.\n- Network/Proxy issues: If Geo lookup fails, the script will mark unknown locations and continue. Cached \"Unknown\" entries avoid repeated failing calls.\n\n## Notes\n\n- Paths are relative to the script location, so launching via `run_report.bat` is recommended.\n- Pages include `index.htm`, `index.html`, and other `.htm`/`.html` files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexrynas%2Fapache-access-logs-analytical-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexrynas%2Fapache-access-logs-analytical-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexrynas%2Fapache-access-logs-analytical-parser/lists"}