Repository navigation
Primary IPv4 column sorts lexicographically instead of numerically #1797
Description
What installation are you running?
Production (netalertx) 📦
Is there an existing issue for this?
- I have searched the existing open and closed issues and I checked the docs https://docs.netalertx.com/
The issue occurs in the following browsers. Select at least 2.
- Firefox
- Chrome
- Edge
- Safari (unsupported) - PRs welcome
- N/A - This is an issue with the backend
Current Behavior
On the Devices page, sorting by the IPv4 / Primary IPv4 column sorts the addresses alphabetically instead of numerically.
For example, I get an order like:
192.168.1.1
192.168.1.105
192.168.1.106
192.168.1.112
192.168.1.117
192.168.1.120
192.168.1.132
192.168.1.138
192.168.1.139
192.168.1.140
192.168.1.144
192.168.1.15
I'm running v26.9.0.
I found #1606, which looks like the same kind of sorting problem, but that issue appears to have been fixed for the IP column in another view. The Primary IPv4 column on the Devices page still seems to sort as a string.
Expected Behavior
IPv4 addresses should be sorted numerically.
For example:
192.168.1.1
192.168.1.15
192.168.1.20
192.168.1.21
...
192.168.1.105
192.168.1.106
This should behave the same way as the existing numeric IP sorting used elsewhere.
Steps To Reproduce
- Open Devices → All devices.
- Make sure the IPv4 / Primary IPv4 column is visible.
- Click the IPv4 column header to sort ascending.
- Devices are sorted lexicographically, e.g. 192.168.1.105 appears before 192.168.1.15.
Relevant app.conf settings
No special configuration seems to be required. The Primary IPv4 column is enabled in the Devices table.
NetAlertX version: v26.9.0docker-compose.yml
Standard Docker installation using host networking. I don't believe the Docker configuration is relevant to the table sorting issue.Debug or Trace enabled
- I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.
Relevant app.log section
No relevant errors are written to app.log when sorting the column. The issue is reproducible directly from the Devices table.
Docker Logs
No relevant Docker log output is produced when sorting the IPv4 column. The issue is reproducible entirely from the Devices table UI.
Activity
BE: IP ordering fixes #1797
jokob-sk commentedon Sep 18, 2026
his should be available/fixed in the next release.
It would be great if you could test the
ghcr.io/netalertx/netalertx-dev-unsafeDocker image in ~15 minutes (or once the latest GitHub Action finishes).PORTandGRAPHQL_PORTif running instances concurrently) with its own DB and config (a copy of your current setup), as database changes may occur.After updating:
👉 If I don’t receive confirmation that this works, I may revert the changes to avoid introducing bugs.
Thanks in advance,
j
MauroDece commentedon Sep 21, 2026
Tested ghcr.io/netalertx/netalertx-dev-unsafe:unsafe.
After refreshing NetAlertX and doing a hard browser refresh, the Primary IPv4 column now sorts numerically as expected in both ascending and descending order.
For example, ascending correctly gives .1, .10, .15, .20, ... .44, .105, .106 instead of placing .105 immediately after .10.
Looks fixed on my side. Thanks!
jokob-sk commentedon Sep 21, 2026
Thanks for testing.
jokob-sk commentedon Sep 30, 2026
releasing in ~1h -> closing