{"id":14978084,"url":"https://github.com/d3vilh/openvpn_exporter_v1","last_synced_at":"2025-04-10T01:33:26.149Z","repository":{"id":131707975,"uuid":"564968081","full_name":"d3vilh/openvpn_exporter_v1","owner":"d3vilh","description":"OpenVPN Prometheus exporter","archived":false,"fork":false,"pushed_at":"2023-07-19T20:53:43.000Z","size":2766,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T03:11:35.242Z","etag":null,"topics":["golang","openvpn","prometheus-exporter","raspberry","raspberry-pi","raspberry-pi-4"],"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/d3vilh.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}},"created_at":"2022-11-11T23:57:31.000Z","updated_at":"2024-08-02T19:27:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"e06847f0-aa9d-4e85-9f13-44a47643fcbc","html_url":"https://github.com/d3vilh/openvpn_exporter_v1","commit_stats":null,"previous_names":["d3vilh/openvpn_exporter"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3vilh%2Fopenvpn_exporter_v1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3vilh%2Fopenvpn_exporter_v1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3vilh%2Fopenvpn_exporter_v1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3vilh%2Fopenvpn_exporter_v1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d3vilh","download_url":"https://codeload.github.com/d3vilh/openvpn_exporter_v1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140830,"owners_count":21054355,"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":["golang","openvpn","prometheus-exporter","raspberry","raspberry-pi","raspberry-pi-4"],"created_at":"2024-09-24T13:56:50.547Z","updated_at":"2025-04-10T01:33:26.116Z","avatar_url":"https://github.com/d3vilh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openvpn_exporter\n\n\nPrometheus exporter for openvpn. Exposes the metrics from [openvpn status file](https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/) - supports status-version 1-3\n\n## Build Docker image:\n`docker build --force-rm=true -t openvpn_exporter .`\n\n\n## Usage\n\n```shell script\n$ ./bin/openvpn_exporter -h\n\nGLOBAL OPTIONS:\n   --web.address value, --web.listen-address value  Address to bind the metrics server (default: \"0.0.0.0:9176\") [$OPENVPN_EXPORTER_WEB_ADDRESS]\n   --web.path value, --web.telemetry-path value     Path to bind the metrics server (default: \"/metrics\") [$OPENVPN_EXPORTER_WEB_PATH]\n   --web.root value                                 Root path to exporter endpoints (default: \"/\") [$OPENVPN_EXPORTER_WEB_ROOT]\n   --status-file value                              The OpenVPN status file(s) to export (example test:./example/version1.status ) [$OPENVPN_EXPORTER_STATUS_FILE]\n   --disable-client-metrics                         Disables per client (bytes_received, bytes_sent, connected_since) metrics (default: false) [$OPENVPN_EXPORTER_DISABLE_CLIENT_METRICS]\n   --enable-golang-metrics                          Enables golang and process metrics for the exporter)  (default: false) [$OPENVPN_EXPORTER_ENABLE_GOLANG_METRICS]\n   --log.level value                                Only log messages with given severity (default: \"info\") [$OPENVPN_EXPORTER_LOG_LEVEL]\n   --help, -h                                       Show help (default: false)\n   --version, -v                                    Prints the current version (default: false)\n```\n\n### Example metrics\n\n```\n# HELP openvpn_build_info A metric with a constant '1' value labeled by version information\n# TYPE openvpn_build_info gauge\nopenvpn_build_info{date=\"20200503\",go=\"go1.14.2\",revision=\"f84a7a5\",version=\"f84a7a5\"} 1\n# HELP openvpn_bytes_received Amount of data received via the connection\n# TYPE openvpn_bytes_received gauge\nopenvpn_bytes_received{common_name=\"test1@localhost\",server=\"v2\"} 3871\nopenvpn_bytes_received{common_name=\"test1@localhost\",server=\"v3\"} 3871\nopenvpn_bytes_received{common_name=\"test@localhost\",server=\"v2\"} 3860\nopenvpn_bytes_received{common_name=\"test@localhost\",server=\"v3\"} 3860\nopenvpn_bytes_received{common_name=\"user1\",server=\"v1\"} 7.883858e+06\nopenvpn_bytes_received{common_name=\"user2\",server=\"v1\"} 1.6732e+06\nopenvpn_bytes_received{common_name=\"user3@test.de\",server=\"v1\"} 1.9602844e+07\nopenvpn_bytes_received{common_name=\"user4\",server=\"v1\"} 582207\n# HELP openvpn_bytes_sent Amount of data sent via the connection\n# TYPE openvpn_bytes_sent gauge\nopenvpn_bytes_sent{common_name=\"test1@localhost\",server=\"v2\"} 3924\nopenvpn_bytes_sent{common_name=\"test1@localhost\",server=\"v3\"} 3924\nopenvpn_bytes_sent{common_name=\"test@localhost\",server=\"v2\"} 3688\nopenvpn_bytes_sent{common_name=\"test@localhost\",server=\"v3\"} 3688\nopenvpn_bytes_sent{common_name=\"user1\",server=\"v1\"} 7.76234e+06\nopenvpn_bytes_sent{common_name=\"user2\",server=\"v1\"} 2.065632e+06\nopenvpn_bytes_sent{common_name=\"user3@test.de\",server=\"v1\"} 2.3599532e+07\nopenvpn_bytes_sent{common_name=\"user4\",server=\"v1\"} 575193\n# HELP openvpn_collection_error Error occured during collection\n# TYPE openvpn_collection_error counter\nopenvpn_collection_error{server=\"wrong\"} 5\n# HELP openvpn_connected_since Unixtimestamp when the connection was established\n# TYPE openvpn_connected_since gauge\nopenvpn_connected_since{common_name=\"test1@localhost\",server=\"v2\"} 1.58825494e+09\nopenvpn_connected_since{common_name=\"test1@localhost\",server=\"v3\"} 1.58825494e+09\nopenvpn_connected_since{common_name=\"test@localhost\",server=\"v2\"} 1.588254938e+09\nopenvpn_connected_since{common_name=\"test@localhost\",server=\"v3\"} 1.588254938e+09\nopenvpn_connected_since{common_name=\"user1\",server=\"v1\"} 1.587551802e+09\nopenvpn_connected_since{common_name=\"user2\",server=\"v1\"} 1.587551812e+09\nopenvpn_connected_since{common_name=\"user3@test.de\",server=\"v1\"} 1.587552165e+09\nopenvpn_connected_since{common_name=\"user4\",server=\"v1\"} 1.587551814e+09\n# HELP openvpn_connections Amount of currently connected clients\n# TYPE openvpn_connections gauge\nopenvpn_connections{server=\"v1\"} 4\nopenvpn_connections{server=\"v2\"} 2\nopenvpn_connections{server=\"v3\"} 2\n# HELP openvpn_last_updated Unix timestamp when the last time the status was updated\n# TYPE openvpn_last_updated gauge\nopenvpn_last_updated{server=\"v1\"} 1.587665671e+09\nopenvpn_last_updated{server=\"v2\"} 1.588254944e+09\nopenvpn_last_updated{server=\"v3\"} 1.588254944e+09\n# HELP openvpn_max_bcast_mcast_queue_len MaxBcastMcastQueueLen of the server\n# TYPE openvpn_max_bcast_mcast_queue_len gauge\nopenvpn_max_bcast_mcast_queue_len{server=\"v1\"} 5\nopenvpn_max_bcast_mcast_queue_len{server=\"v2\"} 0\nopenvpn_max_bcast_mcast_queue_len{server=\"v3\"} 0\n# HELP openvpn_server_info A metric with a constant '1' value labeled by version information\n# TYPE openvpn_server_info gauge\nopenvpn_server_info{arch=\"unknown\",server=\"v1\",version=\"unknown\"} 1\nopenvpn_server_info{arch=\"x86_64-pc-linux-gnu\",server=\"v2\",version=\"2.4.4\"} 1\nopenvpn_server_info{arch=\"x86_64-pc-linux-gnu\",server=\"v3\",version=\"2.4.4\"} 1\n# HELP openvpn_start_time Unix timestamp of the start time of the exporter\n# TYPE openvpn_start_time gauge\nopenvpn_start_time 1.588506393e+09\n```\n\n## Development\n\nThis project requires Go \u003e= v1.14. To get started, clone the repository and run `make generate`\n\n```shell script\ngit clone https://github.com/d3vilh/openvpn_exporter \ncd openvpn_exporter\n\nmake generate\nmake build\n\n./cmd/openvpn_exporter -h\n```\n\n### Building the project\n\n```shell script\nmake build\n```\n\n### Running tests\n\n```shell script\nmake test\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3vilh%2Fopenvpn_exporter_v1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd3vilh%2Fopenvpn_exporter_v1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3vilh%2Fopenvpn_exporter_v1/lists"}