Hello!
I have following Discovery rule:
discovery[{#PHYNAME},1.3.6.1.2.1.47.1.1.1.1.7,{#CPUINDEX},1. 3.6.1.4.1.9.9.109.1.1.1.1.2]
And filter applied to the rule:
{#PHYNAME} matches (?i)CPU
snmpwalk data:
# snmpwalk -Ofn <credentials> 1.3.6.1.2.1.47.1.1.1.1.7 | grep CPU
.1.3.6.1.2.1.47.1.1.1.1.7.1001 = STRING: "CPU of Switching Processor 5"
.1.3.6.1.2.1.47.1.1.1.1.7.1017 = STRING: "CPU of Routing Processor 5"
.1.3.6.1.2.1.47.1.1.1.1.7.2001 = STRING: "CPU of Module 1"
# snmpwalk -Ofn <credentials> 1.3.6.1.4.1.9.9.109.1.1.1.1.2
.1.3.6.1.4.1.9.9.109.1.1.1.1.2.1 = INTEGER: 1017
.1.3.6.1.4.1.9.9.109.1.1.1.1.2.2 = INTEGER: 1001
.1.3.6.1.4.1.9.9.109.1.1.1.1.2.3 = INTEGER: 2001
Question №1:
Which SNMP Index will be taken by built-in macro {#SNMPINDEX}:
<1001,1017,2001> or <1,2,3> and how to change its choice?
Question №2:
Macro {#SNMPINDEX} now takes only <1001,1017,2001>.And after some research i realized that there are no SNMP VALUE recieved in {#CPUINDEX}. And i cant understand why? There are no errors with recieving this data through snmpwalk. Debug says (What "zbx_snmp_set_result() type" stands for?):
For {#PHYNAME}:
75758:20181108:205703.613 In zbx_snmp_process_discovery()
75758:20181108:205703.613 In zbx_snmp_translate() OID:'1.3.6.1.2.1.47.1.1.1.1.7'
75758:20181108:205703.613 End of zbx_snmp_translate() oid_translated:'1.3.6.1.2.1.47.1.1.1.1.7'
75758:20181108:205703.613 In zbx_snmp_walk() type:6 OID:'1.3.6.1.2.1.47.1.1.1.1.7' bulk:1
75758:20181108:205703.617 zbx_snmp_walk() snmp_synch_response() status:0 s_snmp_errno:0 errstat:0 max_vars:4
75758:20181108:205703.617 In zbx_snmp_set_result() type:4
75758:20181108:205703.617 In zbx_snmp_get_octet_string()
75758:20181108:205703.617 zbx_snmp_get_octet_string() full value:'STRING: "WS-C6506-E"' hint:'(null)'
75758:20181108:205703.617 End of zbx_snmp_get_octet_string():'WS-C6506-E'
75758:20181108:205703.617 End of zbx_snmp_set_result():SUCCEED
...
75758:20181108:205703.712 End of zbx_snmp_set_result():SUCCEED
75758:20181108:205703.712 End of zbx_snmp_walk():SUCCEED
For {#CPUINDEX}:
75758:20181108:205703.712 In zbx_snmp_translate() OID:'1.3.6.1.4.1.9.9.109.1.1.1.1.2'
75758:20181108:205703.712 End of zbx_snmp_translate() oid_translated:'1.3.6.1.4.1.9.9.109.1.1.1.1.2'
75758:20181108:205703.712 In zbx_snmp_walk() type:6 OID:'1.3.6.1.4.1.9.9.109.1.1.1.1.2' bulk:1
75758:20181108:205703.714 zbx_snmp_walk() snmp_synch_response() status:0 s_snmp_errno:0 errstat:0 max_vars:4
75758:20181108:205703.714 In zbx_snmp_set_result() type:2
75758:20181108:205703.714 End of zbx_snmp_set_result():SUCCEED
75758:20181108:205703.714 In zbx_snmp_set_result() type:2
75758:20181108:205703.714 End of zbx_snmp_set_result():SUCCEED
75758:20181108:205703.714 In zbx_snmp_set_result() type:2
75758:20181108:205703.715 End of zbx_snmp_set_result():SUCCEED
75758:20181108:205703.715 End of zbx_snmp_walk():SUCCEED
75758:20181108:205703.715 End of zbx_snmp_process_discovery():SUCCEED
P.S. I have fresh install of zabbix 4.0.1 and tried to turn off bulk requests - still no results. Thank you in advance.
I have following Discovery rule:
discovery[{#PHYNAME},1.3.6.1.2.1.47.1.1.1.1.7,{#CPUINDEX},1. 3.6.1.4.1.9.9.109.1.1.1.1.2]
And filter applied to the rule:
{#PHYNAME} matches (?i)CPU
snmpwalk data:
# snmpwalk -Ofn <credentials> 1.3.6.1.2.1.47.1.1.1.1.7 | grep CPU
.1.3.6.1.2.1.47.1.1.1.1.7.1001 = STRING: "CPU of Switching Processor 5"
.1.3.6.1.2.1.47.1.1.1.1.7.1017 = STRING: "CPU of Routing Processor 5"
.1.3.6.1.2.1.47.1.1.1.1.7.2001 = STRING: "CPU of Module 1"
# snmpwalk -Ofn <credentials> 1.3.6.1.4.1.9.9.109.1.1.1.1.2
.1.3.6.1.4.1.9.9.109.1.1.1.1.2.1 = INTEGER: 1017
.1.3.6.1.4.1.9.9.109.1.1.1.1.2.2 = INTEGER: 1001
.1.3.6.1.4.1.9.9.109.1.1.1.1.2.3 = INTEGER: 2001
Question №1:
Which SNMP Index will be taken by built-in macro {#SNMPINDEX}:
<1001,1017,2001> or <1,2,3> and how to change its choice?
Question №2:
Macro {#SNMPINDEX} now takes only <1001,1017,2001>.And after some research i realized that there are no SNMP VALUE recieved in {#CPUINDEX}. And i cant understand why? There are no errors with recieving this data through snmpwalk. Debug says (What "zbx_snmp_set_result() type" stands for?):
For {#PHYNAME}:
75758:20181108:205703.613 In zbx_snmp_process_discovery()
75758:20181108:205703.613 In zbx_snmp_translate() OID:'1.3.6.1.2.1.47.1.1.1.1.7'
75758:20181108:205703.613 End of zbx_snmp_translate() oid_translated:'1.3.6.1.2.1.47.1.1.1.1.7'
75758:20181108:205703.613 In zbx_snmp_walk() type:6 OID:'1.3.6.1.2.1.47.1.1.1.1.7' bulk:1
75758:20181108:205703.617 zbx_snmp_walk() snmp_synch_response() status:0 s_snmp_errno:0 errstat:0 max_vars:4
75758:20181108:205703.617 In zbx_snmp_set_result() type:4
75758:20181108:205703.617 In zbx_snmp_get_octet_string()
75758:20181108:205703.617 zbx_snmp_get_octet_string() full value:'STRING: "WS-C6506-E"' hint:'(null)'
75758:20181108:205703.617 End of zbx_snmp_get_octet_string():'WS-C6506-E'
75758:20181108:205703.617 End of zbx_snmp_set_result():SUCCEED
...
75758:20181108:205703.712 End of zbx_snmp_set_result():SUCCEED
75758:20181108:205703.712 End of zbx_snmp_walk():SUCCEED
For {#CPUINDEX}:
75758:20181108:205703.712 In zbx_snmp_translate() OID:'1.3.6.1.4.1.9.9.109.1.1.1.1.2'
75758:20181108:205703.712 End of zbx_snmp_translate() oid_translated:'1.3.6.1.4.1.9.9.109.1.1.1.1.2'
75758:20181108:205703.712 In zbx_snmp_walk() type:6 OID:'1.3.6.1.4.1.9.9.109.1.1.1.1.2' bulk:1
75758:20181108:205703.714 zbx_snmp_walk() snmp_synch_response() status:0 s_snmp_errno:0 errstat:0 max_vars:4
75758:20181108:205703.714 In zbx_snmp_set_result() type:2
75758:20181108:205703.714 End of zbx_snmp_set_result():SUCCEED
75758:20181108:205703.714 In zbx_snmp_set_result() type:2
75758:20181108:205703.714 End of zbx_snmp_set_result():SUCCEED
75758:20181108:205703.714 In zbx_snmp_set_result() type:2
75758:20181108:205703.715 End of zbx_snmp_set_result():SUCCEED
75758:20181108:205703.715 End of zbx_snmp_walk():SUCCEED
75758:20181108:205703.715 End of zbx_snmp_process_discovery():SUCCEED
P.S. I have fresh install of zabbix 4.0.1 and tried to turn off bulk requests - still no results. Thank you in advance.