Hello there,
I have created discovery rule which scans /24 network for host and polls by SNMPv3 agent. It takes 3 queries.
Then I create action for automatic registration of discovered hosts.
During test I have changing rules of discovery and host registration, then delete all discovered hosts from web-interface to see how it will works with new rules.
Now it not working
I starts debug it and I increased loglevel for discoverer process, so what I see:
etc. (output truncated).
I guess that is problem. Because in zabbix configuration, on 'Hosts' page, NO hosts with that addresses. I have deleted it!
I check database content in 'hosts' and 'interface' tables. I not found this IP address.
Any idea how to debug and resolve it?
It have another yet strange thing... I created 3 conditions for autodiscovery action. Debug logs tell me that these conditions fails but it is wrong - substring that must exists in results actually exists:
Conditions is following (action id=26):
Logic: A and B and C
Label Name Action
A Discovery rule equals DC/PDU Devices
B Received value contains Rack PDU
C Received value contains APC
Discovery results (from debug log):
188:20210214:055651.746 zbx_snmp_get_octet_string() full value:'STRING: APC Web/SNMP Management Card (MB:v4.1.1 PF:v3.9.2 PN:apc_hw02_aos_392.bin AF1:v3.9.2 AN1:apc_hw02_rpdu_392.bin MN:AP7952 HR:B2 SN: ZA0711001608 MD:03/13/2007) ' hint:'255a'
188:20210214:055651.784 zbx_snmp_get_octet_string() full value:'STRING: C017-PDU1' hint:'255a'
188:20210214:055651.825 zbx_snmp_get_octet_string() full value:'STRING: "Rack PDU"' hint:'(null)'
Action conditions check (from debug log):
188:20210214:055651.836 In check_action_conditions() actionid:26 eventsource:1
188:20210214:055651.836 conditionid:78 conditiontype:18 cond.value:'16' cond.value2:'' result:SUCCEED
188:20210214:055651.836 conditionid:73 conditiontype:12 cond.value:'Rack PDU' cond.value2:'' result:FAIL
188:20210214:055651.836 End of check_action_conditions():FAIL
188:20210214:055651.836 In check_action_conditions() actionid:26 eventsource:1
188:20210214:055651.836 conditionid:78 conditiontype:18 cond.value:'16' cond.value2:'' result:SUCCEED
188:20210214:055651.836 conditionid:73 conditiontype:12 cond.value:'Rack PDU' cond.value2:'' result:FAIL
188:20210214:055651.836 End of check_action_conditions():FAIL
188:20210214:055651.836 In check_action_conditions() actionid:26 eventsource:1
188:20210214:055651.836 conditionid:78 conditiontype:18 cond.value:'16' cond.value2:'' result:SUCCEED
188:20210214:055651.836 conditionid:73 conditiontype:12 cond.value:'Rack PDU' cond.value2:'' result:SUCCEED
188:20210214:055651.836 conditionid:74 conditiontype:12 cond.value:'APC' cond.value2:'' result:FAIL
188:20210214:055651.836 End of check_action_conditions():FAIL
I not understand why...
PS: Zabbix v. 5.2.4, MySQL
I have created discovery rule which scans /24 network for host and polls by SNMPv3 agent. It takes 3 queries.
Then I create action for automatic registration of discovered hosts.
During test I have changing rules of discovery and host registration, then delete all discovered hosts from web-interface to see how it will works with new rules.
Now it not working

I starts debug it and I increased loglevel for discoverer process, so what I see:
Code:
190:20210214:053920.009 host at 10.23.101.50 is already in database 190:20210214:053920.010 service is already in database 190:20210214:053920.010 service is already in database 190:20210214:053920.011 service is already in database 190:20210214:053956.576 host at 10.23.101.53 is already in database 190:20210214:053956.577 service is already in database 190:20210214:053956.578 service is already in database 190:20210214:053956.578 service is already in database
I guess that is problem. Because in zabbix configuration, on 'Hosts' page, NO hosts with that addresses. I have deleted it!
I check database content in 'hosts' and 'interface' tables. I not found this IP address.
Any idea how to debug and resolve it?
It have another yet strange thing... I created 3 conditions for autodiscovery action. Debug logs tell me that these conditions fails but it is wrong - substring that must exists in results actually exists:
Conditions is following (action id=26):
Logic: A and B and C
Label Name Action
A Discovery rule equals DC/PDU Devices
B Received value contains Rack PDU
C Received value contains APC
Discovery results (from debug log):
188:20210214:055651.746 zbx_snmp_get_octet_string() full value:'STRING: APC Web/SNMP Management Card (MB:v4.1.1 PF:v3.9.2 PN:apc_hw02_aos_392.bin AF1:v3.9.2 AN1:apc_hw02_rpdu_392.bin MN:AP7952 HR:B2 SN: ZA0711001608 MD:03/13/2007) ' hint:'255a'
188:20210214:055651.784 zbx_snmp_get_octet_string() full value:'STRING: C017-PDU1' hint:'255a'
188:20210214:055651.825 zbx_snmp_get_octet_string() full value:'STRING: "Rack PDU"' hint:'(null)'
Action conditions check (from debug log):
188:20210214:055651.836 In check_action_conditions() actionid:26 eventsource:1
188:20210214:055651.836 conditionid:78 conditiontype:18 cond.value:'16' cond.value2:'' result:SUCCEED
188:20210214:055651.836 conditionid:73 conditiontype:12 cond.value:'Rack PDU' cond.value2:'' result:FAIL
188:20210214:055651.836 End of check_action_conditions():FAIL
188:20210214:055651.836 In check_action_conditions() actionid:26 eventsource:1
188:20210214:055651.836 conditionid:78 conditiontype:18 cond.value:'16' cond.value2:'' result:SUCCEED
188:20210214:055651.836 conditionid:73 conditiontype:12 cond.value:'Rack PDU' cond.value2:'' result:FAIL
188:20210214:055651.836 End of check_action_conditions():FAIL
188:20210214:055651.836 In check_action_conditions() actionid:26 eventsource:1
188:20210214:055651.836 conditionid:78 conditiontype:18 cond.value:'16' cond.value2:'' result:SUCCEED
188:20210214:055651.836 conditionid:73 conditiontype:12 cond.value:'Rack PDU' cond.value2:'' result:SUCCEED
188:20210214:055651.836 conditionid:74 conditiontype:12 cond.value:'APC' cond.value2:'' result:FAIL
188:20210214:055651.836 End of check_action_conditions():FAIL
I not understand why...
PS: Zabbix v. 5.2.4, MySQL
Comment