furlongm / openvpn-monitor

openvpn-monitor is a web based OpenVPN monitor, that shows current connection information, such as users, location and data transferred.
http://openvpn-monitor.openbytes.ie
GNU General Public License v3.0
968 stars 294 forks source link

docker to docker python errors after connect #276

Open glenb77 opened 1 year ago

glenb77 commented 1 year ago

I have a openvpn docker running well and wanted to add this cool monitor. i do get a management connection at the server side with this in log:

2023-10-18 22:55:52 MANAGEMENT: Client connected from [AF_INET]172.17.0.1:33218 2023-10-18 22:55:52 MANAGEMENT: CMD 'version' 2023-10-18 22:55:52 MANAGEMENT: CMD 'state' 2023-10-18 22:55:52 MANAGEMENT: CMD 'status 3' 2023-10-18 22:55:52 MANAGEMENT: CMD 'quit' 2023-10-18 22:55:52 MANAGEMENT: Client disconnected my docker run just to reach it is this:

docker run -d --name vpnmon -e OPENVPNMONITOR_SITES_0_PORT=5555 -e OPENVPNMONITOR_SITES_0_HOST=162.212.157.164 -p 8000:80 --rm ruimarinho/openvpn-monitor

that log with the errors looks like this:

`INFO: Sending command: version

INFO: Sending command: state

INFO: Sending command: load-stats

INFO: Sending command: status 3

Traceback (most recent call last): File "/usr/local/bin/bottle.py", line 868, in _handle return route.call(*args) File "/usr/local/bin/bottle.py", line 1748, in wrapper rv = callback(a, ka) File "/openvpn-monitor/openvpn-monitor.py", line 916, in get_slash return render() File "/openvpn-monitor/openvpn-monitor.py", line 904, in render main(kwargs) File "/openvpn-monitor/openvpn-monitor.py", line 866, in main OpenvpnHtmlPrinter(cfg, monitor) File "/openvpn-monitor/openvpn-monitor.py", line 514, in init self.print_html_header() File "/openvpn-monitor/openvpn-monitor.py", line 607, in print_html_header if vpn['name']: KeyError: 'name' ` any help to get this working or a variable to insert, would be great. this docker version on debian latest; version

glenb77 commented 1 year ago

Answering my own post i need to have a variable for 'NAME'. working once that was entered. you can close this if you wish. sorry..