[ZBXNEXT-6006] iprange limit of 2048 characters in network discovery rules Created: 2020 Apr 19  Updated: 2023 Sep 27

Status: Confirmed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 5.0.1
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Christoph Loesch Assignee: Edgars Melveris
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Steps to reproduce:

  1. login to WebUI / Frontend
  2. navigate to Configuration -> Discovery -> Create discovery rule
  3. In field "IP range" enter ip-ranges seperated by comma until you reach 2048 characters
  4. e.g. clone the default "Local Network" rule and add 192.168.0.1-254, as much as you can.

Result:
rule can not be extended if number of ipranges exceeds 2048 characters
Expected:
to be able to extend the ip ranges as usual while entering more than 2K characters.
like at least 4k characters or better 64K like it is stated in the manual here:
https://www.zabbix.com/documentation/5.0/manual/discovery/network_discovery/rule



 Comments   
Comment by Alexey Pustovalov [ 2020 Apr 19 ]

Hmm... why do you need so long field? Oo Could you show any use case?
Actually you can specify very big ranges, like 10.0.0.0/16... or you would like to exclude some IP addresses?

Comment by Christoph Loesch [ 2020 Apr 19 ]

for explanation:
we manage a rather small (actualy 60 sites) network and since about 55 or so sites, we can not extend the iprange field where we add every site.
ipranges look for every site same: "10.A.B.17-32,10.A.B.99-101" (where A.B changes for every site)
edit: we do not want to use 10.0.0.0/8 to lower the check-volume that has to be done by zabbix. our thinking is: the less zabbix has to check, the faster the checks will work and we do not have to wait for long scanning.

what we did in meanwhile:
clone that one discover rule for every site and in iprange add only one ip range of this particular site.
-> but this clutters the db and its painful to get discovered hosts and returned values from checks out of the db (which we do, to use in other applications)

so we checked in db the limit of that particular field is set to 2048 and in frontend the limit of the textarea is also 2048.
is this by particular reason set to 2K ?
in manual it is described with a limit of 64K which we would surely not run into.

so our guess is, this is a bug?

Comment by Christoph Loesch [ 2020 Apr 19 ]

oh sorry, i guess i mis-selected components. it should not be "Frontend (F), Server (S)" but rather "Frontend (F), Installation (I)".
(and if applicable: this issue is a blocker, at least for us)
but i can not edit this.

Comment by Christoph Loesch [ 2020 Apr 19 ]

that was increased already five years ago from 255 to 2048 in ZBXNEXT-2892 - Increase size of IP ranges for network discovery rules

but the manual states 64K - so i would suggest/ask, like it was done in ZBXNEXT-2892, now increase from 2048 to 65536
old git-commit: https://git.zabbix.com/projects/ZBX/repos/zabbix/commits/ed71addefac627005fb39a05ceb44cded6bd3575

Comment by Edgars Melveris [ 2020 Apr 20 ]

Actually the way I understand what's written in the manual, it states that the limits is not 64k characters, but 64k ip addresses:

Range of IP addresses: 192.168.1-10.1-255. The range is limited by the total number of covered addresses (less than 64K).

Which can be achieved easily without using even the 2k characters.

But I agree that your use case might require more. At the same time, you don't use proxies, do you?

Comment by Christoph Loesch [ 2020 Apr 20 ]

Thanks for looking into this.

Well, actually we monitor around 60 sites and at each site we try to discover 19 hosts, that would also be only about 1K IP addresses so in this manner 64K would be also more than enough for us.

But in our scenario we can not go this far with only 2048characters of input.

No, as we mainly monitor network devices, there are no devices in the network capable of running a zabbix-proxy, but most of our routers at least have zabbix-agent installed.

Comment by Edgars Melveris [ 2020 Jun 08 ]

I've moved this to feature requests, as this cannot be considered a bug. Currently, you can work around the issue by splitting the rules in smaller segments.

Generated at Sat Jul 05 09:20:41 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.