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
Add generic host config struct and related helpers for TCP-based probes
and use them for ctrl probe.
This will be used in follow-up patch for OpenVPN probe as well.
Change-Id: Ie321655a92cdbefbfaa056ac0d583397c83beccb
Use liboping (new dependency) to add 'ping XXX' entries support in .cfg
file, where XXX can be either IP address or FQDN.
Sample output:
...
ping
ya.ru
IP: 2a02:6b8::2:242
dropped: 3/3
8.8.8.8
IP: 8.8.8.8
dropped: 0/3
latency: 20.4 ms
TTL: 120
...
N. B: to gather actual ping statistic we have to be able to send ICMP
requests (have enough privileges to work with RAW sockets).
Related: SYS#2655
Change-Id: Ife32540b532fb54368f63c78fb7837b84d4e8c76
The simple_ctrl.c is used by 2 independent binaries. Let's build it as a
convenience libtool library [1] to make it easier to add further
external dependencies in future.
While at it, also move osmo-sysmon dependencies to program-specific
_CFLAGS from generic one.
[1] https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html
Change-Id: Idfaba17b54983709278e1c24bf55edbbb4abd961