[ZBXNEXT-5187] An option to provide host groups as IP range in discovery rule Created: 2019 Apr 19 Updated: 2019 Apr 19 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Server (S) |
Affects Version/s: | 4.2.0 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Minor |
Reporter: | Roee Zabari | Assignee: | Andris Zeila |
Resolution: | Unresolved | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Hi, My use case for discovery is to run a command on the hosts (using Zabbix agent --> system.run key) to check if certain service is installed, and link the relevant template to the host. Scanning an entire IP range for this matter is unnecessary, resource-consuming, and time-consuming. As a workaround, I wrote a script that runs in a fixed interval to take all the IPs of the hosts configured in Zabbix, and add them as single IP addresses to the discovery rule (using the API), but of course having the ability to just add an host group as an IP range will be great. Thanks, |
Comments |
Comment by richlv [ 2019 Apr 19 ] |
If you already have the solution in place to look up hosts and use the API, it might be simpler to have the script do the system.run and link the needed templates. |
Comment by Roee Zabari [ 2019 Apr 19 ] |
I actually wrote this kind of script in the my last work place, it was very complex, a few hundred lines of code in Perl. The current workaround script (written in Python with zabbix-api module) is very simple and has almost no logic at all - it just queries for all ip addresses with hostinterface.get API call, and updates the discovery rule with drule.update API call. |