Skip to content

SNMP Plugin supports SHA-512? #8747

@FedericoSinisi

Description

@FedericoSinisi

Hi all,

I have an issue configuring snmp plugin with telegraf on a snmpv3. I am able to get data with snmpwalk with "SHA-512"

snmpwalk -v3 -l authNoPriv -u test-a SHA-512 -A "test1" xxx.xxx.xxx.xxx

iso.3.6.1.2.1.1.1.0 = STRING: "Acme Packet Net-Net 3900"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.9148.1.3.3
iso.3.6.1.2.1.1.3.0 = Timeticks: (13445580) 1 day, 13:20:55.80
iso.3.6.1.2.1.1.4.0 = ""
iso.3.6.1.2.1.1.5.0 = STRING: "SRS12"
iso.3.6.1.2.1.1.6.0 = ""
iso.3.6.1.2.1.1.7.0 = INTEGER: 79
iso.3.6.1.2.1.1.8.0 = Timeticks: (13445591) 1 day, 13:20:55.91
iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.4.1.9148.2.1.1.1
iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.4.1.9148.2.1.1.2
iso.3.6.1.2.1.1.9.1.2.3 = OID: iso.3.6.1.4.1.9148.2.1.2.1
iso.3.6.1.2.1.1.9.1.2.4 = OID: iso.3.6.1.4.1.9148.2.1.2.3
iso.3.6.1.2.1.1.9.1.2.5 = OID: iso.3.6.1.4.1.9148.2.1.3.2
iso.3.6.1.2.1.1.9.1.2.6 = OID: iso.3.6.1.4.1.9148.2.1.4.1
iso.3.6.1.2.1.1.9.1.2.7 = OID: iso.3.6.1.4.1.9148.2.1.4.2
iso.3.6.1.2.1.1.9.1.2.8 = OID: iso.3.6.1.4.1.9148.2.1.5.1

But i cannot configure SHA-512 on the configuration file.

Error in plugin: agent 180.166.136.55:161: invalid authProtocol

So, i try to setup to "SHA"
`/etc/telegraf/telegraf.d/sbc-snmp.conf

[[outputs.influxdb]]
urls = ["http://192.168.0.105:8086"] # required
database = "telegraf"
precision = "s"
timeout = "5s"

[[inputs.snmp]]
agents = [ "xxx.xxx.xxx.xxx:161" ]
version = 3
sec_name = "test"
auth_protocol = "SHA"
auth_password = "test1"
sec_level = "authNoPriv"

name = "snmp"

[[inputs.snmp.table]]
name = "IF"
inherit_tags = [ "source" ]

[[inputs.snmp.table.field]]
name = "ifName"
oid = "IF-MIB::ifName"
is_tag = true
[[inputs.snmp.table.field]]
name = "ifAlias"
oid = "IF-MIB::ifAlias"
is_tag = true

[[inputs.snmp.table.field]]
oid = "IF-MIB::ifHighSpeed"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifAdminStatus"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifOperStatus"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifHCInOctets"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifHCOutOctets"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifInDiscards"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifOutDiscards"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifInErrors"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifOutErrors"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifInUnknownProtos"

[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysName.0"
name = "source"
is_tag = true

And its seems to wont bring inputs from the device

`telegraf --input-filter snmp --test --config /etc/telegraf/telegraf.d/sbc-snmp.conf --debug

2021-01-25T17:59:30Z I! Starting Telegraf 1.17.0
2021-01-25T17:59:30Z D! [agent] Initializing plugins
2021-01-25T17:59:30Z D! [agent] Starting service inputs
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifName"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifAlias"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifHighSpeed"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifAdminStatus"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifOperStatus"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifHCInOctets"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifHCOutOctets"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifInDiscards"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifOutDiscards"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifInErrors"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifOutErrors"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "IF-MIB::ifInUnknownProtos"
2021-01-25T17:59:30Z D! [inputs.snmp] executing "snmptranslate" "-Td" "-Ob" "RFC1213-MIB::sysName.0"
2021-01-25T17:59:31Z D! [agent] Stopping service inputs
2021-01-25T17:59:31Z D! [agent] Input channel closed
2021-01-25T17:59:31Z D! [agent] Stopped Successfully`

Metadata

Metadata

Assignees

Labels

area/snmpfeatImprovement on an existing feature such as adding a new setting/mode to an existing plugin

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions