summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/modules/openvpn/client/commands.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/go/collectors/go.d.plugin/modules/openvpn/client/commands.go38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/openvpn/client/commands.go b/src/go/collectors/go.d.plugin/modules/openvpn/client/commands.go
new file mode 100644
index 000000000..f06b05c90
--- /dev/null
+++ b/src/go/collectors/go.d.plugin/modules/openvpn/client/commands.go
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+package client
+
+/*
+https://openvpn.net/community-resources/management-interface/
+
+OUTPUT FORMAT
+-------------
+
+(1) Command success/failure indicated by "SUCCESS: [text]" or
+ "ERROR: [text]".
+
+(2) For commands which print multiple lines of output,
+ the last line will be "END".
+
+(3) Real-time messages will be in the form ">[source]:[text]",
+ where source is "CLIENT", "ECHO", "FATAL", "HOLD", "INFO", "LOG",
+ "NEED-OK", "PASSWORD", or "STATE".
+*/
+
+var (
+ // Close the management session, and resume listening on the
+ // management port for connections from other clients. Currently,
+ // the OpenVPN daemon can at most support a single management client
+ // any one time.
+ commandExit = "exit\n"
+
+ // Show current daemon status information, in the same format as
+ // that produced by the OpenVPN --status directive.
+ commandStatus3 = "status 3\n"
+
+ // no description in docs ¯\(°_o)/¯
+ commandLoadStats = "load-stats\n"
+
+ // Show the current OpenVPN and Management Interface versions.
+ commandVersion = "version\n"
+)