style: align plugin renaming (#10868)
This commit is contained in:
parent
e0212a7d7a
commit
6dc2b99549
|
|
@ -615,10 +615,8 @@ func printFilteredInputs(inputFilters []string, commented bool) {
|
||||||
// Print Inputs
|
// Print Inputs
|
||||||
for _, pname := range pnames {
|
for _, pname := range pnames {
|
||||||
// Skip inputs that are registered twice for backward compatibility
|
// Skip inputs that are registered twice for backward compatibility
|
||||||
if pname == "cisco_telemetry_gnmi" {
|
switch pname {
|
||||||
continue
|
case "cisco_telemetry_gnmi", "io", "KNXListener":
|
||||||
}
|
|
||||||
if pname == "KNXListener" {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
creator := inputs.Inputs[pname]
|
creator := inputs.Inputs[pname]
|
||||||
|
|
@ -1246,14 +1244,6 @@ func (c *Config) addInput(name string, table *ast.Table) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy support renaming io input to diskio
|
|
||||||
if name == "io" {
|
|
||||||
if err := c.printUserDeprecation("inputs", name, nil); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
name = "diskio"
|
|
||||||
}
|
|
||||||
|
|
||||||
// For inputs with parsers we need to compute the set of
|
// For inputs with parsers we need to compute the set of
|
||||||
// options that is not covered by both, the parser and the input.
|
// options that is not covered by both, the parser and the input.
|
||||||
// We achieve this by keeping a local book of missing entries
|
// We achieve this by keeping a local book of missing entries
|
||||||
|
|
|
||||||
|
|
@ -184,4 +184,8 @@ func init() {
|
||||||
inputs.Add("diskio", func() telegraf.Input {
|
inputs.Add("diskio", func() telegraf.Input {
|
||||||
return &DiskIO{ps: ps, SkipSerialNumber: true}
|
return &DiskIO{ps: ps, SkipSerialNumber: true}
|
||||||
})
|
})
|
||||||
|
// Backwards compatible alias
|
||||||
|
inputs.Add("io", func() telegraf.Input {
|
||||||
|
return &DiskIO{ps: ps, SkipSerialNumber: true}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue