Prototype-X / Zabbix-Template-Juniper-MX-BGP4-ipv4-ipv6

Zabbix Template for Juniper MX discovery BGP4 peers ipv4 and ipv6, RE, interfaces
GNU General Public License v3.0
36 stars 23 forks source link

Run script with snmpv3 #3

Closed chuegel closed 7 years ago

chuegel commented 7 years ago

Thank you for the script. Is there a way to get the script running with snmpv3?

Prototype-X commented 7 years ago

Hi! Now script support only snmp v2. In future versions, I think there is support snmp v3

chuegel commented 7 years ago

It would be great if you could support also snmpv3. Thx

chuegel commented 7 years ago

Any news on supporting snmpv3 in your script? Thanks :)

Prototype-X commented 7 years ago

Now I added support for snmp v3

Junos: set snmp v3 usm local-engine user test1 authentication-sha authentication-password test1234 set snmp v3 usm local-engine user test1 privacy-aes128 privacy-password test1234 set snmp v3 vacm security-to-group security-model usm security-name test1 group view-all

set snmp v3 vacm access group view-all default-context-prefix security-model usm security-level privacy read-view view-all

set snmp v3 vacm access group view-all default-context-prefix security-model usm security-level privacy notify-view view-all

set snmp view view-all oid .1 include

shell: LLD.py -h 1.1.1.1 -v 3 -u test1 -l authPriv -a SHA -A test1234 -x AES -X test1234 -mi "{#PEERADDR}" -m "{#PREFXTBL}" "{#ADDRTYPE}" "{#ASNUM}"

Zabbix key: LLD.py["-h", {HOST.CONN}, "-v3", "-utest1", "-lauthPriv", "-aSHA", "-Atest1234", "-xAES" "-Xtest1234", "-mi", "{#PEERADDR}", "-m", "{#PREFXTBL}", "{#ADDRTYPE}", "{#ASNUM}"]

chuegel commented 7 years ago

Hi, thank you very much for supporting snnmpv3. :)

I´m using the key like this with vars:

LLD.py["-h", {HOST.CONN}, "-v3", "-u{$SNMP_SECNAME}", "-lauthPriv", "-aSHA", "-A{$SNMP_AUTH}", "-xAES", "-X{$SNMP_PRIV}", "-mi", "{#PEERADDR}", "-m", "{#PREFXTBL}", "{#ADDRTYPE}", "{#ASNUM}"]

works like a charm

Prototype-X commented 7 years ago

You’re welcome :)