Skip to main content

SEO crawl-audit Streamlit dashboard for nginx-ingress Googlebot logs

Project description

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:

  1. Crawl budget distribution – how hits are spread across page types vs how URLs are spread across page types.
  2. Orphan pages – URLs Googlebot is hitting that are not in your sitemap.
  3. Status-code waste – non-200 ratio per page type, redirect chains.
  4. Stale high-value pages – sitemap URLs not crawled in the last N days.
  5. Performance – page-size vs latency vs hit frequency.
  6. Bot verification – verified Googlebot vs spoofed User-Agents.
  7. 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:

  1. Upload your Grafana/Loki export (.json, .csv, or .txt).
  2. Paste your sitemap URL (a sitemap index works too).
  3. Optionally upload a page_patterns.yaml (see src/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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seo_log_auditor-0.1.2.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seo_log_auditor-0.1.2-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file seo_log_auditor-0.1.2.tar.gz.

File metadata

  • Download URL: seo_log_auditor-0.1.2.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for seo_log_auditor-0.1.2.tar.gz
Algorithm Hash digest
SHA256 546666d2cfff40c20a8afa42b69dbfa5738dc62ffa486a9f493224d922d6c006
MD5 7335fd2440b6c00cb3710d7aed386325
BLAKE2b-256 80346d55a7066c1639a99d8480b99d528bba19240829f3102a41620429881f48

See more details on using hashes here.

File details

Details for the file seo_log_auditor-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: seo_log_auditor-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for seo_log_auditor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4bfea653dba3e470c3219068c9b08950e53f818ec282e30eff9ab21f8dffa82c
MD5 4493ffeca4bd1c2e12b33162da28e4db
BLAKE2b-256 0b92552509a83382c20fe011666e16e884d7cc22e4a3e517539ab62e7eb5768c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page