diff --git a/metricbeat/module/system/diskio/diskio.go b/metricbeat/module/system/diskio/diskio.go index b47e2e76c155..e6656400b2ed 100644 --- a/metricbeat/module/system/diskio/diskio.go +++ b/metricbeat/module/system/diskio/diskio.go @@ -25,6 +25,7 @@ import ( "runtime" "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" "github.com/elastic/beats/v7/libbeat/metric/system/diskio" "github.com/elastic/beats/v7/metricbeat/mb" "github.com/elastic/beats/v7/metricbeat/mb/parse" @@ -69,7 +70,9 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) { if !ok { return nil, fmt.Errorf("unexpected module type") } - + if runtime.GOOS == "linux" { + cfgwarn.Deprecate("8.0", "io.ops and iostat metrics will be moved to the linux module") + } return &MetricSet{ BaseMetricSet: base, statistics: diskio.NewDiskIOStat(), diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index 4b0a6f816b57..a3d7bd13a312 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -27,6 +27,7 @@ import ( "github.com/pkg/errors" "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" "github.com/elastic/beats/v7/libbeat/common/transform/typeconv" metrics "github.com/elastic/beats/v7/metricbeat/internal/metrics/memory" "github.com/elastic/beats/v7/metricbeat/mb" @@ -54,7 +55,9 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) { if !ok { return nil, fmt.Errorf("unexpected module type") } - + if runtime.GOOS == "linux" { + cfgwarn.Deprecate("8.0", "linux-only memory stats, such as hugepages, and page_stats, will be moved to the linux module") + } return &MetricSet{BaseMetricSet: base, IsAgent: systemModule.IsAgent}, nil }