{"id":21029635,"url":"https://github.com/loafoe/prometheus-envoy-exporter","last_synced_at":"2025-06-18T20:39:13.729Z","repository":{"id":65146320,"uuid":"583630787","full_name":"loafoe/prometheus-envoy-exporter","owner":"loafoe","description":"Prometheus exporter for Enphase Envoy-S Metered gateways","archived":false,"fork":false,"pushed_at":"2025-06-09T06:26:10.000Z","size":141,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-17T23:47:13.017Z","etag":null,"topics":["enphase","enphase-api","enphase-iq-envoy","envoy","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loafoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2022-12-30T11:34:31.000Z","updated_at":"2025-06-06T11:32:03.000Z","dependencies_parsed_at":"2024-06-24T12:15:56.554Z","dependency_job_id":"8cf3af71-457e-445a-a23a-820c8d2a9639","html_url":"https://github.com/loafoe/prometheus-envoy-exporter","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/loafoe/prometheus-envoy-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fprometheus-envoy-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fprometheus-envoy-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fprometheus-envoy-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fprometheus-envoy-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loafoe","download_url":"https://codeload.github.com/loafoe/prometheus-envoy-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fprometheus-envoy-exporter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260630539,"owners_count":23039123,"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","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":["enphase","enphase-api","enphase-iq-envoy","envoy","prometheus-exporter"],"created_at":"2024-11-19T12:13:29.063Z","updated_at":"2025-06-18T20:39:08.715Z","avatar_url":"https://github.com/loafoe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prometheus-envoy-exporter\n\nPrometheus exporter for near Realtime Enphase Envoy-S Metered local readouts\n\n## Features\n\n- Support for new D7 firmware\n- Near real-time refresh of data (default every 20 seconds)\n- Discovery via mDNS\n- Individual micro-inverter data\n- Cloud credentials or JWT token based authentication\n\n## Disclaimer\n\nThis exporter is not endorsed or approved by Enphase. Use at your own risk. \n\n## Compatibility\n\nThe exporter is compatible with newer `D7.x` firmware versions only which uses long lived JWT and short lived sessionId based authentication. Support for older D5.x firmware is not available but should be trivial to add if there is a need.\n\n## Installation\n\nUsing Go 1.19 or newer\n\n```shell\ngo install github.com/loafoe/prometheus-envoy-exporter@latest\n```\n\n## Usage\n\n### Configure environment\n\n| Environment      | Description                              | Required | Default               |\n|------------------|------------------------------------------|----------|-----------------------|\n| `ENVOY_USERNAME` | Username for Enlighten cloud             | N        |                       |\n| `ENVOY_PASSWORD` | Password for Enlighten cloud             | N        |                       |\n| `ENVOY_SERIAL`   | Serial number of the gateway on your LAN | N        |                       |\n| `ENVOY_LISTEN`   | Listen port of the exporter              | N        | `0.0.0.0:8899`        |\n| `ENVOY_ADDRESS`  | Address of the Envoy-S gateway           | N        | `https://envoy.local` |\n| `ENVOY_JWT`      | Long lived JWT token                     | N        |                       |\n| `ENVOY_REFRESH`  | Seconds to wait between refreshing data  | N        | `20`                  |\n\n\u003e When you set only a JWT be sure to refresh it at least once a year, otherwise set your Enlighten Cloud login credentials\n\n\u003e When not setting a serial the exporter will attempt to use `mDNS` to discover the Gateway on your local LAN\n\n### Run exporter\n\n```shell\nprometheus-envoy-exporter\n```\n\n### Output\n\n```\n# HELP envoy_inverter_last_report_watts Generated watts by inverter\n# TYPE envoy_inverter_last_report_watts gauge\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000001\"} 10\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000002\"} 9\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000003\"} 8\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000004\"} 8\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000005\"} 9\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000006\"} 8\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000007\"} 9\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000008\"} 9\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000009\"} 8\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000010\"} 8\nenvoy_inverter_last_report_watts{gateway=\"122220000001\",serial=\"48224000011\"} 8\n# HELP envoy_jwt_refreshes Number of JWT token refreshes during runtime\n# TYPE envoy_jwt_refreshes counter\nenvoy_jwt_refreshes{gateway=\"122220000001\"} 1\n# HELP envoy_production_watts_now Watts being produced now\n# TYPE envoy_production_watts_now gauge\nenvoy_production_watts_now{gateway=\"122220000001\"} 135\n# HELP envoy_production_wh_lifetime Watt-hour generated over lifetime\n# TYPE envoy_production_wh_lifetime gauge\nenvoy_production_wh_lifetime{gateway=\"122220000001\"} 64783\n# HELP envoy_session_refreshes Number of session refreshes during runtime\n# TYPE envoy_session_refreshes gauge\nenvoy_session_refreshes{gateway=\"122220000001\"} 1\n# HELP envoy_session_uses Number of session reuses during runtime\n# TYPE envoy_session_uses gauge\nenvoy_session_uses{gateway=\"122220000001\"} 102\n```\n\n### Ship to prometheus / mimir\n\nYou can use something like Grafana Alloy to ship data to a remote write endpoint. Example:\n\n```alloy\nprometheus.scrape \"metrics_default_envoy_exporter\" {\n\ttargets = [{\n\t\t__address__ = \"localhost:8899\",\n\t}]\n\tforward_to      = [prometheus.remote_write.metrics_default.receiver]\n\tjob_name        = \"envoy_exporter\"\n\tscrape_interval = \"30s\"\n}\n\nprometheus.remote_write \"metrics_default\" {\n\texternal_labels = {\n\t\tenvironment = \"home\",\n\t}\n\n\tendpoint {\n\t\tname = \"mimir\"\n\t\turl  = \"https://some.cloud.com/api/prom/push\"\n\n\t\tbasic_auth {\n\t\t\tusername = \"some_login\"\n\t\t\tpassword = \"some_password\"\n\t\t}\n\n\t}\n}\n```\n\n## License\n\nLicense is MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floafoe%2Fprometheus-envoy-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floafoe%2Fprometheus-envoy-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floafoe%2Fprometheus-envoy-exporter/lists"}