GithubHelp home page GithubHelp logo

denraf / openvpnas-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rossigee/openvpnas-exporter

0.0 0.0 0.0 126 KB

A Prometheus exporter for OpenVPN AS that uses the XML-RPC unix domain socket.

License: Apache License 2.0

Go 94.95% Dockerfile 5.05%

openvpnas-exporter's Introduction

OpenVPN AS metrics exporter for Prometheus

A Prometheus exporter that makes calls to the XML RPC unix domain socket exposed by the OpenVPN AS service, and generates metrics from the responses.

Current metrics include:

  • Server status
    • Number of connected clients.
  • Subscription status
    • Number of current, fallback and maximum concurrent connections.
    • Subscription last updated timestamp.

That's all I've needed and had time to implement so far.

Based on openvpn-exporter.

Exposed metrics example

# HELP openvpnas_server_connected_clients Number Of Connected Clients
# TYPE openvpnas_server_connected_clients gauge
openvpnas_server_connected_clients 1
# HELP openvpnas_subscription_current_client_connections Number of client connections currently being used from the OpenVPN subscription.
# TYPE openvpnas_subscription_current_client_connections gauge
openvpnas_subscription_current_client_connections 1
# HELP openvpnas_subscription_fallback_client_connections Number of fallback connections in use on the OpenVPN subscription.
# TYPE openvpnas_subscription_fallback_client_connections gauge
openvpnas_subscription_fallback_client_connections 2
# HELP openvpnas_subscription_maximum_client_connections Maximum number of client connections allowed by the OpenVPN subscription.
# TYPE openvpnas_subscription_maximum_client_connections gauge
openvpnas_subscription_maximum_client_connections 100
# HELP openvpnas_subscription_status_update_time_seconds UNIX timestamp at which the OpenVPN subscription status was last updated.
# TYPE openvpnas_subscription_status_update_time_seconds gauge
openvpnas_subscription_status_update_time_seconds 1.636795645e+09
# HELP openvpnas_up Whether scraping OpenVPN's metrics was successful.
# TYPE openvpnas_up gauge
openvpnas_up 1

Usage

Usage of openvpnas_exporter:

  -openvpn-as.xmlrpc-path string
    	Path at which the XML-RPC unix domain socket file can be found. (default "/usr/local/openvpn_as/etc/sock/sagent.localroot")
  -web.listen-address string
    	Address to listen on for web interface and telemetry. (default ":9176")
  -web.telemetry-path string
    	Path under which to expose metrics. (default "/metrics")

It appears to only run as 'root' user. The XML-RPC request fails otherwise.

Get a standalone executable binary

You can download the pre-compiled binaries from the releases page.

openvpnas-exporter's People

Contributors

rossigee avatar dependabot[bot] avatar denraf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.