diff --git a/openvpn_exporter.go b/openvpn_exporter.go index 067b7da..371153d 100644 --- a/openvpn_exporter.go +++ b/openvpn_exporter.go @@ -55,7 +55,8 @@ var ( // Metrics specific to OpenVPN servers. openvpnConnectedClientsDesc = prometheus.NewDesc( prometheus.BuildFQName("openvpn", "", "openvpn_server_connected_clients"), - "Number Of Connected Clients", nil, nil) + "Number Of Connected Clients", + []string{"status_path"}, nil) openvpnServerHeaders = map[string]OpenvpnServerHeader{ "CLIENT_LIST": { @@ -248,7 +249,8 @@ func CollectServerStatusFromReader(statusPath string, file io.Reader, ch chan<- ch <- prometheus.MustNewConstMetric( openvpnConnectedClientsDesc, prometheus.GaugeValue, - float64(numberConnectedClient)) + float64(numberConnectedClient), + statusPath) return scanner.Err() }