diff --git a/internal/signalfx-agent/pkg/core/modules_linux.go b/internal/signalfx-agent/pkg/core/modules_linux.go index 6401ea2f2d..c3bff8fd7d 100644 --- a/internal/signalfx-agent/pkg/core/modules_linux.go +++ b/internal/signalfx-agent/pkg/core/modules_linux.go @@ -41,7 +41,6 @@ import ( _ "github.com/signalfx/signalfx-agent/pkg/monitors/collectd/statsd" _ "github.com/signalfx/signalfx-agent/pkg/monitors/collectd/tomcat" _ "github.com/signalfx/signalfx-agent/pkg/monitors/collectd/uptime" - _ "github.com/signalfx/signalfx-agent/pkg/monitors/collectd/vmem" _ "github.com/signalfx/signalfx-agent/pkg/monitors/process" _ "github.com/signalfx/signalfx-agent/pkg/monitors/telegraf/monitors/varnish" ) diff --git a/internal/signalfx-agent/pkg/monitors/collectd/vmem/genmetadata.go b/internal/signalfx-agent/pkg/monitors/collectd/vmem/genmetadata.go deleted file mode 100644 index cb50bd6be7..0000000000 --- a/internal/signalfx-agent/pkg/monitors/collectd/vmem/genmetadata.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by monitor-code-gen. DO NOT EDIT. - -package vmem - -import ( - "github.com/signalfx/golib/v3/datapoint" - "github.com/signalfx/signalfx-agent/pkg/monitors" -) - -const monitorType = "collectd/vmem" - -var groupSet = map[string]bool{} - -const ( - vmpageFaultsMajflt = "vmpage_faults.majflt" - vmpageFaultsMinflt = "vmpage_faults.minflt" - vmpageIoMemoryIn = "vmpage_io.memory.in" - vmpageIoMemoryOut = "vmpage_io.memory.out" - vmpageIoSwapIn = "vmpage_io.swap.in" - vmpageIoSwapOut = "vmpage_io.swap.out" - vmpageNumberFreePages = "vmpage_number.free_pages" - vmpageNumberMapped = "vmpage_number.mapped" - vmpageNumberShmemPmdmapped = "vmpage_number.shmem_pmdmapped" -) - -var metricSet = map[string]monitors.MetricInfo{ - vmpageFaultsMajflt: {Type: datapoint.Counter}, - vmpageFaultsMinflt: {Type: datapoint.Counter}, - vmpageIoMemoryIn: {Type: datapoint.Counter}, - vmpageIoMemoryOut: {Type: datapoint.Counter}, - vmpageIoSwapIn: {Type: datapoint.Counter}, - vmpageIoSwapOut: {Type: datapoint.Counter}, - vmpageNumberFreePages: {Type: datapoint.Counter}, - vmpageNumberMapped: {Type: datapoint.Counter}, - vmpageNumberShmemPmdmapped: {Type: datapoint.Gauge}, -} - -var defaultMetrics = map[string]bool{ - vmpageIoSwapIn: true, - vmpageIoSwapOut: true, -} - -var groupMetricsMap = map[string][]string{} - -var monitorMetadata = monitors.Metadata{ - MonitorType: "collectd/vmem", - DefaultMetrics: defaultMetrics, - Metrics: metricSet, - SendUnknown: false, - Groups: groupSet, - GroupMetricsMap: groupMetricsMap, - SendAll: false, -} diff --git a/internal/signalfx-agent/pkg/monitors/collectd/vmem/metadata.yaml b/internal/signalfx-agent/pkg/monitors/collectd/vmem/metadata.yaml deleted file mode 100644 index 4b07a25ba8..0000000000 --- a/internal/signalfx-agent/pkg/monitors/collectd/vmem/metadata.yaml +++ /dev/null @@ -1,50 +0,0 @@ -monitors: -- dimensions: - doc: | - Collects information about the virtual memory - subsystem of the kernel using the [collectd vmem - plugin](https://collectd.org/wiki/index.php/Plugin:vmem). There is no - configuration available for this plugin. - - **This monitor is deprecated in favor of the `vmem` monitor. The metrics - should be fully compatible with this monitor.** This monitor will be - removed in a future agent release. - metrics: - vmpage_faults.majflt: - description: Number of major page faults on the system - default: false - type: cumulative - vmpage_faults.minflt: - description: Number of minor page faults on the system - default: false - type: cumulative - vmpage_io.memory.in: - description: Page Ins for Memory - default: false - type: cumulative - vmpage_io.memory.out: - description: Page Outs for Memory - default: false - type: cumulative - vmpage_io.swap.in: - description: Page Ins for Swap - default: true - type: cumulative - vmpage_io.swap.out: - description: Page Outs for Swap - default: true - type: cumulative - vmpage_number.free_pages: - description: Number of free memory pages - default: false - type: cumulative - vmpage_number.mapped: - description: Number of mapped pages - default: false - type: cumulative - vmpage_number.shmem_pmdmapped: - description: The amount of shared (shmem/tmpfs) memory backed by huge pages - default: false - type: gauge - monitorType: collectd/vmem - properties: diff --git a/internal/signalfx-agent/pkg/monitors/collectd/vmem/template.go b/internal/signalfx-agent/pkg/monitors/collectd/vmem/template.go deleted file mode 100644 index d538d79553..0000000000 --- a/internal/signalfx-agent/pkg/monitors/collectd/vmem/template.go +++ /dev/null @@ -1,71 +0,0 @@ -//go:build linux -// +build linux - -package vmem - -// AUTOGENERATED BY scripts/collectd-template-to-go. DO NOT EDIT!! - -import ( - "text/template" - - "github.com/signalfx/signalfx-agent/pkg/monitors/collectd" -) - -// CollectdTemplate is a template for a vmem collectd config file -var CollectdTemplate = template.Must(collectd.InjectTemplateFuncs(template.New("vmem")).Parse(` - - - Interval {{.IntervalSeconds}} - - - Verbose false - - - - - - Plugin '^vmem$' - - - Chain "VmemFilters" - - - MetaData "monitorID" "{{.MonitorID}}" - - - - - - - - Type 'vmpage_faults' - - Target "return" - - - - - Type 'vmpage_io' - - Target "return" - - - - - Type 'vmpage_number' - TypeInstance 'free_pages' - - Target "return" - - - - - Type 'vmpage_number' - TypeInstance 'mapped' - - Target "return" - - - Target "stop" - -`)).Option("missingkey=error") diff --git a/internal/signalfx-agent/pkg/monitors/collectd/vmem/vmem.go b/internal/signalfx-agent/pkg/monitors/collectd/vmem/vmem.go deleted file mode 100644 index 9e7acbd93a..0000000000 --- a/internal/signalfx-agent/pkg/monitors/collectd/vmem/vmem.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build linux -// +build linux - -package vmem - -//go:generate ../../../../scripts/collectd-template-to-go vmem.tmpl - -import ( - "github.com/signalfx/signalfx-agent/pkg/core/config" - "github.com/signalfx/signalfx-agent/pkg/monitors" - "github.com/signalfx/signalfx-agent/pkg/monitors/collectd" -) - -func init() { - monitors.Register(&monitorMetadata, func() interface{} { - return &Monitor{ - MonitorCore: *collectd.NewMonitorCore(CollectdTemplate), - } - }, &Config{}) -} - -// Config is the monitor-specific config with the generic config embedded -type Config struct { - config.MonitorConfig `yaml:",inline" singleInstance:"true"` -} - -// Monitor is the main type that represents the monitor -type Monitor struct { - collectd.MonitorCore -} - -// Configure configures and runs the plugin in collectd -func (m *Monitor) Configure(conf *Config) error { - return m.SetConfigurationAndRun(conf, collectd.WithDeprecationWarningLog("vmem")) -} diff --git a/internal/signalfx-agent/pkg/monitors/collectd/vmem/vmem.tmpl b/internal/signalfx-agent/pkg/monitors/collectd/vmem/vmem.tmpl deleted file mode 100644 index 04e28b144d..0000000000 --- a/internal/signalfx-agent/pkg/monitors/collectd/vmem/vmem.tmpl +++ /dev/null @@ -1,55 +0,0 @@ - - - Interval {{.IntervalSeconds}} - - - Verbose false - - - - - - Plugin '^vmem$' - - - Chain "VmemFilters" - - - MetaData "monitorID" "{{.MonitorID}}" - - - - - - - - Type 'vmpage_faults' - - Target "return" - - - - - Type 'vmpage_io' - - Target "return" - - - - - Type 'vmpage_number' - TypeInstance 'free_pages' - - Target "return" - - - - - Type 'vmpage_number' - TypeInstance 'mapped' - - Target "return" - - - Target "stop" - diff --git a/pkg/receiver/smartagentreceiver/config.go b/pkg/receiver/smartagentreceiver/config.go index 83c774a898..5ba1853c12 100644 --- a/pkg/receiver/smartagentreceiver/config.go +++ b/pkg/receiver/smartagentreceiver/config.go @@ -43,7 +43,7 @@ var ( "collectd/kafka_producer": true, "collectd/load": true, "collectd/memcached": true, "collectd/memory": true, "collectd/mysql": true, "collectd/netinterface": true, "collectd/nginx": true, "collectd/php-fpm": true, "collectd/postgresql": true, "collectd/processes": true, "collectd/protocols": true, - "collectd/signalfx-metadata": true, "collectd/statsd": true, "collectd/uptime": true, "collectd/vmem": true, + "collectd/signalfx-metadata": true, "collectd/statsd": true, "collectd/uptime": true, } )