mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-07-29 07:14:30 +02:00
Add RRDTool integration for monitoring WireGuard stats
Introduces a new RRDTool service for tracking WireGuard interface and peer statistics. Adds required Docker configuration, API key handling, and new scripts for managing RRD files. Updates the `entrypoint.sh` and API permissions to accommodate the new functionality.
This commit is contained in:
parent
7ecf111fbe
commit
07a806a073
8 changed files with 289 additions and 4 deletions
|
@ -25,6 +25,8 @@ def get_api_key(api_name):
|
|||
api_file_path = '/etc/wireguard/api_key'
|
||||
elif api_name == 'routerfleet':
|
||||
api_file_path = '/etc/wireguard/routerfleet_key'
|
||||
elif api_name == 'rrdkey':
|
||||
api_file_path = '/app_secrets/rrdtool_key'
|
||||
else:
|
||||
return api_key
|
||||
|
||||
|
@ -126,6 +128,12 @@ def wireguard_status(request):
|
|||
pass
|
||||
else:
|
||||
return HttpResponseForbidden()
|
||||
elif request.GET.get('rrdkey'):
|
||||
api_key = get_api_key('rrdkey')
|
||||
if api_key and api_key == request.GET.get('rrdkey'):
|
||||
pass
|
||||
else:
|
||||
return HttpResponseForbidden()
|
||||
else:
|
||||
return HttpResponseForbidden()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue