Skip to content

Commit afb2989

Browse files
committed
chore(doc): improve troubleshooing section
1 parent e39a4b4 commit afb2989

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,63 @@ You can run the cleanup job manually with the following query:
290290
SELECT cleanup_orphaned_unit_data()'
291291
```
292292

293+
### VPN
294+
295+
If you need to know the VPN current status, execute the following:
296+
```
297+
runagent -m nethsecurity-controller1
298+
podman exec -ti vpn /bin/sh
299+
kill -SIGUSR2 1
300+
```
301+
302+
OpenVPN will dump statistics inside the journalctl, something like:
303+
```
304+
...
305+
Aug 21 15:31:50 node1 vpn[1269361]: 2025-08-21 13:31:50 Virtual Address,Common Name,Real Address,Last Ref
306+
Aug 21 15:31:50 node1 vpn[1269361]: 2025-08-21 13:31:50 172.22.221.26,xxxxxx-xxx-xxx-xx-xxxxx,1.2.3.4:57292,2025-08-21 13:31:48
307+
Aug 21 15:31:50 node1 vpn[1269361]: 2025-08-21 13:31:50 172.22.221.147,xxxxxx-xxx-xxx-xx-xxxxx,1.2.3.4:44210,2025-08-21 13:31:47
308+
...
309+
```
310+
311+
### Prometheus
312+
313+
Prometheus has a useful dashboard to visualize the scrape targets and their status.
314+
Prometheus can automatically find units to scrape by calling the `http://127.0.0.1:<api_port>/prometheus/targets` URL
315+
every 60 seconds.
316+
317+
To see the current status of the targets, you can access the Prometheus UI at `https://<controller_fqdn>/<prometheus_path>/targets`.
318+
319+
You can find the the URL using this command:
320+
```
321+
runagent -m nethsecurity-controller1 cat config.json | jq -r '"https://\(.host)\(.prometheus_path)/targets"'
322+
```
323+
324+
Looking into the target list you can find:
325+
326+
- what targets are up or down
327+
- last scrape time
328+
- last scrape duration
329+
330+
### Unit registration
331+
332+
Sometime the unit registration process may fail or become stale.
333+
In such cases, you can check inside the log what is the reason of the failure.
334+
335+
Execute:
336+
```sh
337+
journalctl | grep -A1 'RegisterUnit'
338+
```
339+
340+
Output will look like this:
341+
342+
```
343+
Aug 21 16:05:29 ns8hks02 api[1269474]: nethsecurity_controller 2025/08/21 14:05:29 unit.go:485: [ERROR][RegisterUnit] unit not allowed, no certificate found for: <UUID>
344+
Aug 21 16:05:29 ns8hks02 proxy[1269525]: <IP_ADDRESS> - - [21/Aug/2025:14:05:29 +0000] "POST /api/units/register HTTP/1.1" 403 91 "-" "-" 8723 "routerapi@file" "http://127.0.0.1:20030/" 0ms
345+
--
346+
Aug 21 16:05:32 ns8hks02 api[1269474]: nethsecurity_controller 2025/08/21 14:05:32 unit.go:369: [ERROR][RegisterUnit] unit subscription is required
347+
Aug 21 16:05:32 ns8hks02 proxy[1269525]: <IP_ADDRESS> - - [21/Aug/2025:14:05:32 +0000] "POST /api/units/register HTTP/1.1" 403 87 "-" "-" 8724 "routerapi@file" "http://127.0.0.1:20030/" 0ms
348+
```
349+
293350
## Uninstall
294351

295352
To uninstall the instance:

0 commit comments

Comments
 (0)