-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
32bit restriction with application wireguard? #445
Comments
@efelon As a test, would you remove the "long" casting and, assuming you're running python3 on you Pi, would you print the output of |
Hello @bnerickson , my default is python2 for this installation, but I have python 3 also installed: # python3 -c "import sys; print(sys.maxsize)"
2147483647
# python2 -c "import sys; print(sys.maxint)"
2147483647 One of the devices has these values now: {"mobile_mw": {"minutes_since_last_handshake": 1, "bytes_rcvd": 999921456, "bytes_sent": 5157117812} wg dump:
|
@efelon thanks. Would you paste the relevant output when running the /etc/snmp/wireguard.py command under two conditions?:
|
@bnerickson, of course. But the output is the same:
|
It might be unrelated since the max value I supplied is larger than yours, but I screwed up by setting a maximum for the bytes received/sent here: https://github.com/librenms/librenms/blob/49abee372268d2d49448f9557e00b6cb8a54521e/includes/polling/applications/wireguard.inc.php#L24 Can you change those two lines on your LibreNMS install to the following and report if you start seeing data on the graph without the divide by 1000 and long casting?
You might have to delete the RRD and re-poll for the changes to take effect. In either case, I need to submit a PR with those changes. |
The high values still don't show up. I deleted the rrd files as requested and waited several polls. |
Thanks. On your LibreNMS server (I assume it is separate from your RaspPi), what is the wireguard-specific output when you run the following?:
Replacing <snmp_community> and <rasppi_ip_address> with your snmp community and RaspPi IP address or hostname respectively. |
I use only v3 so I changed the snmpwalk command accordingly, but the output is most likely not what you expect:
|
Ah, yes. Let's try running the command with the OID:
|
I grep for wg0 as there is no "wireguard" in the output, and skipped the other clients:
|
Thanks. Is your LibreNMS installation on a 32-bit or 64-bit kernel? |
Both (wireguard pi and LibreNMS pi) are actually on 32-bit kernel at the moment. Coincidently I'm about to move the LibreNMS instance to a 64bit installation in the next few days. I will report back afterwards. |
Sounds good. Hope that fixes the issue. My LibreNMS is on a 64-bit kernel FWIW. |
The problem
I have a long running wireguard on a (still 32bit) raspberry pi 4 Debian buster:
Linux 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux
LibreNMS is running an 32bit Debian buster as well.
Some of the peers have high values for send/receive transfer counter. e.g.:
Althoug the absolute byte values output by
wg show all dump
are not at the limit:the graphs in the web ui show nand for these values. As a test I modified
wireguard.py
as follows, which "fixes" the display problem in the web ui:I'm pretty sure, the 32bit OS/php/python is the problem somehow, but wanted to report this behavior in case there is another solution other than "32bit is not supported any more".
Opened here by request from librenms/librenms#14688
Output of ./validate.php
=========================================== Component | Version --------- | ------- LibreNMS | 22.11.0 (2022-11-24T07:01:26+01:00) DB Schema | 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248) PHP | 8.1.12 Python | 3.7.3 Database | MariaDB 10.3.36-MariaDB-0+deb10u2 RRDTool | 1.7.1 SNMP | 5.7.3 =========================================== [OK] Composer Version: 2.4.4 [OK] Dependencies up-to-date. [OK] Database connection successful [OK] Database Schema is current [OK] SQL Server meets minimum requirements [OK] lower_case_table_names is enabled [OK] MySQL engine is optimal [OK] [OK] Database schema correct [OK] MySQl and PHP time match [OK] Active pollers found [OK] Dispatcher Service not detected [OK] Locks are functional [OK] Python poller wrapper is polling [WARN] Using database for locking, you should set CACHE_DRIVER=redis [OK] rrd_dir is writable [OK] rrdtool version ok
What was the last working version of LibreNMS?
No response
Anything in the logs that might be useful for us?
No response
The text was updated successfully, but these errors were encountered: