{"id":36790560,"url":"https://github.com/csmith/umami-exporter","last_synced_at":"2026-01-12T13:25:14.036Z","repository":{"id":303843356,"uuid":"1000502228","full_name":"csmith/umami-exporter","owner":"csmith","description":"Prometheus exporter for Umami","archived":false,"fork":false,"pushed_at":"2025-11-26T12:12:12.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-29T10:27:23.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/csmith.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-11T22:19:44.000Z","updated_at":"2025-11-26T12:12:15.000Z","dependencies_parsed_at":"2025-07-10T02:01:37.583Z","dependency_job_id":"fbb429b1-eb8e-464f-b9aa-b887d4159c30","html_url":"https://github.com/csmith/umami-exporter","commit_stats":null,"previous_names":["csmith/umami-exporter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/csmith/umami-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csmith%2Fumami-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csmith%2Fumami-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csmith%2Fumami-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csmith%2Fumami-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csmith","download_url":"https://codeload.github.com/csmith/umami-exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csmith%2Fumami-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-12T13:25:13.934Z","updated_at":"2026-01-12T13:25:14.018Z","avatar_url":"https://github.com/csmith.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Umami Prometheus Exporter\n\nA Prometheus metrics exporter for [Umami](https://umami.is/) website analytics\ndata. This exporter reads directly from Umami's PostgreSQL database to provide\nwebsite statistics as Prometheus metrics.\n\n## Quick Start\n\nRun the exporter using Docker:\n\n```bash\ndocker run -p 8080:8080 \\\n  -e DATABASE_URL=\"postgres://user:password@host:5432/umami?sslmode=require\" \\\n  -e WEBSITE_ID=\"your-website-uuid\" \\\n  ghcr.io/csmith/umami-exporter:latest\n```\n\nMetrics will be available at `http://localhost:8080/metrics`.\n\n## Configuration\n\nThe exporter is configured using environment variables or command-line flags:\n\n| Environment Variable | Flag             | Description                              | Required |\n|----------------------|------------------|------------------------------------------|----------|\n| `DATABASE_URL`       | `--database-url` | PostgreSQL connection string             | Yes      |\n| `WEBSITE_ID`         | `--website-id`   | Umami website UUID to export metrics for | Yes      |\n| `PORT`               | `--port`         | HTTP server port (default: 8080)         | No       |\n| `LOG_LEVEL`          | `--log.level`    | Log level: debug, info, warn, error      | No       |\n| `LOG_FORMAT`         | `--log.format`   | Log format: text, json (default: text)   | No       |\n\n### Database Connection\n\nThe `DATABASE_URL` should be a standard PostgreSQL connection string:\n```\npostgres://username:password@hostname:port/database?sslmode=require\n```\n\n### Website ID\n\nFind your website ID in the Umami admin interface or by querying the `website`\ntable in your database.\n\n## Exported Metrics\n\n### `umami_page_views_total`\nCounter tracking total page views with the following labels:\n- `url_path` - The page path (e.g., `/`, `/about`)\n- `referrer_domain` - Referring domain (empty string for direct visits)\n- `browser` - Browser name (e.g., Chrome, Firefox)\n- `os` - Operating system (e.g., Windows, macOS, Linux)\n- `device` - Device type (e.g., desktop, mobile, tablet)\n- `country` - Two-letter country code (e.g., US, GB, DE)\n\n### `umami_pages_per_visit`\nHistogram showing the distribution of pages viewed per visit, with buckets at\n1, 2, 3, 5, 10, 20, 50, and 100 pages.\n\n## ⚠️ Caveats\n\nThis exporter can generate metrics with very high cardinality due to the\n`url_path` label. If your website has many unique URLs (dynamic paths, query\nparameters, etc.), this could create thousands or millions of unique metric\nseries.\n\nThe exporter queries the entire dataset for the website in question, with no \ntime limit. This may get slower and slower over time.\n\n## Docker Compose Example\n\n```yaml\nservices:\n  umami:\n    # ...\n\n  umami-db:\n    #...\n\n  umami-exporter:\n    image: ghcr.io/csmith/umami-exporter:latest\n    environment:\n      DATABASE_URL: \"postgres://umami:umami@unami-db:5432/umami\"\n      WEBSITE_ID: \"your-website-uuid-here\"\n      LOG_LEVEL: \"info\"\n    depends_on:\n      - unami-db\n```\n\n## Contributions/issues/etc\n\nPull requests and issues are more than welcome. There are probably better ways\nto expose the data, more interesting things that could be exported, and so on.\nI'm open to suggestions!\n\n## Provenance\n\nThis project was primarily created with Claude Code, but with a strong guiding\nhand. It's not \"vibe coded\", but an LLM was still the primary author of most\nlines of code. I believe it meets the same sort of standards I'd aim for with\nhand-crafted code, but some slop may slip through. I understand if you\nprefer not to use LLM-created software, and welcome human-authored alternatives\n(I just don't personally have the time/motivation to do so).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsmith%2Fumami-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsmith%2Fumami-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsmith%2Fumami-exporter/lists"}