Hi all!
I faced a problem with the new (Zabbix 2.0) Low Level Discovery (LLD) for SNMP which made LLD unusable for me. Therefore I decided to build an external script to use it for LLD. Of course it should integrate into Zabbix seamless, I did't want to re-invent the whole LLD functionality!
Motivation
The problem I was facing was, that I had some OIDs which hadn't the Index position in the last element of the OID. The last element of those OIDs where always zero.
Also I hat OIDs which had more than one element I would like to use for indexing. For example some of the OIDs had a trailing IP Address as part of the OID. something like this:
.1.2.3.4.0.1.0.1.0.198.18.0.123 = user1@domain
.1.2.3.4.0.1.0.2.0.198.18.0.123 = Logintime
.1.2.3.4.0.1.0.3.0.198.18.0.123 = Security Level
.1.2.3.4.0.2.0.1.0.198.18.1.10 = user2@domain
.1.2.3.4.0.2.0.2.0.198.18.1.10 = Logintime
.1.2.3.4.0.2.0.3.0.198.18.1.10 = Security Level
I wanted to use multiple Indexes to dynamically discover those values. For the example above I wanted to have 2 Indexes, first would be the Index for the User Number (1 or 2) which is Element 6, and the second Index should be the trailing IP Address.
The build-in low level discovery for SNMP of Zabbix 2.0 only interprets the last element, therefore it was useless for me.
Solution
Because I couldn't solve this problem with the build-in LLD for SNMP, I built my own.
If you are interested how I solved that problem, please check out my git repository: github.com/simonkowallik/Zabbix-Addons
For the above example, my discovery rule looks like this:
Name: My.Discovery.RuleName
Key: advsnmp.discovery[{HOST.IP},"-v2c -cpublic",.1.2.3.4.0,1.1,5.4]
I have {#ADVSNMPINDEX1} for the 1 and 2 (User Number)
and {#ADVSNMPINDEX2} for the IP Address.
My SNMPv2 Items of this this discovery rule will have OIDs like:
.1.2.3.4.0.{#ADVSNMPINDEX1}.0.1.0.{#ADVSNMPINDEX2} = userN@domain
.1.2.3.4.0.{#ADVSNMPINDEX1}.0.2.0.{#ADVSNMPINDEX2} = Logintime
.1.2.3.4.0.{#ADVSNMPINDEX1}.0.3.0.{#ADVSNMPINDEX2} = Security Level
I hope this little Addon is helpfull for some of you!
Feedback is welcome!
br,
netmon
I faced a problem with the new (Zabbix 2.0) Low Level Discovery (LLD) for SNMP which made LLD unusable for me. Therefore I decided to build an external script to use it for LLD. Of course it should integrate into Zabbix seamless, I did't want to re-invent the whole LLD functionality!
Motivation
The problem I was facing was, that I had some OIDs which hadn't the Index position in the last element of the OID. The last element of those OIDs where always zero.
Also I hat OIDs which had more than one element I would like to use for indexing. For example some of the OIDs had a trailing IP Address as part of the OID. something like this:
.1.2.3.4.0.1.0.1.0.198.18.0.123 = user1@domain
.1.2.3.4.0.1.0.2.0.198.18.0.123 = Logintime
.1.2.3.4.0.1.0.3.0.198.18.0.123 = Security Level
.1.2.3.4.0.2.0.1.0.198.18.1.10 = user2@domain
.1.2.3.4.0.2.0.2.0.198.18.1.10 = Logintime
.1.2.3.4.0.2.0.3.0.198.18.1.10 = Security Level
I wanted to use multiple Indexes to dynamically discover those values. For the example above I wanted to have 2 Indexes, first would be the Index for the User Number (1 or 2) which is Element 6, and the second Index should be the trailing IP Address.
The build-in low level discovery for SNMP of Zabbix 2.0 only interprets the last element, therefore it was useless for me.
Solution
Because I couldn't solve this problem with the build-in LLD for SNMP, I built my own.
If you are interested how I solved that problem, please check out my git repository: github.com/simonkowallik/Zabbix-Addons
For the above example, my discovery rule looks like this:
Name: My.Discovery.RuleName
Key: advsnmp.discovery[{HOST.IP},"-v2c -cpublic",.1.2.3.4.0,1.1,5.4]
I have {#ADVSNMPINDEX1} for the 1 and 2 (User Number)
and {#ADVSNMPINDEX2} for the IP Address.
My SNMPv2 Items of this this discovery rule will have OIDs like:
.1.2.3.4.0.{#ADVSNMPINDEX1}.0.1.0.{#ADVSNMPINDEX2} = userN@domain
.1.2.3.4.0.{#ADVSNMPINDEX1}.0.2.0.{#ADVSNMPINDEX2} = Logintime
.1.2.3.4.0.{#ADVSNMPINDEX1}.0.3.0.{#ADVSNMPINDEX2} = Security Level
I hope this little Addon is helpfull for some of you!
Feedback is welcome!
br,
netmon


Comment