Thank you, Kevin:
It makes sense what you wrote They are devices attached to Access Points and they were discovered via arp module, the first thing I tried was listing it by name or location, but for 15 years ppl here didn’t the job well so now you can find a lot of devices with the same name but different IP address, by location we use GPS coordinates cuz they are customers out in the countryside so I can’t list it by location unfortunately.
It has to be via ipv4 address.
We are talking about 500 devices more or less, in that network.
But here is another question, if they are already in that field inside a table them something I’m doing wrong here cuz they should be listed ? or maybe the type of value Libre used to store that data may not be the ideal for. I don’t know I just trying to figure out.
Nope cuz they are in diff locations, it’s not the same pattern, I can list for example base on hardware, or OS but GPS I can’t, the point here is to group and specific IP’s :
so far the closest approach I did is with this pattern
MariaDB [librenms]> Select * from ipv4_addresses where ipv4_address REGEXP '172\.16\.[1-9]\.*';
That one list those IP’s I want to group, but also add a subnet I don’t want to
so I was thinking this pattern will do it,
MariaDB [librenms]> Select * from ipv4_addresses where ipv4_address REGEXP '172\.16\.[1-9]{1}\.*';
.[1-9]{1} should list only 1 digit, not 2 digits, but it’s not doing it.
I’m sure the issue is us cuz we don’t know how to… I’m reading a lot about REGEXP maybe I can do it.
If the devices are in a different location is no way I can match it to group it.
Those devices are customers I have 2 networks users dedicated , 172.16. and 172.17 .
172.16 are 2.4Ghz customers radios ( Engenius and Ubiquiti Radios)
172.17 are 5.8Ghz customers radios (only Ubiquiti radios) this radios I can easily group it cuz they use the same OS (AirOS) so I made a rule to group it by OS and Hardware ( they are all the same) and It work very well.
Now the 172.16.[1-9] network is the problem cuz they do not share anything in common, well the IP address is the only pattern they match.
Now 172.16.0 and 172.16.10 are reserved for another use, like servers, routers, printers, Rasberry Pi that we use to constantly check power in our towers (13 in total) .
So the group I want to make is to separate customers from those devices are not.
I also manage and monitor the Ubiquiti radios with Aircontrol (AC is an app from Ubiquiti) but no the 2.4Ghz radios that is why I need those customers monitored and managed by Libre.
Thank you for taking your time to help me, I’m sure is all about on how to write the correct expression that MySQL or Maria understand. I’m the problem not Libre or the Database LOL
Hey:
Thank you for your answer, I will try tonite, It was a long day at work so no time to finish this, a friend also told me, that is the way to do it, I hope so, cuz that will save me hrs of work renaming those radios!.
MariaDB [librenms]> Select * from ipv4_addresses where ipv4_address RLIKE '172\.16\.[1-9]\\..*';
This one did the job but still missing IP’s, it list
60 rows in set (0.00 sec)
Now, that’s not true cuz Today I find out that we should have 103 devices on that network. cuz they moved customers to 5.8Ghz so … I decide to spend few hrs and figure out if my database was correct or I have for some reason an incorrect database.
so I went Access Point by Access point and list the actual associations, in 13 towers 4 AP’s per tower, total of 52 devices to look at. no so bad. right.
So real total Libre Database should have is 103 devices in that network. no 60 devices only.
So I questioned myself, that maybe libre was failing for some reason the discovery process, I find out in some radios snmp service was off, so this is what I did I went to cli and ran a discovery to add those devices, them locate it in libre and turn off snmp and add manually Hardware and OS, them I created a rule to look for Hardware and OS equal Engenius and Ubiquity and finally I got listed 103 Devices in that network.
sorry about my english I hope you guys understand "It was hard to do it " lol but the reason about why we open this topic still a mystery cuz still missing 43 devices that I can’t order and group per IP.
hope you guys understand what I mean.
regards and millions thanks
jc
ps 3.1hrs of labor at home… extra time = extramoney, I take it.
If you’ve added devices without snmp then you won’t get ipv4_address information I’m afraid. They must support snmp so we can discover that information.
In your example as well, you still aren’t double escaping the . so it should be select * from ipv4_addresses where ipv4_address RLIKE '172\\.16\\.[1-9]\\..*';
Sorry I forgot :
Your input, return the same result.
select * from ipv4_addresses where ipv4_address RLIKE '172\\.16\\.[1-9]\\..*'; 60 rows in set (0.00 sec)
I compare it and results are identicals
Devices without SNMP info were corrected, then I discover it.After that, I edited the devices OS and Platform (hardware).
Here is the thing, if you list the IP address field in that table you can see those devices are there, just not listed or added to the group which means to me, its related to REGEXP syntaxis or something else is not right here.
regards
JC
Well, I think we can, it only takes to find the right expertise to do the job and in the open software community I know a few persons, like you, always open to collaborating, I already send my database to be reviewed by a good girlfriend I know in Iowa, she is master in Database administration and programming also it’s on the way to Chicago to be analyzed there and I will keep asking any place I can but, I’m sure it can be done, grouping devices is a common task System and Network admin do, so Libre has to be perfect about it.
" THE BEST OR NOTHING" lol
hey, guys have a nice night and I will keep posting my find out on this issue. @Kevin_Krumm " thank you, I appreciated it
thank you a lot
regards
jc
PS I can send you my database if you guys want to take a look, maybe you guys look inside and find an issue.
We can keep this post on so people can read it and find util information, I guess.
It would also be amazing to be able to group devices based on a subnet (CIDR of course) - there can’t be many networks out there that don’t have particular ranges set aside for network devices, server farms, etc.