Hi all,
I am a newbie in Zabbix. For a project I need to discover automatically some hosts, using SNMP, and attach some items/triggers on it.
I created a rule R1, which create hosts based on host prototype H, linked to a template T. The result of snmpwalk is:
Each host are well created, name is complete with {#SNMPVALUE}.
Now, I need to add an item to monitor a value, which is obtains in:
And here things become complicated... I tried two things, with different issues:
Regards,
ErwannDR
I am a newbie in Zabbix. For a project I need to discover automatically some hosts, using SNMP, and attach some items/triggers on it.
I created a rule R1, which create hosts based on host prototype H, linked to a template T. The result of snmpwalk is:
[root@localhost mibbrowser]# snmpwalk -v 2c -c private localhost .1.3.6.1.4.1.34007.1.1.1.1.2.1.1.1
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.49 = STRING: "REC001"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.50 = STRING: "REC002"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.51 = STRING: "REC003"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.52 = STRING: "REC004"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.53 = STRING: "REC005"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.54 = STRING: "REC006"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.7.67.80.66. 95.48.48.49 = STRING: "CPB_001"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.7.67.80.66. 95.48.50.48 = STRING: "CPB_020"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.7.67.80.66. 95.48.51.48 = STRING: "CPB_030"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.49 = STRING: "REC001"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.50 = STRING: "REC002"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.51 = STRING: "REC003"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.52 = STRING: "REC004"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.53 = STRING: "REC005"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.54 = STRING: "REC006"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.7.67.80.66. 95.48.48.49 = STRING: "CPB_001"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.7.67.80.66. 95.48.50.48 = STRING: "CPB_020"
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.7.67.80.66. 95.48.51.48 = STRING: "CPB_030"
Each host are well created, name is complete with {#SNMPVALUE}.
Now, I need to add an item to monitor a value, which is obtains in:
[root@localhost mibbrowser]# snmpwalk -v 2c -c private localhost .1.3.6.1.4.1.34007.1.1.1.1.2.1.1.3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.49 = INTEGER: 2
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.50 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.51 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.52 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.53 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.54 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.7.67.80.66. 95.48.48.49 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.7.67.80.66. 95.48.50.48 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.7.67.80.66. 95.48.51.48 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.49 = INTEGER: 2
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.50 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.51 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.52 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.53 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.6.82.69.67. 48.48.54 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.7.67.80.66. 95.48.48.49 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.7.67.80.66. 95.48.50.48 = INTEGER: 3
SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.7.67.80.66. 95.48.51.48 = INTEGER: 3
And here things become complicated... I tried two things, with different issues:
- in template T, I added an item, which SNMP OID= SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.3.{#SNMPINDEX }. Host has this item created, but can not parse oid, because {#SNMPINDEX} is not interpreted as a macro. I did found a way to store {#SNMPINDEX} in a macro to reuse it in the template.
- in template T, I added a new discovery rule R2, which create item with the same oid that in case 1.. In this case, things are more correct, but an issue is present: by doing this, discovered host as 9 items: the 9 results of snmpwalk. What I wanted was just add the item located in SNMPv2-SMI::enterprises.34007.1.1.1.1.2.1.1.1.6.82.69.67. 48.48.49
Regards,
ErwannDR
Comment