[ZBXNEXT-306] ability to skip already existing hosts in network discovery actions Created: 2010 Apr 19  Updated: 2018 Dec 12

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: None

Type: New Feature Request Priority: Major
Reporter: richlv Assignee: Unassigned
Resolution: Unresolved Votes: 9
Labels: networkdiscovery
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBXNEXT-228 Discovering and adding new hosts Closed
is duplicated by ZBXNEXT-2718 New condition on actions to check if ... Closed

 Description   

there could be a feature to skip already existing hosts (both manually added and added by discovery) when performing actions.

not sure about implementation details, maybe this could be added as an action condition (but it would have to be intuitive enough - for example, adding condition like that and having an action to delete the host would not make much sens).



 Comments   
Comment by Robert Middleswarth [ 2011 Feb 01 ]

On the action side it could be as simple as adding a condition already exists. Although I think it would be better to add an option to the discovery rule to ignore existing hosts so it doesn't even scan IP of hosts that exist.

Thanks
Robert

Comment by Andy Shinn [ 2011 Feb 17 ]

I use the discovery for alerting of new hosts that might not be added already so that I can manually evaluate if they should be added. This would be nice so I am not getting the same alerts for hosts I have already added.

Comment by Oleksii Zagorskyi [ 2012 Nov 22 ]

ZBXNEXT-818 asks for almost opposite, so they both could be implemented by supporting a clause "IS" and "IS NOT" at discovery rule level or at operation condition level.

I'd prefer discovery rule level for this feature.

Comment by Harri [ 2014 Mar 29 ]

I would prefer to have the known hosts filtered on discovery level, too.

My scenario is: I've got different templates for server systems, e.g. to distinguish between Linux containers, KVM hosts and real hosts. Zabbix cannot detect the difference, so the list of automatically assigned templates has to be adjusted sometimes. Its pretty painful, if the Zabbix server breaks this on the next discovery.

When I started with Zabbix it was pretty confusing for me to see all the known hosts reappear in the discovery audit again and again. It is surely not what you expect: "to discover" means to find something new. Having the ability to ignore the hosts listed in the "Discovered Hosts" group would help to avoid this confusion.

Comment by richlv [ 2014 Mar 29 ]

try using action condition "discovered", not "up"

Comment by Harri [ 2014 Apr 01 ]

Sorry to say, but "discovered" didn't work at all. For testing I replaced "status = up" with "status = discovered" in the actions and deleted a host. By now it didn't come back. I see the other IP addresses in this net in the audit, but not the deleted host.

As written before, I would prefer a discovery rule, anyway.

Comment by richlv [ 2014 Apr 01 ]

that's because host is already considered to be discovered (dhost/dservice tables) :/
maybe ZBX-3336 will affect this in some way

Comment by Harri [ 2014 Apr 01 ]

Obviously looking at status = discovered is a bad choice. Zabbix cannot detect a reused IPv4 address .

I would like to have more control about which hosts are discovered. Looping over all IP addresses in a subnet and checking if there is a zabbix agent running is not sufficient. Maybe some kind of callback function could be supported? This would allow me to implement more flexible discovery rules in a shell script.

Comment by Filipe Paternot [ 2015 Mar 25 ]

Well, not necessarily you may want to not rediscover a already monitored host. If things change (and they usually do), you may want to reflect it. I know i do, and it's working good.

When you discover a host is a linux, for instance. It is a discovered host, added, enabled and with linux template. But still there may be other checks and rules to match. What hardware it runs on, if it has a webserver... If your rules are dynamic enough (and they should be), it is required to "rediscover" everything. Besides, things change over time.

However, sometimes you do not want it.
For instance, some hosts have multiple ips. By multiple, i mean by dozens. They are added as additional interfaces. The problem comes when some of this ips are "cluster ips" and change from host to host. I know i should not discover them, but i dont have any criteria/flag in my controls to exclude them. It still wise to discover and if it is an additional interface (aka already monitored host), it would't do anything.

Comment by Harri [ 2015 Apr 23 ]

I completely agree. Surely things change. The IP address of a service might change or move from one host to another, as in your example. Point is, these changes are not covered by Zabbix at all. Even if the dynamic rules discover the service under a new IP address, Zabbix looses history and gets confused about the old IP address, as soon as it reappears with other services. Looking at IPv4 there is a pretty high probability for this to happen.

Now, we know Zabbix cannot handle reused IP addresses. Further we know that IP addresses (and host names) are insufficient to reliably identify a service to watch. Yet Zabbix continues to loop over all IPv4 addresses, using discovery rules and actions to overwrite host entries in the database, ignoring a manual configuration. That appears strange to me.

Comment by Angutivik Casper RĂșnur Tausen Hansen [ 2018 Dec 12 ]

Having this as a discovery rule would be nice.

As an example, I could use office at where I work. We have servers and computers on the same network, which is our playground before we release anything into the real world. Zabbix discovers both servers, computers, even phones, and we saw that as an opportunity to check for unknown hosts, but unfortunately, Zabbix doesn't give the functionality to check whether a host is known or not.

If this chooses to be a thing, one could check whether a host existed in a host group or not, and if not, alert the administrators. If host doesn't exist in host group, then alert administrators

Generated at Wed Apr 24 16:50:37 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.