Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Does not generate data #41

Open
cardosocristian opened this issue Mar 3, 2021 · 2 comments
Open

Does not generate data #41

cardosocristian opened this issue Mar 3, 2021 · 2 comments

Comments

@cardosocristian
Copy link

I have a Centos 7 server, with Openvpn in version 2.4.9, golang in version 1.15.1 and after following this tutorial
"https://kifarunix.com/monitor-openvpn-connections-with-prometheus-and-grafana/" which refers to your exporter was not successful.
You are generating the following error when running:
xporter
2021/03/03 16:09:01 Listen address: 10.10.10.10:9176
2021/03/03 16:09:01 Metrics path: / metrics
2021/03/03 16:09:01 openvpn.status_path: /etc/openvpn/openvpn-status.log
2021/03/03 16:09:01 Ignore Individuals: false

2021/03/03 16:09:09 Failed to scrape showq socket: unexpected file contents: "OpenVPN CLIENT LIS"
2021/03/03 16:09:24 Failed to scrape showq socket: unexpected file contents: "OpenVPN CLIENT LIS"

The above error occurs, every time I open / metrics, it follows main.go's config

func main () {
var (
listenAddress = flag.String ("web.listen-address", "10.10.10.10:9176", "Address to listen on for web interface and telemetry.")
metricsPath = flag.String ("web.telemetry-path", "/ metrics", "Path under which to expose metrics.")
// openvpnStatusPaths = flag.String ("openvpn.status_paths", "examples / client.status, examples / server2.status, examples / server3.status", "Paths at which OpenVPN places its status files.")
openvpnStatusPaths = flag.String ("openvpn.status_paths", "/etc/openvpn/openvpn-status.log", "Paths at which OpenVPN places its status files.")
ignoreIndividuals = flag.Bool ("ignore.individuals", false, "If ignoring metrics for individuals")
)
flag.Parse ()

Could you help me please?

@jindrichskupa
Copy link

Just change/add the status version like into config file:

status-version 2

Exporter support only 2 or 3 versions.

@cardosocristian
Copy link
Author

cardosocristian commented Mar 9, 2021

Thanks for the help, I modified the service and managed to capture a large part of the logs.

Some logs are not being populated, such as:

openvpn_server_connected_clients {status_path = "/ etc / openvpn / openvpn-status.log"} 0

It was not very clear to me if the values below should appear in / metrics or is generated to export only
openvpn_server_client_received_bytes_total
openvpn_server_client_sent_bytes_total

#Configuration line
openvpn --status /etc/openvpn/openvpn-status.log --status-version 3 --suppress-timestamps --cd / etc / openvpn / --config server.conf

I configured the service with status-version 2 and then 3 to test it, but it didn't work to generate the data above.

The version of Openvpn I am using is "OpenVPN 2.4.9 x86_64-redhat-linux-gnu"

I apologize if something went wrong, but as I am only a system administrator, I am still starting to use this type of service to export data.
Once again, thank you very much for your help and attention.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants