diff --git a/x-pack/elastic-agent/pkg/agent/operation/monitoring.go b/x-pack/elastic-agent/pkg/agent/operation/monitoring.go index 14f26989cf2..a22fadb5d79 100644 --- a/x-pack/elastic-agent/pkg/agent/operation/monitoring.go +++ b/x-pack/elastic-agent/pkg/agent/operation/monitoring.go @@ -461,34 +461,7 @@ func (o *Operator) getMonitoringMetricbeatConfig(outputType string, output inter }, { "copy_fields": map[string]interface{}{ - "fields": []map[string]interface{}{ - // I should be able to see the CPU Usage on the running machine. Am using too much CPU? - { - "from": "http.agent.beat.cpu", - "to": "system.process.cpu", - }, - // I should be able to see the Memory usage of Elastic Agent. Is the Elastic Agent using too much memory? - { - "from": "http.agent.beat.memstats.memory_sys", - "to": "system.process.memory.size", - }, - // I should be able to see the system memory. Am I running out of memory? - // TODO: with APM agent: total and free - - // I should be able to see Disk usage on the running machine. Am I running out of disk space? - // TODO: with APM agent - - // I should be able to see fd usage. Am I keep too many files open? - { - "from": "http.agent.beat.handles", - "to": "system.process.fd", - }, - // Cgroup reporting - { - "from": "http.agent.beat.cgroup", - "to": "system.process.cgroup", - }, - }, + "fields": normalizeHTTPCopyRules(name), "ignore_missing": true, }, }, @@ -552,34 +525,7 @@ func (o *Operator) getMonitoringMetricbeatConfig(outputType string, output inter }, { "copy_fields": map[string]interface{}{ - "fields": []map[string]interface{}{ - // I should be able to see the CPU Usage on the running machine. Am using too much CPU? - { - "from": "http.agent.beat.cpu", - "to": "system.process.cpu", - }, - // I should be able to see the Memory usage of Elastic Agent. Is the Elastic Agent using too much memory? - { - "from": "http.agent.beat.memstats.memory_sys", - "to": "system.process.memory.size", - }, - // I should be able to see the system memory. Am I running out of memory? - // TODO: with APM agent: total and free - - // I should be able to see Disk usage on the running machine. Am I running out of disk space? - // TODO: with APM agent - - // I should be able to see fd usage. Am I keep too many files open? - { - "from": "http.agent.beat.handles", - "to": "system.process.fd", - }, - // Cgroup reporting - { - "from": "http.agent.beat.cgroup", - "to": "system.process.cgroup", - }, - }, + "fields": normalizeHTTPCopyRules(fixedAgentName), "ignore_missing": true, }, }, @@ -678,3 +624,48 @@ func (o *Operator) isMonitoringLogs() bool { func (o *Operator) isMonitoringMetrics() bool { return (o.isMonitoring & isMonitoringMetricsFlag) != 0 } + +func normalizeHTTPCopyRules(name string) []map[string]interface{} { + fromToMap := []map[string]interface{}{ + // I should be able to see the CPU Usage on the running machine. Am using too much CPU? + { + "from": "http.agent.beat.cpu", + "to": "system.process.cpu", + }, + // I should be able to see the Memory usage of Elastic Agent. Is the Elastic Agent using too much memory? + { + "from": "http.agent.beat.memstats.memory_sys", + "to": "system.process.memory.size", + }, + // I should be able to see the system memory. Am I running out of memory? + // TODO: with APM agent: total and free + + // I should be able to see Disk usage on the running machine. Am I running out of disk space? + // TODO: with APM agent + + // I should be able to see fd usage. Am I keep too many files open? + { + "from": "http.agent.beat.handles", + "to": "system.process.fd", + }, + // Cgroup reporting + { + "from": "http.agent.beat.cgroup", + "to": "system.process.cgroup", + }, + } + + spec, found := program.SupportedMap[name] + if !found { + return fromToMap + } + + for _, exportedMetric := range spec.ExprtedMetrics { + fromToMap = append(fromToMap, map[string]interface{}{ + "from": fmt.Sprintf("http.agent.%s", exportedMetric), + "to": exportedMetric, + }) + } + + return fromToMap +} diff --git a/x-pack/elastic-agent/pkg/agent/operation/monitoring_test.go b/x-pack/elastic-agent/pkg/agent/operation/monitoring_test.go index c23248ff2d9..b01f296e01d 100644 --- a/x-pack/elastic-agent/pkg/agent/operation/monitoring_test.go +++ b/x-pack/elastic-agent/pkg/agent/operation/monitoring_test.go @@ -6,9 +6,12 @@ package operation import ( "context" + "fmt" "testing" "time" + "github.com/stretchr/testify/require" + "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/program" "github.com/elastic/elastic-agent-client/v7/pkg/proto" @@ -29,6 +32,38 @@ import ( "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/status" ) +func TestExportedMetrics(t *testing.T) { + programName := "testing" + expectedMetricsName := "metric_name" + program.SupportedMap[programName] = program.Spec{ExprtedMetrics: []string{expectedMetricsName}} + + exportedMetrics := normalizeHTTPCopyRules(programName) + + exportedMetricFound := false + for _, kv := range exportedMetrics { + from, found := kv["from"] + if !found { + continue + } + to, found := kv["to"] + if !found { + continue + } + + if to != expectedMetricsName { + continue + } + if from != fmt.Sprintf("http.agent.%s", expectedMetricsName) { + continue + } + exportedMetricFound = true + break + } + + require.True(t, exportedMetricFound, "exported metric not found") + delete(program.SupportedMap, programName) +} + func TestGenerateSteps(t *testing.T) { const sampleOutput = "sample-output" const outputType = "logstash" diff --git a/x-pack/elastic-agent/pkg/agent/program/spec.go b/x-pack/elastic-agent/pkg/agent/program/spec.go index 79a08071202..34ce2fec279 100644 --- a/x-pack/elastic-agent/pkg/agent/program/spec.go +++ b/x-pack/elastic-agent/pkg/agent/program/spec.go @@ -42,6 +42,7 @@ type Spec struct { When string `yaml:"when"` Constraints string `yaml:"constraints"` RestartOnOutputChange bool `yaml:"restart_on_output_change,omitempty"` + ExprtedMetrics []string `yaml:"exported_metrics,omitempty"` } // ReadSpecs reads all the specs that match the provided globbing path. diff --git a/x-pack/elastic-agent/pkg/agent/program/supported.go b/x-pack/elastic-agent/pkg/agent/program/supported.go index 3d34d953e67..d618049fb8e 100644 --- a/x-pack/elastic-agent/pkg/agent/program/supported.go +++ b/x-pack/elastic-agent/pkg/agent/program/supported.go @@ -25,7 +25,7 @@ func init() { // spec/metricbeat.yml // spec/osquerybeat.yml // spec/packetbeat.yml - unpacked := packer.MustUnpack("eJzEWkmXo7iW3vfPqO3rgSEdVfQ5b2GIYrJNlHEaCe2QZAO2wK4wHqBP//c+YgbbGRlZWa8XeSIthHR1dYfvfpf/+eV03JD/Co7Jf5w275fN+3/mCfvlv3/BiZ6hr4dw6anO3HMYSREj4XGHwfLFMvQrXokFgraEoDXzoS0EAEW+/PBZSopDCK6H0NKszF1ZJ0uzMx9MIiR5GQITYZ54Zx/YJwSWCjVtEa2skxZPQysWdSu+hlYyWPOMDF3wPaWgps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Xvjs999kXJtyDj9ik3u7TmYzt8+GHa0ZJEeA0282srM3k92nYAcPNT9gB357HiMkxsroqtp7XRDbSe2ih8XZHyBWcSYqPMQyUqrpUVF4EsdJOZe5M5P/GSVTrSz84jRhRLnfptnycWfrR+3e1cF/7iIWWz49R1o/CQ0x3q3scyotjb2MNKINWzjWTSMs5c0atXEHzsAr3T9o4seZmrYBtFyK/YrwNWjn2KFRb/qt9/AnLcO277VuG3gksOtT553mUP8lXDOHSu1zFJYLBG+64+U/K4c9wh+M5R12q2nnE3/VR8JdGXbNf/vff/i8AAP//ZpRDiQ==") SupportedMap = make(map[string]Spec) for f, v := range unpacked { diff --git a/x-pack/elastic-agent/spec/apm-server.yml b/x-pack/elastic-agent/spec/apm-server.yml index c66a03e2bc7..27f6fc31786 100644 --- a/x-pack/elastic-agent/spec/apm-server.yml +++ b/x-pack/elastic-agent/spec/apm-server.yml @@ -6,6 +6,9 @@ args: [ "-E", "apm-server.data_streams.enabled=true", "-E", "gc_percent=${APMSERVER_GOGC:100}" ] +exported_metrics: [ + "apm-server", +] rules: - copy_to_list: item: fleet