Alternate SNMP plugin (#1389)
* Add a new and improved snmp plugin * update gosnmp for duplicate packet fix https://github.com/soniah/gosnmp/issues/68 https://github.com/soniah/gosnmp/pull/69
This commit is contained in:
committed by
Cameron Sparr
parent
b022b5567d
commit
7fac74919c
17
plugins/inputs/snmp/testdata/snmpd.conf
vendored
Normal file
17
plugins/inputs/snmp/testdata/snmpd.conf
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# This config provides the data represented in the plugin documentation
|
||||
# Requires net-snmp >= 5.7
|
||||
|
||||
#agentaddress UDP:127.0.0.1:1161
|
||||
rocommunity public
|
||||
|
||||
override .1.0.0.0.1.1.0 octet_str "foo"
|
||||
override .1.0.0.0.1.1.1 octet_str "bar"
|
||||
override .1.0.0.0.1.102 octet_str "bad"
|
||||
override .1.0.0.0.1.2.0 integer 1
|
||||
override .1.0.0.0.1.2.1 integer 2
|
||||
override .1.0.0.0.1.3.0 octet_str "0.123"
|
||||
override .1.0.0.0.1.3.1 octet_str "0.456"
|
||||
override .1.0.0.0.1.3.2 octet_str "9.999"
|
||||
override .1.0.0.1.1 octet_str "baz"
|
||||
override .1.0.0.1.2 uinteger 54321
|
||||
override .1.0.0.1.3 uinteger 234
|
||||
51
plugins/inputs/snmp/testdata/test.mib
vendored
Normal file
51
plugins/inputs/snmp/testdata/test.mib
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
TEST DEFINITIONS ::= BEGIN
|
||||
|
||||
testOID ::= { 1 0 0 }
|
||||
|
||||
testTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF testTableEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
::= { testOID 0 }
|
||||
|
||||
testTableEntry OBJECT-TYPE
|
||||
SYNTAX TestTableEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
INDEX {
|
||||
server
|
||||
}
|
||||
::= { testTable 1 }
|
||||
|
||||
TestTableEntry ::=
|
||||
SEQUENCE {
|
||||
server OCTET STRING,
|
||||
connections INTEGER,
|
||||
latency OCTET STRING,
|
||||
}
|
||||
|
||||
server OBJECT-TYPE
|
||||
SYNTAX OCTET STRING
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
::= { testTableEntry 1 }
|
||||
|
||||
connections OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
::= { testTableEntry 2 }
|
||||
|
||||
latency OBJECT-TYPE
|
||||
SYNTAX OCTET STRING
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
::= { testTableEntry 3 }
|
||||
|
||||
hostname OBJECT-TYPE
|
||||
SYNTAX OCTET STRING
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
::= { testOID 1 1 }
|
||||
|
||||
END
|
||||
Reference in New Issue
Block a user