Info for topology OpenVPN

19 views
Skip to first unread message

Michele Salerno

unread,
Apr 22, 2022, 7:25:57 PM4/22/22
to OpenWISP
Hi,

I don't speak english and with google translate it seems to me that
using openvpn it is necessary to enable this:

https://github.com/openwisp/openwisp-network-topology/blob/master/README.rst#integration-with-openwisp-controller-and-openwisp-monitoring

On old server with olsrd2 (now is a project not maintained) i used this
script:

#!/bin/sh
COLLECTOR_URL="https://openwisp.nnxx.ninux.org/api/v1/topology/7ac93651-6f93-4247-b2f2-8b0c87e35fef/receive/?key=FY8WTF17JjBC1r1uAQv0awGi8zAj2INC"
DATA=$(echo "/netjsoninfo filter graph ipv4_0" | nc 127.0.0.1 2009)
curl -s -X POST -d "$DATA" --header "Content-Type: text/plain"
$COLLECTOR_URL

In the documentation it just gives an example with NetJSON.
How is it used with OpenVPN?

Thanks.

Best regards,

Michele

Federico Capoano

unread,
Apr 23, 2022, 10:38:20 AM4/23/22
to open...@googlegroups.com
Instead of:

DATA=$(echo "/netjsoninfo filter graph ipv4_0" | nc 127.0.0.1 2009)

Do:

DATA=$(cat /var/log/openvpn/<yourvpnhere>.stats)
curl -s -X POST -d "$DATA" --header "Content-Type: text/plain" $COLLECTOR_URL

Where the "/var/log/openvpn/<yourvpnhere>.stats" is the path to the openvpn status file (if you don't know what that is, look for --status in the openvpn manual).

Best regards
Federico Capoano

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/d2ce685b-ebbe-9425-a79a-d8ec9331dfe8%40gmail.com.
Reply all
Reply to author
Forward
0 new messages