chore(inputs.disk)!: Remove deprecated 'mountpoints' option (#14913)

This commit is contained in:
Sven Rebhan 2024-02-29 20:25:17 +01:00 committed by GitHub
parent a8551659bc
commit 9ee91f0f45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 13 deletions

View File

@ -16,15 +16,12 @@ import (
var sampleConfig string
type DiskStats struct {
MountPoints []string `toml:"mount_points"`
IgnoreFS []string `toml:"ignore_fs"`
IgnoreMountOpts []string `toml:"ignore_mount_opts"`
Log telegraf.Logger `toml:"-"`
ps system.PS
LegacyMountPoints []string `toml:"mountpoints" deprecated:"0.10.2;1.30.0;use 'mount_points' instead"`
MountPoints []string `toml:"mount_points"`
IgnoreFS []string `toml:"ignore_fs"`
IgnoreMountOpts []string `toml:"ignore_mount_opts"`
Log telegraf.Logger `toml:"-"`
}
func (*DiskStats) SampleConfig() string {
@ -32,11 +29,6 @@ func (*DiskStats) SampleConfig() string {
}
func (ds *DiskStats) Init() error {
// Legacy support:
if len(ds.LegacyMountPoints) != 0 {
ds.MountPoints = ds.LegacyMountPoints
}
ps := system.NewSystemPS()
ps.Log = ds.Log
ds.ps = ps