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

Commit

Permalink
Logical bug
Browse files Browse the repository at this point in the history
when CLIENT_LIST exist its only do numberConnectedClient++ and not execute metricsCollect
  • Loading branch information
revverse authored Feb 20, 2018
1 parent 8221d6d commit 5307c3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openvpn_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ func CollectServerStatusFromReader(statusPath string, file io.Reader, ch chan<-
statusPath)
} else if fields[0] == "TITLE" && len(fields) == 2 {
// OpenVPN version number.
} else if fields[0] == "CLIENT_LIST"{
numberConnectedClient ++
} else if header, ok := openvpnServerHeaders[fields[0]]; ok {
if fields[0] == "CLIENT_LIST"{
numberConnectedClient ++
}
// Entry that depends on a preceding HEADERS directive.
columnNames, ok := headersFound[fields[0]]
if !ok {
Expand Down

0 comments on commit 5307c3c

Please sign in to comment.