seo-log-auditor
Streamlit dashboard that ingests a 30-day Grafana/Loki export of nginx-ingress Googlebot logs and runs seven SEO crawl-audit techniques on it:
- Crawl budget distribution – how hits are spread across page types vs how URLs are spread across page types.
- Orphan pages – URLs Googlebot is hitting that are not in your sitemap.
- Status-code waste – non-200 ratio per page type, redirect chains.
- Stale high-value pages – sitemap URLs not crawled in the last N days.
- Performance – page-size vs latency vs hit frequency.
- Bot verification – verified Googlebot vs spoofed User-Agents.
- Parameter traps – paths with an explosive number of query-string variants.
Quick start
Zero-install via uv:
uvx seo-log-auditor
Or install into the current environment:
pip install seo-log-auditor
seo-log-auditor
Either command launches the dashboard at http://localhost:8501. To pass flags through to Streamlit:
seo-log-auditor --server.port 9000 --server.headless true
Then in the sidebar:
- Upload your Grafana/Loki export (
.json,.csv, or.txt). - Paste your sitemap URL (a sitemap index works too).
- Optionally upload a
page_patterns.yaml(seesrc/seo_log_auditor/config/page_patterns.example.yaml).
Exporting logs from Grafana
Use this LogQL query in Grafana Explore against your Loki datasource:
{app="ingress-nginx"} |= "Googlebot"
Set the time range to last 30 days and download as JSON (best fidelity)
or CSV. Plain .txt (one log line per row) also works.
Page-pattern config
src/seo_log_auditor/config/page_patterns.example.yaml is the starting point.
First match wins. Edit it for your URL structure and re-upload via the
sidebar. Tagging traps like paginated and faceted as their own page types
makes leakage immediately visible on the Crawl Budget page.
Development
git clone https://github.com/hitensangani/seo-log-auditor.git
cd seo-log-auditor
uv sync --extra dev
uv run streamlit run src/seo_log_auditor/app.py
Project layout
src/seo_log_auditor/
app.py # Streamlit entry, sidebar uploads, KPI overview
cli.py # `seo-log-auditor` console script
pages/ # Multipage app, one file per technique
config/ # Example page-pattern rules
parsers.py # Loki JSON / CSV / nginx-text -> DataFrame
classify.py # Regex-based URL -> page_type
sitemap.py # Fetch + parse sitemap.xml (incl. index)
verify_bot.py # Google IP ranges + cached reverse DNS
analysis/ # One module per technique
tests/ # pytest fixtures + unit tests
Running tests
uv run pytest
Roadmap
- Internal-link-depth correlation (technique 4 deeper layer) once you have a Screaming Frog / Sitebulb export.
- Direct Loki API streaming so you don't need to download files.
- SQLite cache for week-over-week comparisons.
License
MIT — see LICENSE.
Metadata
Release files for seo-log-auditor 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| seo_log_auditor-0.1.2.tar.gz | 30.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seo_log_auditor-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 69.2 kB
Release files / seo_log_auditor-0.1.2.tar.gz
| Download URL | seo_log_auditor-0.1.2.tar.gz |
|---|---|
| Size | 30.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
546666d2cfff40c20a8afa42b69dbfa5738dc62ffa486a9f493224d922d6c006
|
|
BLAKE2b-256 checksum How to use checksums |
80346d55a7066c1639a99d8480b99d528bba19240829f3102a41620429881f48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / seo_log_auditor-0.1.2-py3-none-any.whl
| Download URL | seo_log_auditor-0.1.2-py3-none-any.whl |
|---|---|
| Size | 38.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4bfea653dba3e470c3219068c9b08950e53f818ec282e30eff9ab21f8dffa82c
|
|
BLAKE2b-256 checksum How to use checksums |
0b92552509a83382c20fe011666e16e884d7cc22e4a3e517539ab62e7eb5768c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|