[ZBX-12629] Autodiscovery action conditions broken Created: 2017 Aug 29  Updated: 2017 Sep 04  Resolved: 2017 Sep 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.2.7
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Vladimir Kamarzin Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix_server.log.debug    
Sprint: Sprint 15

 Description   

We're noticed our autodiscovery actions stopped worked.

Example action we're have:

Type of calculation
?(A and B and C and D and E) and F and G

Label	Name	Action
A	Discovery check = Traffic-lights network discovery: TCP (23)	?Remove
B	Discovery check = Traffic-lights network discovery: TCP (443)	?Remove
C	Discovery check = Traffic-lights network discovery: TCP (80)	?Remove
D	Discovery check = Traffic-lights network discovery: TCP (554)	?Remove
E	Discovery check = Traffic-lights network discovery: ICMP ping	?Remove
F	Discovery rule = Traffic-lights network discovery	?Remove
G	Discovery status = Up	?Remove

I checked commit history by actions.c and found this:

commit 70691e331a0bef5efb0edced086b1724b29d317e
Author: vladislavs <vladislavs@f4e7fd02-d210-4e34-a1e0-d4093fb66cc2>
Date:   Wed Dec 7 07:36:05 2016 +0000

    ........S. [ZBXNEXT-3086] improved performance of action condition evaluation by ensuring that equivalent conditions are only checked once, thus there will be less queries to database
    
    git-svn-id: svn://svn.zabbix.com/trunk@64232 f4e7fd02-d210-4e34-a1e0-d4093fb66cc

So I think multiple conditions of same type doesn't working now after this commit.



 Comments   
Comment by Vladislavs Sokurenko [ 2017 Aug 29 ]

which version do you use ? is it 3.4.1 ? Please increase log level and attach the log

./sbin/zabbix_server -R log_level_increase=discoverer
Comment by Vladimir Kamarzin [ 2017 Aug 29 ]

Sorry I didn't checked 3.4.1, our version is 3.2.6 now. I'll perform an upgrade and take debug log.

vso so you experience issue on 3.2.6 it's not related to ZBXNEXT-3086 because it's only available in 3.4

Comment by Vladislavs Sokurenko [ 2017 Aug 29 ]

Could you please be so kind and describe what are you trying to achieve ?

This is documented behavior:

https://www.zabbix.com/documentation/3.4/manual/discovery/network_discovery

Every check of a service and a host (IP) performed by the network discovery module generates a discovery event.

So since every check is separate event, you cannot have a condition for it to be multiple checks at the same time

Comment by Vladislavs Sokurenko [ 2017 Aug 29 ]

This looks like a support request. For available options please see http://zabbix.org/wiki/Getting_help.

No indication of a bug. Closing as Won't Fix.

Comment by Vladimir Kamarzin [ 2017 Aug 29 ]

OK, here is the debug log from 3.4.1. Problem persist.

Discovery rule conatains following checks:

Checks
ICMP ping	
EditRemove
TCP (21)	
EditRemove
TCP (22)	
EditRemove
TCP (23)	
EditRemove
TCP (80)	
EditRemove
TCP (102)	
EditRemove
TCP (199)	
EditRemove
TCP (443)	
EditRemove
TCP (502)	
EditRemove
TCP (515)	
EditRemove
TCP (554)	
EditRemove
TCP (5000)	
EditRemove
TCP (5001)	
EditRemove
TCP (9999)	
EditRemove
TCP (30704)	
EditRemove

Test action:

Type of calculation
(A and B) and C and D
Conditions
Label	Name	Action
A	Discovery check = Traffic-lights network discovery: TCP (5000)	Remove
B	Discovery check = Traffic-lights network discovery: TCP (21)	Remove
C	Discovery rule = Traffic-lights network discovery	Remove
D	Discovery status = Up	Remove
Comment by Vladimir Kamarzin [ 2017 Aug 29 ]

OK, so probably zabbix web interface should not allow to add multiple checks with same type.

vso yes, I believe you are right, thanks for the report, this should be fixed.

Comment by Vladimir Kamarzin [ 2017 Aug 29 ]

OK I tested cumulative discovery rule with check:

TCP (21,199,5000)	

And action:

Label	Name	Action
A	Discovery check = Traffic-lights network discovery #TEST: TCP (21,199,5000)	Remove
B	Discovery rule = Traffic-lights network discovery	Remove
C	Discovery status = Up	Remove

This also doesn't work.

What I want to achieve is "find hosts which listen some ports" then "add host so host group, link to template"

vso there is real life scenario documented, please try it first https://www.zabbix.com/documentation/3.4/manual/discovery/network_discovery/rule
and actions are documented here:
https://www.zabbix.com/documentation/3.4/manual/config/notifications/action/conditions

Comment by Vladimir Kamarzin [ 2017 Aug 29 ]

Sure I read these docs several times. I see there is no way to check in `action condition` whether host has multiple open ports. Docs says it should work by specifying port ranges and port lists with commas, but it's not working really.
I posted forum thread https://www.zabbix.com/forum/showthread.php?p=202957

Comment by Alexander Vladishev [ 2017 Sep 04 ]

It is too difficult to analyze all the variants of the conflicting conditions. I Close this issue as "Won't Fix".

Generated at Mon Apr 07 14:04:41 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.