{"id":16225641,"url":"https://github.com/lasuillard/1password-exporter","last_synced_at":"2025-09-06T10:33:48.176Z","repository":{"id":255472839,"uuid":"834813362","full_name":"lasuillard/1password-exporter","owner":"lasuillard","description":"1Password personal (not Connect) usage exporter.","archived":false,"fork":false,"pushed_at":"2025-09-02T03:39:18.000Z","size":379,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-02T05:26:38.344Z","etag":null,"topics":["1password","1password-cli","docker","prometheus-exporter"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/lasuillard/1password-exporter","language":"Rust","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/lasuillard.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}},"created_at":"2024-07-28T12:48:38.000Z","updated_at":"2025-09-02T03:38:54.000Z","dependencies_parsed_at":"2024-10-27T20:34:05.030Z","dependency_job_id":"dcf2e90b-0d30-4b7c-8a51-6ed6edf58099","html_url":"https://github.com/lasuillard/1password-exporter","commit_stats":null,"previous_names":["lasuillard/1password-exporter"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/lasuillard/1password-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasuillard%2F1password-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasuillard%2F1password-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasuillard%2F1password-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasuillard%2F1password-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lasuillard","download_url":"https://codeload.github.com/lasuillard/1password-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lasuillard%2F1password-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273892816,"owners_count":25186560,"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-09-06T02:00:13.247Z","response_time":2576,"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":["1password","1password-cli","docker","prometheus-exporter"],"created_at":"2024-10-10T12:45:48.212Z","updated_at":"2025-09-06T10:33:48.165Z","avatar_url":"https://github.com/lasuillard.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 1password-exporter\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![CI](https://github.com/lasuillard/1password-exporter/actions/workflows/ci.yaml/badge.svg)](https://github.com/lasuillard/1password-exporter/actions/workflows/ci.yaml)\n[![codecov](https://codecov.io/gh/lasuillard/1password-exporter/graph/badge.svg?token=WTWCSXEMSR)](https://codecov.io/gh/lasuillard/1password-exporter)\n\n1Password personal (not Connect) usage exporter.\n\n## ℹ️ About\n\nThis project is hobby-dev Prometheus metrics exporter for 1Password built with Rust. It collects several metrics via `op` CLI.\n\n## 📦 Installation\n\nThe exporter provides download option as binary and Docker image.\n\n### ⌨️ Using binary CLI\n\n\u003e [!NOTE]\n\u003e You should have 1Password CLI (`op`) installed in your machine and reachable to binary work.\n\nTo use binary, download it from releases and run:\n\n```bash\n$ OP_EXPORTER_VERSION=\"0.2.1\" wget -qO ./onepassword-exporter \"https://github.com/lasuillard/1password-exporter/releases/download/${OP_EXPORTER_VERSION}/onepassword-exporter-x86_64-unknown-linux-musl\"\n$ chmod +x ./onepassword-exporter\n$ ./onepassword-exporter --help\nA simple Prometheus exporter for the 1Password\n\nUsage: onepassword-exporter [OPTIONS]\n\nOptions:\n      --log-level \u003cLOG_LEVEL\u003e\n          Log level [default: INFO]\n      --host \u003cHOST\u003e\n          Host to bind the server to [default: 127.0.0.1]\n  -p, --port \u003cPORT\u003e\n          Port to bind the server to [default: 9999]\n  -m, --metrics \u003cMETRICS\u003e...\n          Metrics to collect. Only metrics not consuming API rate enabled by default [default: account group user service-account build-info] [possible values: account, build-info, group, service-account, user, document, item, vault]\n      --op-path \u003cOP_PATH\u003e\n          Path to 1Password CLI binary [default: op]\n      --service-account-token \u003cSERVICE_ACCOUNT_TOKEN\u003e\n          Service account token to pass to the 1Password CLI\n  -h, --help\n          Print help\n  -V, --version\n          Print version\n```\n\n### 🐳 Using Docker\n\nThe recommended launch option is using Docker. The image already includes OP CLI.\n\n```bash\n$ export OP_SERVICE_ACCOUNT_TOKEN=\"ops_ey...\"\n$ docker container run -it --rm -e OP_SERVICE_ACCOUNT_TOKEN -p 9999:9999 --init lasuillard/1password-exporter:latest\nUnable to find image 'lasuillard/1password-exporter:latest' locally\nlatest: Pulling from lasuillard/1password-exporter\nefc2b5ad9eec: Already exists\nd00da3091ee5: Already exists\n025e24e306b3: Already exists\ned3747246b1e: Already exists\ne912f870d942: Already exists\nDigest: sha256:12765cd3062e67fe751953ff48b6a9a5a4f3b8385616c07ef294583e27e2c539\nStatus: Downloaded newer image for lasuillard/1password-exporter:latest\n11:56:16 [INFO] Enabled metrics: [Account, Group, User, ServiceAccount, BuildInfo]\n11:56:16 [INFO] Using 1Password CLI: op\n11:56:16 [INFO] Listening on http://0.0.0.0:9999\n```\n\nNow metrics served at `http://localhost:9999/metrics`. You can find more, such as example Grafana dashboard, at [examples](/examples) directory.\n\n## 📏 Available Metrics\n\nHere is full example of available metrics, with all metrics enabled:\n\n```text\n# HELP op_account_current Current 1Password account information.\n# TYPE op_account_current gauge\nop_account_current{created_at=\"2023-03-19T05:06:27Z\",domain=\"my\",id=\"??????????????????????????\",name=\"**********\",state=\"ACTIVE\",type=\"FAMILY\"} 1\n# HELP op_document_count_per_tag Number of documents per tag.\n# TYPE op_document_count_per_tag gauge\nop_document_count_per_tag{tag=\"test\"} 4\n# HELP op_document_count_per_vault Number of documents per vault.\n# TYPE op_document_count_per_vault gauge\nop_document_count_per_vault{vault=\"36vhq4xz3r6hnemzadk33evi4a\"} 4\n# HELP op_document_count_total Total number of documents.\n# TYPE op_document_count_total gauge\nop_document_count_total 4\n# HELP op_document_file_size_per_tag_bytes Size of file in documents per tag, in bytes.\n# TYPE op_document_file_size_per_tag_bytes gauge\nop_document_file_size_per_tag_bytes{tag=\"test\"} 10494986\n# HELP op_document_file_size_per_vault_bytes Size of file in documents per vault, in bytes.\n# TYPE op_document_file_size_per_vault_bytes gauge\nop_document_file_size_per_vault_bytes{vault=\"36vhq4xz3r6hnemzadk33evi4a\"} 10494986\n# HELP op_exporter_buildinfo Build information of this exporter.\n# TYPE op_exporter_buildinfo gauge\nop_exporter_buildinfo{version=\"0.4.2\"} 1\n# HELP op_group_count_total Total number of groups.\n# TYPE op_group_count_total gauge\nop_group_count_total 4\n# HELP op_item_count_per_category Number of items per category.\n# TYPE op_item_count_per_category gauge\nop_item_count_per_category{category=\"DOCUMENT\"} 1\nop_item_count_per_category{category=\"LOGIN\"} 2\nop_item_count_per_category{category=\"SECURE_NOTE\"} 1\nop_item_count_per_category{category=\"SSH_KEY\"} 1\n# HELP op_item_count_per_tag Number of items per tag.\n# TYPE op_item_count_per_tag gauge\nop_item_count_per_tag{tag=\"dev\"} 1\nop_item_count_per_tag{tag=\"test\"} 4\n# HELP op_item_count_per_vault Number of items per vault.\n# TYPE op_item_count_per_vault gauge\nop_item_count_per_vault{vault=\"36vhq4xz3r6hnemzadk33evi4a\"} 5\n# HELP op_item_count_total Total number of items.\n# TYPE op_item_count_total gauge\nop_item_count_total 5\n# HELP op_serviceaccount_ratelimit_limit API rate limit.\n# TYPE op_serviceaccount_ratelimit_limit gauge\nop_serviceaccount_ratelimit_limit{action=\"read\",type=\"token\"} 1000\nop_serviceaccount_ratelimit_limit{action=\"read_write\",type=\"account\"} 1000\nop_serviceaccount_ratelimit_limit{action=\"write\",type=\"token\"} 100\n# HELP op_serviceaccount_ratelimit_remaining API rate limit remaining.\n# TYPE op_serviceaccount_ratelimit_remaining gauge\nop_serviceaccount_ratelimit_remaining{action=\"read\",type=\"token\"} 999\nop_serviceaccount_ratelimit_remaining{action=\"read_write\",type=\"account\"} 999\nop_serviceaccount_ratelimit_remaining{action=\"write\",type=\"token\"} 100\n# HELP op_serviceaccount_ratelimit_reset_seconds API rate limit remaining.\n# TYPE op_serviceaccount_ratelimit_reset_seconds gauge\nop_serviceaccount_ratelimit_reset_seconds{action=\"read\",type=\"token\"} 308\nop_serviceaccount_ratelimit_reset_seconds{action=\"read_write\",type=\"account\"} 83108\nop_serviceaccount_ratelimit_reset_seconds{action=\"write\",type=\"token\"} 0\n# HELP op_serviceaccount_ratelimit_used API rate limit used.\n# TYPE op_serviceaccount_ratelimit_used gauge\nop_serviceaccount_ratelimit_used{action=\"read\",type=\"token\"} 1\nop_serviceaccount_ratelimit_used{action=\"read_write\",type=\"account\"} 1\nop_serviceaccount_ratelimit_used{action=\"write\",type=\"token\"} 0\n# HELP op_serviceaccount_whoami Current service account information.\n# TYPE op_serviceaccount_whoami gauge\nop_serviceaccount_whoami{account_uuid=\"++++++++++++++++++++++++++\",url=\"https://my.1password.com\",user_type=\"SERVICE_ACCOUNT\",user_uuid=\"!!!!!!!!!!!!!!!!!!!!!!!!!!\"} 1\n# HELP op_user_count_total Total number of users.\n# TYPE op_user_count_total gauge\nop_user_count_total 1\n# HELP op_vault_count_total Total number of vaults.\n# TYPE op_vault_count_total gauge\nop_vault_count_total 1\n```\n\n## ⚠️ Limitations\n\nDue to how the OP CLI and the exporter works, there are several known limitations:\n\n- Exporter can collect metrics from vaults SA has read access.\n- Any newly created vaults won't be tracked because 1Password does not support automatic access grant for SA to newly created vaults. If you added new vault, you should create new SA and update the SA token.\n- Some vaults (e.g. Private) is impossible to share with SA, therefore metrics for those vaults cannot be collected.\n\n## 💖 Contributing\n\nPlease submit issues or pull requests for questions, bugs, or requests for new features.\n\n## 📜 License\n\nThis project is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flasuillard%2F1password-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flasuillard%2F1password-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flasuillard%2F1password-exporter/lists"}