For OpenVPN, you need to enable the status file, look for --status in this 
document: 
https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/

Create a topology using the receive strategy, copy the suggested POST URL. 

Then create a script that gets the status file and sends it in post to the 
POST URL you copied before.

The script looks like this:

#!/bin/sh
COLLECTOR_URL="{{ openwisp2_management_topology_url }}"
DATA=$(cat "{{ openwisp2_management_openvpn_status_log }}")
curl -s -X POST -d "$DATA" --header "Content-Type: text/plain" 
$COLLECTOR_URL
_ret=$?
echo ''
exit $_ret

Federico



On Thursday, August 13, 2020 at 5:21:40 PM UTC-5, Mirza Arnaut wrote:
>
> Hello Frederico,
> Sorry for my unclear question.
> I just wanted to know how to get the topology data or better said how to 
> generate them for my current network (since I thought that the topology 
> component would do that for me).
> I will try to read up on how to generate it with openvpn, but I would 
> really grateful if you have a tutorial to recommend for beginners.
>
> Mirza
>
> On Thursday, August 13, 2020 at 4:41:30 PM UTC+2 [email protected] 
> wrote:
>
>> Hey Mirza, I'm not sure I understood your question very well.
>>
>> To fetch the topology, you must have a source of data which knows the 
>> topology, eg: openvpn, OLSRd or another networking software who knows it.
>> You can either fetch it or have a script send it in POST.
>>
>> I hope this helps, if you have further questions, please be more specific.
>>
>> Best regards
>> Federico Capoano
>>
>>
>> On Wednesday, August 12, 2020 at 10:35:50 AM UTC-5 Mirza Arnaut wrote:
>>
>>> Basically I want to know from where can I fetch my current toplogy?
>>> Is it possible or do I have to generate that somehow else?
>>> I thought that this would be done by the topology container. Or am I 
>>> missing some adequate endpoint for this?
>>>
>>> Mirza
>>>
>>> On Wednesday, August 12, 2020 at 4:50:00 PM UTC+2 [email protected] 
>>> wrote:
>>>
>>>> On Wednesday, August 12, 2020 at 6:06:05 PM UTC+5:30 Mirza Arnaut wrote:
>>>>
>>>>> Sorry, should have red the documentation more thoroughly ..
>>>>>
>>>>
>>>> No problem, multiple people have missed the env documentation, I think 
>>>> the docs need to be improved 
>>>> to get user attention to it. I'll look into it when possible.
>>>>  
>>>>
>>>>> Now I am not quite certain how to display my own network topology here.
>>>>
>>>>
>>>> Can you please ask a more specific question, what is the problem you 
>>>> are facing to display your topology? 
>>>>  
>>>>
>>>> Ajay
>>>>
>>>

-- 
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/d1314171-991b-49a5-bcb0-37d02875ac8bo%40googlegroups.com.

Reply via email to