Closed andre8244 closed 5 years ago
Test case 1 (fresh install)
nethserver-openvpn
and nethserver-vpn-ui
packagesOpenVPN RoadWarrior
pageEnable OpenVPN RoadWarrior server
Auth mode
: Certificate
, Mode
: Routed
, Network
: a private network (such as 10.0.10.0
), Netmask
: the netmask of Network
(such as 255.255.255.0
), Contact this server on public IP / host
: the green IP address configured. Click Save
buttonAdd account
button and input Mode
: VPN only
, Username
: a username of your choice. Click Save
button.RoadWarrior accounts
table click the 3-dots (kebab) button of the account you have just created, click Download
, then again Download
button near OpenVPN configuration
route-nopull
among the config lines at the top of the file. This step is needed in order to keep reaching your serversudo openvpn path/to/ovpn/file/username.ovpn
)Today top traffic accounts
(OpenVPN roadwarrior statistics
section)OpenVPN RoadWarrior
page and verify that the start time of VPN connection appears in the Last connected
column of RoadWarrior accounts
tableOpenVPN RoadWarrior
page, click the link in Last connected
column and check the information about your VPN connectionToday top traffic accounts
Test case 2 (update)
nethserver-openvpn
and nethserver-vpn-ui
packagesTest case 3 (weekly reports)
nethserver-dante
packageSettings
page of Report application on Cockpi UICollect now
buttonDashboard
page, click Edit widgets
button, then Default layout
, then Edit done
OpenVPN RoadWarrior account connections
and OpenVPN RoadWarrior traffic
appear and display correct datafirst quick test; Test Case 2, step 10-15, all OK for me
while i am on VPN dashboard in Cockpit UI, in log i see lot of
Sep 13 19:43:45 gasc cockpit-bridge: Argument "null" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:43:45 gasc cockpit-bridge: Argument "null\r" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:43:50 gasc cockpit-bridge: Argument "null" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:43:50 gasc cockpit-bridge: Argument "null\r" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:43:55 gasc cockpit-bridge: Argument "null" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:43:55 gasc cockpit-bridge: Argument "null\r" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:44:00 gasc cockpit-bridge: Argument "null" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:44:00 gasc cockpit-bridge: Argument "null\r" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:44:05 gasc cockpit-bridge: Argument "null" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
Sep 13 19:44:05 gasc cockpit-bridge: Argument "null\r" isn't numeric in int at /usr/libexec/nethserver/api/nethserver-vpn/dashboard/read line 100, <STDIN> line 1.
i will do some more tests... tnx
Hi dz00te,
It looks like your netdata API returns null values for sent and received data. Can you confirm that executing this command:
curl 'http://localhost:19999/api/v1/data?chart=net.tunrw&format=csv&before=0&after=-300&options=abs,seconds'
you get an output similar to this?
1568628418,null,null
1568628417,null,null
1568628416,null,null
1568628415,null,null
What versions of netdata
and nethserver-netdata
are you using?
I could silence the warning, but IMO it's an indicator that netdata is not correctly collecting the data.
just checked and i didn't have the errors in logs anymore... the only things i changed is the installation of ntehserver-dante. i've checket yum history no other packages was installed since other test. i'll try to replicate on a new installation, sorry. another strange things is in report today the widget OpenvpnRoadwarriorTraffic (chart) is empty. i'am sure it works yesterday... i'll do some other tests edit: sorry, vm was updated with latest nethserver-cockpit 0.14 i need to rollback...
new test on another VM. Test Case 2, step 10-15, all OK, no dante installed I saw the same errors in the logs only for the first three times that I returned to the vpn menu, it seems that after a few minutes from the installation the error occurs in the logs no longer appears ...
you get an output similar to this?
# curl 'http://localhost:19999/api/v1/data?chart=net.tunrw&format=csv&before=0&after=-300&options=abs,seconds'
time,received,sent
1568715044,0,0
1568715043,0,0
1568715042,0,0
1568715041,0,0
1568715040,4.106432,6.826944
1568715039,96.76146,111.64152
1568715038,33.46574,38.46223
1568715037,2.39437,2.757299
1568715036,0,0
.........
What versions of
netdata
andnethserver-netdata
are you using?
# rpm -qa | grep netdata
netdata-data-1.16.0-1.el7.noarch
netdata-1.16.0-1.el7.x86_64
nethserver-netdata-1.1.0-1.ns7.noarch
netdata-conf-1.16.0-1.el7.noarch
I tried the test cases, everything worked fine for me.
it seems that after a few minutes from the installation the error occurs in the logs no longer appears ...
That is because netdata discover the data after a while.
At the moment the available information about OpenVPN connections consists of the current number of active connections. This piece of data is displayed on the Cockpit Dashboard of the VPN module.
This information could be enhanced by extracting more data and persisting it; the goal is to aggregate these data over a period of time in order to analyze it and perform queries on it.
Some statistics of interest include:
Connection statistics should be accessible from these Cockpit modules:
nethserver-vpn-ui
)nethserver-dante
)Proposed solution
OpenVPN allows to execute a script during client connection and disconnection. VPN statistics can be persisted during these phases. Data can be saved on a lightweight database such as SQLite. The records on the database will be retrieved by:
Alternative solutions
Instead of using a relational database, VPN statistics could be persisted using a different strategy, such as: