{"id":27054751,"url":"https://github.com/tfadeyi/auth0-simple-exporter","last_synced_at":"2025-10-06T08:07:46.140Z","repository":{"id":151007965,"uuid":"612782918","full_name":"tfadeyi/auth0-simple-exporter","owner":"tfadeyi","description":"Simple Prometheus exporter for Auth0 log events","archived":false,"fork":false,"pushed_at":"2024-05-23T08:42:59.000Z","size":1353,"stargazers_count":15,"open_issues_count":6,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-23T09:44:46.240Z","etag":null,"topics":["auth0","metrics","monitoring","observability","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tfadeyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"2023-03-12T00:30:58.000Z","updated_at":"2024-05-27T12:24:24.401Z","dependencies_parsed_at":"2024-02-05T18:28:27.381Z","dependency_job_id":"56db3e3b-d8dc-429a-94ee-321e80514322","html_url":"https://github.com/tfadeyi/auth0-simple-exporter","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/tfadeyi/auth0-simple-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfadeyi%2Fauth0-simple-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfadeyi%2Fauth0-simple-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfadeyi%2Fauth0-simple-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfadeyi%2Fauth0-simple-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tfadeyi","download_url":"https://codeload.github.com/tfadeyi/auth0-simple-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfadeyi%2Fauth0-simple-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278577929,"owners_count":26009703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"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":["auth0","metrics","monitoring","observability","prometheus","prometheus-exporter"],"created_at":"2025-04-05T09:16:56.016Z","updated_at":"2025-10-06T08:07:46.123Z","avatar_url":"https://github.com/tfadeyi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Auth0 Exporter\n\n[![Continuous Integration](https://img.shields.io/github/actions/workflow/status/tfadeyi/auth0-simple-exporter/ci.yml?branch=main\u0026style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/License-Apache_2.0-yellowgreen.svg?style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE)\n[![Language](https://img.shields.io/github/go-mod/go-version/tfadeyi/auth0-simple-exporter?style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter)\n[![GitHub release](https://img.shields.io/github/v/release/tfadeyi/auth0-simple-exporter?color=green\u0026style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter/releases)\n[![Code size](https://img.shields.io/github/languages/code-size/tfadeyi/auth0-simple-exporter?color=orange\u0026style=flat-square)](https://github.com/tfadeyi/auth0-simple-exporter)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tfadeyi/auth0-simple-exporter?style=flat-square)](https://goreportcard.com/report/github.com/tfadeyi/auth0-simple-exporter)\n\n\n\u003cp align=\"center\"\u003e\n\n\n\u003ca href=\"#Installation\"\u003e**Installation**\u003c/a\u003e\n·\n\u003ca href=\"#Usage\"\u003e**Usage**\u003c/a\u003e\n·\n\u003ca href=\"https://github.com/tfadeyi/auth0-simple-exporter/blob/main/docs/metrics.md\"\u003e**Metrics**\u003c/a\u003e\n·\n\u003ca href=\"https://github.com/tfadeyi/auth0-simple-exporter/issues\"\u003e**Report Bug**\u003c/a\u003e\n\n\n\u003c/p\u003e\n\u003c/div\u003e\n\n---\n\nA simple Prometheus exporter for [Auth0](https://auth0.com/) log [events](https://auth0.com/docs/api/management/v2#!/Logs/get_logs),\nwhich allows you to collect metrics from Auth0 and expose them in a format that can be consumed by Prometheus.\n\n## Motivation\n\nIt can be difficult to monitor **Auth0** tenant events on a Prometheus stack,\nespecially compared to other monitoring systems such as Datadog.\nThis Prometheus exporter aims to simplify this, making it easier to expose tenant events.\n\n## Prerequisites\n\n* [Auth0](https://auth0.com/) account.\n* Auth0 tenant [management API](https://auth0.com/docs/api#management-api) client credentials.\n  * Required Grants: `read:users` or `read:user_idp_tokens`,`read:clients` or `read:client_keys`,`read:logs`\n* *(Optional)* Auth0 tenant management API [static token](https://auth0.com/docs/secure/tokens/access-tokens/management-api-access-tokens).\n\n## Super TL;DR\nIf you just want to try the exporter locally without installation, you can do so by using Nix.\n\n```shell\nnix run github:tfadeyi/auth0-simple-exporter export -- --tls.disabled\n```\n\n## TL;DR\n\nThe quickest way to install the exporter is through Helm, make sure you have your Auth0 credentials at hand.\n\n```shell\nexport TOKEN=\"\u003c auth0 management API static static token \u003e\"\nexport DOMAIN=\"\u003c auth0 tenant domain \u003e\"\n```\n```shell\n  # Installing by passing in secret directly\n  helm repo add auth0-exporter https://tfadeyi.github.io/auth0-simple-exporter\n  helm upgrade prod auth0-exporter/auth0-exporter --install --create-namespace -n auth0-exporter \\\n  --set auth0.domain=\"$DOMAIN\" --set auth0.token=\"$TOKEN\" --set exporter.tls.disabled=true\n```\nThis will install the exporter running with TLS disabled.\n\n## Installation\n\n* ### Download Pre-built Binaries\n\n    Binaries can be downloaded from [Releases](https://github.com/tfadeyi/auth0-simple-exporter/releases) page.\n  * Download and run exporter's binary with TLS disabled.\n\n    ```shell\n    export TOKEN=\"\u003c auth0 management API static static token \u003e\"\n    export DOMAIN=\"\u003c auth0 tenant domain \u003e\"\n\n    curl -LJO https://github.com/tfadeyi/auth0-simple-exporter/releases/download/v0.0.2/auth0-simple-exporter-linux-amd64.tar.gz \u0026\u0026 \\\n    tar -xzvf auth0-simple-exporter-linux-amd64.tar.gz \u0026\u0026 \\\n    cd auth0-simple-exporter-linux-amd64\n\n    ./auth0-simple-exporter export --tls.disabled\n    ```\n* ### Docker\n    The recommended way to get the Docker Image is to pull the prebuilt image from the project's Github Container Registry.\n    ```shell\n    $ docker pull ghcr.io/tfadeyi/auth0-simple-exporter:latest\n    ```\n    To use a specific version, you can pull a versioned tag.\n    ```shell\n    $ docker pull ghcr.io/tfadeyi/auth0-simple-exporter:[TAG]\n    ```\n \n* ### Docker compose\nTo integrate the exporter with Docker Compose, follow these steps:\n\n- Create a ```.env``` file (ideally named to match the tenant, e.g., .env.tenant1) and define the following variables:\n```\nTOKEN=\u003c auth0 management API static static token \u003e\nDOMAIN=\u003c auth0 tenant domain \u003e\"\nCLIENT_SECRET=\u003cauth0 management API client-secret\u003e\nCLIENT_ID=\u003cauth0 management API client-id\u003e\n```\n\n- Update your ```docker-compose.yaml``` file to include the exporter as a service. Below is an example configuration for a single exporter setup:\n```\nservices:\n  metric-exporter:\n    image: ghcr.io/tfadeyi/auth0-simple-exporter:latest\n    container_name: metric-exporter\n    env_file:\n      - .env.tenant1\n    command: export --tls.disabled\n    ports:\n      - \"9301:9301\"\n```\n\n- For a multi-tenant setup, you can configure multiple exporter services pointing to different ```.env``` files:\n```\nservices:\n  metric-exporter:\n    image: ghcr.io/tfadeyi/auth0-simple-exporter:latest\n    container_name: metric-exporter\n    env_file:\n      - .env\n    command: export --tls.disabled\n    ports:\n      - \"9301:9301\"\n  \n  metric-exporter2:\n    image: ghcr.io/tfadeyi/auth0-simple-exporter:latest\n    container_name: metric-exporter2\n    env_file:\n      - .env.tenant1\n    command: export --tls.disabled\n    ports:\n      - \"9302:9301\"\n```\n\n- Configure Prometheus to scrape metrics from the exporters. Below is an example ```prometheus.yaml``` configuration (this assumes you are running Prometheus in the same docker network as the exporter):\n```\n  - job_name: auth0_exporter1\n    metrics_path: /metrics\n    static_configs:\n      - targets: ['metric-exporter:9301']\n    relabel_configs:\n      - source_labels: [ __address__ ]\n        target_label: __param_target\n      - source_labels: [ __param_target ]\n        target_label: instance\n      - target_label: __address__\n        replacement: metric-exporter:9301\n  \n  - job_name: auth0_exporter2\n    metrics_path: /metrics\n    static_configs:\n      - targets: ['metric-exporter2:9302']\n    relabel_configs:\n      - source_labels: [ __address__ ]\n        target_label: __param_target\n      - source_labels: [ __param_target ]\n        target_label: instance\n      - target_label: __address__\n        replacement: metric-exporter2:9302\n```\n\n* ### Helm\n    This shows a simple installation of the exporter helm chart, running with TLS disabled.\n    ```shell\n    export TOKEN=\"\u003c auth0 management API static static token \u003e\"\n    export DOMAIN=\"\u003c auth0 tenant domain \u003e\"\n    ```\n    ```shell\n    # Installing by passing in secret directly\n    helm repo add auth0-exporter https://tfadeyi.github.io/auth0-simple-exporter\n    helm upgrade --install --create-namespace -n auth0-exporter auth0-exporter/auth0-exporter \\\n      --set auth0.domain=\"$DOMAIN\" --set auth0.token=\"$TOKEN\" \\\n      --set exporter.tls.disabled=true\n    ```\n\n    More info on the helm deployment can be found [here](deploy/charts/auth0-exporter/README.md).\n\n* ### Build from source\n    From the repository root directory run:\n    ```shell\n    make build\n    # or for multiple systems\n    make build-all-platforms\n    ```\n\n* ### Nix\n    The exporter can be used via Nix.\n    ```shell\n    nix run github:tfadeyi/auth0-simple-exporter export -- --tls.disabled\n    ```\n\n* ### Octopus Deploy\n    You can use `Octopus Deploy` to the deploy the exporter to your cluster.\n    Simply add the following as the Feed URL.\n  ```text\n  https://tfadeyi.github.io/auth0-simple-exporter\n  ```\n\n## Usage\n\n```\nUsage:\n  exporter export [flags]\n\nFlags:\n      --auth0.client-id string       Auth0 management api client-id.\n      --auth0.client-secret string   Auth0 management api client-secret.\n      --auth0.domain string          Auth0 tenant's domain. (i.e: \u003ctenant_name\u003e.eu.auth0.com).\n      --auth0.from string            Point in time from were to start fetching auth0 logs. (format: RFC3339) (default Now)\n      --auth0.token string           Auth0 management api static token. (the token can be used instead of client credentials).\n  -h, --help                         help for export\n      --log.level string             Exporter log level (debug, info, warn, error). (default \"warn\")\n      --namespace string             Exporter's namespace.\n      --pprof.enabled                Enabled pprof profiling on the exporter on port :6060. (help: https://jvns.ca/blog/2017/09/24/profiling-go-with-pprof/).\n      --pprof.listen-address int     Port where the pprof webserver will listen on. (default 6060)\n      --probe.listen-address int     Port where the probe webserver will listen on. (default 8081)\n      --probe.path string            URL Path under which to expose the probe metrics. (default \"probe\")\n      --subsystem string             Exporter's subsystem.\n      --tls.auto                     Allow the exporter to use autocert to renew its certificates with letsencrypt.\n                                     (Can only be used if the exporter is publicly accessible by the internet)\n      --tls.cert-file string         Path to the PEM encoded certificate for the auth0-exporter metrics to serve.\n      --tls.disabled                 Run exporter without TLS. TLS is enabled by default.\n      --tls.hosts strings            The different allowed hosts for the exporter. Only works when --tls.auto has been enabled.\n      --tls.key-file string          Path to the PEM encoded key for the auth0-exporter metrics server.\n      --web.listen-address int       Port where the exporter webserver will listen on. (default 8080)\n      --web.path string              URL Path under which to expose the collected auth0 metrics. (default \"metrics\")\n```\n\n### Environment variables:\n* ***TOKEN***, Auth0 management API static token.\n* ***DOMAIN***, Auth0 tenant domain.\n* ***CLIENT_SECRET***, Auth0 management API client-secret, (not required if setting the token).\n* ***CLIENT_ID***, Auth0 management API client-id, (not required if setting the token).\n\n## Example queries\n\nMonitor the percentage of failed logins in the Auth0 tenant:\n\n```\n(tenant_failed_login_operations_total / tenant_login_operations_total) * 100\n```\n\nMonitor the number current logged-in users for a client application in Auth0 tenant:\n\n```\n(tenant_login_operations_total{client=\"ChatGPT\"} - tenant_failed_login_operations_total{client=\"ChatGPT\"}) - (tenant_logout_operations_total{client=\"ChatGPT\"} - tenant_failed_logout_operations_total{client=\"ChatGPT\"})\n```\n\n## Metrics\n\n### Signup\n| Metric                                   | Meaning                                             | Labels |\n|------------------------------------------|-----------------------------------------------------|--------|\n| `tenant_sign_up_operations_total`        | The total number of signup operations.              | client |\n| `tenant_failed_sign_up_operations_total` | The number of failed signup operations. (codes: fs) | client |\n\n### Login\n| Metric                                 | Meaning                                                 | Labels |\n|----------------------------------------|---------------------------------------------------------|--------|\n| `tenant_login_operations_total`        | The total number of login operations.                   | client |\n| `tenant_failed_login_operations_total` | The number of failed login operations. (codes: f,fp,fu) | client |\n\n### Logout\n| Metric                                  | Meaning                                              | Labels |\n|-----------------------------------------|------------------------------------------------------|--------|\n| `tenant_logout_operations_total`        | The total number of logout operations.               | client |\n| `tenant_failed_logout_operations_total` | The number of failed logout operations. (codes: flo) | client |\n\n**The other exposed metrics can be found [here](./docs/metrics.md).**\n\n## Known Issues\n\n* ### API Rate Limits\n  When the Prometheus scraping job interval is too frequent the exporter might encounter api-rate limit from Auth0.\n  To mitigate this try increasing the scraping interval for the job.\n\n* ### Not all logs/events are available\n  Currently, not all logs/events from Auth0 are exposed, if a metric is not exposed, feel free to open a feature request.\n\n## Prometheus\n\nExample Prometheus configuration for the exporter. Replace `AUTH0-EXPORTER-HOSTNAME` with your instance's hostname.\n```yaml\nscrape_configs:\n  - job_name: auth0_exporter\n    metrics_path: /metrics\n    static_configs:\n      - targets: ['\u003c\u003cAUTH0-EXPORTER-HOSTNAME\u003e\u003e:9301']\n    relabel_configs:\n      - source_labels: [ __address__ ]\n        target_label: __param_target\n      - source_labels: [ __param_target ]\n        target_label: instance\n      - target_label: __address__\n        replacement: \u003c\u003cAUTH0-EXPORTER-HOSTNAME\u003e\u003e:9301\n```\n\n## Development\n\n#### Makefile\n\nSimilar to other Golang projects, this projects makes use of make for building and testing the source code.\n\n#### Nix\nBefore start development, add your tenant's Auth0 credentials to the `env-dev.sh`, this help when developing using Nix.\nOnce the credentials are added, you can start the development environment by:\n```shell\n$ source env-dev.sh\n$ develop\n```\nThis will boot up a Nix devshell with the need tools and information.\n\n## Contributing\n\n**Everyone** is welcome to contribute to the project.\n\nPlease see [CONTRIBUTING.md](.github/CONTRIBUTING.md) for information on how to get started.\n\nFeedback is always appreciated, whether it's a bug or feature request, feel free to open an issue using one of the templates.\n\n## License\nApache 2.0, see [LICENSE.md](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfadeyi%2Fauth0-simple-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftfadeyi%2Fauth0-simple-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfadeyi%2Fauth0-simple-exporter/lists"}