i will try 172.16.[1-9].@
thanks
nope still listing the 172.16.0.x net and 172.16.10.x net and 172.16.20.x net
They really need to work more in grouping and managing groups, I have a network with more than 500 customers plus my router and servers infrastructure and its kinda hard to groups with libre
JC
I can group based on :
%devices.status = âignoredâ &&
%devices.hardware = âUbiquiti AirGrid M5â || %devices.hardware = âUbiquiti PowerBeam M5â || %devices.hardware = âUbiquiti AirGrid M2â || %devices.os ~ âEngeniusâ &&
Your idea of 172.16.[1-9].@ is exactly what I need but its not working.
I think grouping with ipv4_addresses.ipv4_address is not working for some reasonâs maybe me and I need It urgently!.
jc
I think it should work with " ipv4_addresess.ipv4-address " but in the real world for some reason is not working with grouping devices. I do not have a lot of experience with MariaDB but 172.16.[1-9].@ is what I need and should do the job but itâs not
try this
hey sorry, I was on launch break :
devices.ip is a binary field I think, I will try but not sure that will do the job
thanks you
JC
you are right im just trying to find something that would work.
lol yeah I understand I really appreciated your help, will figure out Iâm sure something is no done right. I did a query to the DB just to make sure those fields are there and yes they are there, donât get itâŠ
Hey:
Iâm not sure if we can filter that Field (ipv4_address )
I tried
MariaDB [librenms]> SELECT ipv4_address FROM ipv4_addresses WHERE ipv4_address=â172.16.0.4â;
±-------------+
| ipv4_address |
±-------------+
| 172.16.0.4 |
±-------------+
1 row in set (0.00 sec)
Now the % is used as the âeverythingâ wildcard, so if we query:slight_smile:
$ MariaDB [librenms]> SELECT ipv4_address FROM ipv4_addresses WHERE ipv4_address=â172.16.0.%â;
Should the filter output all the devices on that net?
well the output is : Empty set (0.00 sec)
So not sure we can filter that TYPE OF VALUE= varchar(32) , I was thinking IP addresses should be store as INT UNSIGNED or converted to âŠ
jc
can you please write for me the last Pattern and value I want to try it?
regards and thank you
JC
Not working here
thank you
JC
Going to run ./validate maybe something is wrong with MariaâŠ
jc
Saying not working but not showing what youâve tried doesnât help.
If you look at the post you will see that I did say it lol, I asked you to explain your rule but looking at it I realized your rule may list all the devices on 192.168.5.X right?
here :
rule
output : (no results)
real :
the rule is not grouping those devices, the closer I got was with this rule :
but still listing devices that I donât need like 172.16.0.X or 172.16.10.X or 172.20.X.X y only need to list in that group this addresses 172.16.1-9.X-254 .
regards and thanks
JC
The first, out of curiosity youâve not resaved the rule have you. The webui doesnât support this type of detail right now so once youâve created it you canât edit it.
For the second example this is because you only have one single full stop .
before the *
. It needs to be \..*
Use mysql to do the same testing:
MariaDB [librenms]> select '172.16.5.1' REGEXP '172\.16\.5[0-1]\..*';
+-------------------------------------------+
| '172.16.5.1' REGEXP '172\.16\.5[0-1]\..*' |
+-------------------------------------------+
| 0 |
+-------------------------------------------+
1 row in set (0.00 sec)
MariaDB [librenms]> select '172.16.50.1' REGEXP '172\.16\.5[0-1]\..*';
+--------------------------------------------+
| '172.16.50.1' REGEXP '172\.16\.5[0-1]\..*' |
+--------------------------------------------+
| 1 |
+--------------------------------------------+
I have been creating new rules and removing the old one just to be sure, so Not I do not resave any rule.
I did try your rules with .* and with âŠ*
rule with .* = list devices that I donât need like 172.16.0.X or 172.16.10.X or 172.20.X.X y only need to list in that group this addresses 172.16.1-9.X-254
Same rule but with âŠ* = list NO RESULTS.
Here is an example using REGEXP
âŠ
MariaDB [librenms]> Select ipv4_address from ipv4_addresses where ipv4_address REGEXP â^172.[1-9]âŠ*â;
âŠ
±--------------+
| ipv4_address |
±--------------+
| 172.16.0. |
| 172.16.10. |
| 172.20.11. |
| 172.20.21. |
| 172.20.31. |
| 172.20.41. |
| 172.17.13. |
| 172.17.17. |
| 172.20.11. |
| 172.20.11. |
| 172.16.1. |
| 172.20.31. |
| 172.20.11. |
| 172.20.31. |
| 172.20.31. |
| 172.16.11. |
| 172.20.1. |
| 172.16.0. |
| 172.17.0. |
| 172.20.31. |
| 172.20.31. |
| 172.20.31. |
| 172.20.31. |
| 172.16.10. |
| 172.16.7. |
| 172.20.41. |
| 172.16.10. |
| 172.20.41. |
| 172.16.9. |
| 172.16.10. |
| 172.20.41. |
| 172.16.10. |
| 172.20.21. |
| 172.16.10. |
| 172.20.21. |
| 172.16.6. |
| 172.20.6. |
| 172.20.21. |
| 172.20.21. |
| 172.20.21. |
| 172.16.8. |
| 172.17.8. |
| 172.20.21. |
| 172.20.21. |
| 172.20.21. |
| 172.16.4. |
| 172.20.31. |
| 172.20.11. |
| 172.17.14. |
| 172.20.21. |
| 172.16.0. |
| 172.20.11. |
| 172.16.10. |
| 172.16.2. |
| 172.17.2. |
| 172.20.31. |
| 172.16.5. |
| 172.20.21. |
| 172.16.10. |
| 172.20.41. |
| 172.21.11. |
| 172.20.41. |
| 172.20.31. |
| 172.20.31. |
| 172.20.31. |
| 172.18.1. |
| 172.21.11. |
| 172.16.3. |
| 172.20.11. |
| 172.16.254. |
| 172.20.21. |
| 172.20.21. |
| 172.20.21. |
| 172.16.0. |
| 172.16.0. |
| 172.20.31. |
| 172.16.9. |
| 172.16.9. |
| 172.16.9. |
| 172.16.2. |
| 172.16.2. |
| 172.16.9. |
| 172.16.2. |
| 172.16.7. |
| 172.16.7. |
| 172.16.11.|
| 172.16.7. |
| 172.16.7. |
| 172.16.1. |
| 172.16.7. |
| 172.16.1. |
| 172.16.1. |
| 172.16.8. |
| 172.16.4. |
| 172.16.4. |
| 172.16.5. |
| 172.16.9. |
| 172.16.3. |
| 172.16.6. |
| 172.16.6. |
| 172.16.11.|
±--------------+
Still listing devices I donât want in that group.
regards and thank you.
JC
This is just a thought, I suspect itâs doing that because those devices have those IPâs attached to them either by association or VLAN or port.
Why not group the devices by name or location?