Rename snmp plugin to snmp_legacy

This commit is contained in:
Cameron Sparr 2016-08-11 15:24:38 +01:00
parent 26315bfbea
commit 4ce8dd5f9a
7 changed files with 15 additions and 7 deletions

View File

@ -2,6 +2,14 @@
### Release Notes
**Breaking Change** The SNMP plugin is being deprecated in it's current form.
There is a [new SNMP plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/snmp)
which fixes many of the issues and confusions
of it's predecessor. For users wanting to continue to use the deprecated SNMP
plugin, you will need to change your config file from `[[inputs.snmp]]` to
`[[inputs.snmp_legacy]]`. The configuration of the new SNMP plugin is _not_
backwards-compatible.
- Telegraf now supports being installed as an official windows service,
which can be installed via
`> C:\Program Files\Telegraf\telegraf.exe --service install`

View File

@ -1393,8 +1393,8 @@
# servers = ["http://localhost:8098"]
# # Reads oids value from one or many snmp agents
# [[inputs.snmp]]
# # DEPRECATED! PLEASE USE inputs.snmp INSTEAD.
# [[inputs.snmp_legacy]]
# ## Use 'oids.txt' file to translate oids to names
# ## To generate 'oids.txt' you need to run:
# ## snmptranslate -m all -Tz -On | sed -e 's/"//g' > /tmp/oids.txt

View File

@ -61,7 +61,7 @@ import (
_ "github.com/influxdata/telegraf/plugins/inputs/rethinkdb"
_ "github.com/influxdata/telegraf/plugins/inputs/riak"
_ "github.com/influxdata/telegraf/plugins/inputs/sensors"
_ "github.com/influxdata/telegraf/plugins/inputs/snmp"
_ "github.com/influxdata/telegraf/plugins/inputs/snmp_legacy"
_ "github.com/influxdata/telegraf/plugins/inputs/sqlserver"
_ "github.com/influxdata/telegraf/plugins/inputs/statsd"
_ "github.com/influxdata/telegraf/plugins/inputs/sysstat"

View File

@ -1,4 +1,4 @@
package snmp
package snmp_legacy
import (
"io/ioutil"
@ -225,7 +225,7 @@ func (s *Snmp) SampleConfig() string {
// Description returns description of Zookeeper plugin
func (s *Snmp) Description() string {
return `Reads oids value from one or many snmp agents`
return `DEPRECATED! PLEASE USE inputs.snmp INSTEAD.`
}
func fillnode(parentNode Node, oid_name string, ids []string) {
@ -812,7 +812,7 @@ func (h *Host) HandleResponse(
}
func init() {
inputs.Add("snmp", func() telegraf.Input {
inputs.Add("snmp_legacy", func() telegraf.Input {
return &Snmp{}
})
}

View File

@ -1,4 +1,4 @@
package snmp
package snmp_legacy
import (
"testing"