Add OpenVPN probe
This adds support for OpenVPN status probe which uses OpenVPN's
management interface (configured via 'management 127.0.0.1 1234' in
OpenVPN's config).
The output looks as follows:
...
OpenVPN
127.0.0.1:1234
status: CONNECTED
tunnel: 10.8.0.15
remote: 144.76.43.77:1194
localhost:4242
status: management interface incompatible
127.0.0.1:4444
status: management interface unavailable
...
We show tunnel's IP (if available) as well as remote (OpenVPN server
itself) address/port in addition to general connection status. If
management interface is unavailable it's reported as such. If we've
managed to establish connection with a given management interface but
are unable to obtain expected information than we report this
incompatibility as well.
Related: SYS#2655
Change-Id: I4493e19b9a09dcebd289457eacd1719f7f8cc31c
diff --git a/src/osysmon.h b/src/osysmon.h
index df8bf8d..2f82c47 100644
--- a/src/osysmon.h
+++ b/src/osysmon.h
@@ -15,6 +15,8 @@
struct rtnl_client_state *rcs;
/* list of 'struct ctrl client' */
struct llist_head ctrl_clients;
+ /* list of 'struct openvpn_client' */
+ struct llist_head openvpn_clients;
/* list of 'struct netdev' */
struct llist_head netdevs;
/* list of 'struct osysmon_file' */
@@ -30,6 +32,7 @@
CTRL_CLIENT_NODE = _LAST_OSMOVTY_NODE + 1,
CTRL_CLIENT_GETVAR_NODE,
NETDEV_NODE,
+ OPENVPN_NODE,
PING_NODE,
};
@@ -48,5 +51,8 @@
int osysmon_ping_init();
int osysmon_ping_poll(struct value_node *parent);
+int osysmon_openvpn_init();
+int osysmon_openvpn_poll(struct value_node *parent);
+
int osysmon_file_init();
int osysmon_file_poll(struct value_node *parent);