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
<https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/>
).

Best regards
Federico Capoano

On Fri, Apr 22, 2022 at 7:25 PM Michele Salerno <[email protected]> wrote:

> 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
>
> --
> 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 [email protected].
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/openwisp/d2ce685b-ebbe-9425-a79a-d8ec9331dfe8%40gmail.com
> .
>

-- 
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 [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAAGgX6%2BPZBYU3um5RoftsvfL9AVHWfnxBWMUV7eSdRN%2B2g_ORA%40mail.gmail.com.

Reply via email to