From 6113b90c2aa2fee69e93ebf3c3f42da76de1d749 Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Thu, 7 Oct 2021 11:25:59 -0700 Subject: [PATCH 01/13] poll should return an error, not log --- receiver/mongodbatlasreceiver/receiver.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/receiver/mongodbatlasreceiver/receiver.go b/receiver/mongodbatlasreceiver/receiver.go index 1b4a32e2d8bb..e2e32be283aa 100644 --- a/receiver/mongodbatlasreceiver/receiver.go +++ b/receiver/mongodbatlasreceiver/receiver.go @@ -20,6 +20,11 @@ import ( "time" "github.com/pkg/errors" +<<<<<<< HEAD +======= + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" +>>>>>>> 8bdb6c4d9 (poll should return an error, not log) "go.opentelemetry.io/collector/model/pdata" "go.opentelemetry.io/collector/receiver/scraperhelper" "go.uber.org/zap" From 6ffd8f8006e1d19b5c149e5ca359834765dc6ee8 Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Wed, 20 Oct 2021 16:50:57 -0700 Subject: [PATCH 02/13] changes to work with scraperhelper --- go.mod | 3 --- go.sum | 4 ---- receiver/mongodbatlasreceiver/receiver.go | 3 +++ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 918f24b471aa..44c23d7ac4c5 100644 --- a/go.mod +++ b/go.mod @@ -273,7 +273,6 @@ require ( github.com/moby/sys/mountinfo v0.4.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mongodb-forks/digest v1.0.3 // indirect github.com/mostynb/go-grpc-compression v1.1.14 // indirect github.com/mrunalp/fileutils v0.5.0 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect @@ -308,7 +307,6 @@ require ( github.com/opencontainers/runc v1.0.2 // indirect github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect github.com/opencontainers/selinux v1.8.2 // indirect - github.com/openlyinc/pointy v1.1.2 // indirect github.com/openshift/api v0.0.0-20210521075222-e273a339932a // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect @@ -371,7 +369,6 @@ require ( go.elastic.co/apm v1.14.0 // indirect go.elastic.co/fastjson v1.1.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect - go.mongodb.org/atlas v0.13.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/collector/model v0.38.1-0.20211112010215-bcb90636ae66 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.26.1 // indirect diff --git a/go.sum b/go.sum index e2decb0a0967..6109732a68c3 100644 --- a/go.sum +++ b/go.sum @@ -829,7 +829,6 @@ github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= @@ -1492,7 +1491,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mongodb-forks/digest v1.0.3 h1:ZUK1vyZnBiRMvET0O1SzmnBmv935CkcOTjhfR4zIQ2s= github.com/mongodb-forks/digest v1.0.3/go.mod h1:eHRfgovT+dvSFfltrOa27hy1oR/rcwyDdp5H1ZQxEMA= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= @@ -1618,7 +1616,6 @@ github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqi github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opencontainers/selinux v1.8.2 h1:c4ca10UMgRcvZ6h0K4HtS15UaVSBEaE+iln2LVpAuGc= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/openlyinc/pointy v1.1.2 h1:LywVV2BWC5Sp5v7FoP4bUD+2Yn5k0VNeRbU5vq9jUMY= github.com/openlyinc/pointy v1.1.2/go.mod h1:w2Sytx+0FVuMKn37xpXIAyBNhFNBIJGR/v2m7ik1WtM= github.com/openshift/api v0.0.0-20210521075222-e273a339932a h1:aBPwLqCg66SbQd+HrjB1GhgTfPtqSY4aeB022tEYmE0= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= @@ -2098,7 +2095,6 @@ go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQc go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mongodb.org/atlas v0.13.0 h1:JkJOWsKm9k2mcFaivaaMNDpKDsxJJj1O0eUsDtnNvuE= go.mongodb.org/atlas v0.13.0/go.mod h1:wVCnHcm/7/IfTjEB6K8K35PLG70yGz8BdkRwX0oK9/M= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= diff --git a/receiver/mongodbatlasreceiver/receiver.go b/receiver/mongodbatlasreceiver/receiver.go index e2e32be283aa..3a011449afa7 100644 --- a/receiver/mongodbatlasreceiver/receiver.go +++ b/receiver/mongodbatlasreceiver/receiver.go @@ -21,10 +21,13 @@ import ( "github.com/pkg/errors" <<<<<<< HEAD +<<<<<<< HEAD ======= "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" >>>>>>> 8bdb6c4d9 (poll should return an error, not log) +======= +>>>>>>> d09dc6781 (changes to work with scraperhelper) "go.opentelemetry.io/collector/model/pdata" "go.opentelemetry.io/collector/receiver/scraperhelper" "go.uber.org/zap" From 420f7f513ed35cc15dc6b02ddb3ab08b644049ad Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Tue, 28 Sep 2021 10:55:30 -0700 Subject: [PATCH 03/13] rework metrics again (metadata.yaml doesn't match) --- .../internal/metadata/generated_metrics.go | 580 ++++++++++ .../internal/metadata/metric_name_mapping.go | 1001 +++++++++++++++++ .../metadata/metric_name_mapping_test.go | 36 + .../internal/metric_conversion.go | 45 + .../internal/mongodb_atlas_client.go | 10 +- receiver/mongodbatlasreceiver/metadata.yaml | 209 ++++ 6 files changed, 1873 insertions(+), 8 deletions(-) create mode 100644 receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go create mode 100644 receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go create mode 100644 receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping_test.go create mode 100644 receiver/mongodbatlasreceiver/internal/metric_conversion.go create mode 100644 receiver/mongodbatlasreceiver/metadata.yaml diff --git a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go new file mode 100644 index 000000000000..ef0410e8916b --- /dev/null +++ b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go @@ -0,0 +1,580 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/model/pdata" +) + +// Type is the component type name. +const Type config.Type = "mongoatlasreceiver" + +// MetricIntf is an interface to generically interact with generated metric. +type MetricIntf interface { + Name() string + New() pdata.Metric + Init(metric pdata.Metric) +} + +// Intentionally not exposing this so that it is opaque and can change freely. +type metricImpl struct { + name string + initFunc func(pdata.Metric) +} + +// Name returns the metric name. +func (m *metricImpl) Name() string { + return m.name +} + +// New creates a metric object preinitialized. +func (m *metricImpl) New() pdata.Metric { + metric := pdata.NewMetric() + m.Init(metric) + return metric +} + +// Init initializes the provided metric object. +func (m *metricImpl) Init(metric pdata.Metric) { + m.initFunc(metric) +} + +type metricStruct struct { + MongodbAtlasAsserts MetricIntf + MongodbAtlasBackgroundFlush MetricIntf + MongodbAtlasCacheIo MetricIntf + MongodbAtlasCacheSize MetricIntf + MongodbAtlasConnections MetricIntf + MongodbAtlasCPU MetricIntf + MongodbAtlasCPUChildren MetricIntf + MongodbAtlasCPUChildrenNormalized MetricIntf + MongodbAtlasCPUNormalized MetricIntf + MongodbAtlasCursors MetricIntf + MongodbAtlasDbStorage MetricIntf + MongodbAtlasDocumentRate MetricIntf + MongodbAtlasFtsCPU MetricIntf + MongodbAtlasFtsCPUNormalized MetricIntf + MongodbAtlasFtsDisk MetricIntf + MongodbAtlasFtsMemory MetricIntf + MongodbAtlasGlobalLock MetricIntf + MongodbAtlasIndexBtreeMissRatio MetricIntf + MongodbAtlasIndexCounters MetricIntf + MongodbAtlasJournalingCommits MetricIntf + MongodbAtlasJournalingDataFiles MetricIntf + MongodbAtlasJournalingWritten MetricIntf + MongodbAtlasMemory MetricIntf + MongodbAtlasNetworkIo MetricIntf + MongodbAtlasNetworkRequests MetricIntf + MongodbAtlasOpExecutionTime MetricIntf + MongodbAtlasOperationsRate MetricIntf + MongodbAtlasOplogRate MetricIntf + MongodbAtlasOplogTime MetricIntf + MongodbAtlasOps MetricIntf + MongodbAtlasPageFaults MetricIntf + MongodbAtlasQueryExecutorScanned MetricIntf + MongodbAtlasQueryTargetingScannedPerReturned MetricIntf + MongodbAtlasRestarts MetricIntf + MongodbAtlasSwap MetricIntf + MongodbAtlasSwapIo MetricIntf + MongodbAtlasSystemCPU MetricIntf + MongodbAtlasSystemMemory MetricIntf + MongodbAtlasSystemNetworkIo MetricIntf + MongodbAtlasSystemNormalizedCPU MetricIntf + MongodbAtlasTickets MetricIntf +} + +// Names returns a list of all the metric name strings. +func (m *metricStruct) Names() []string { + return []string{ + "mongodb.atlas.asserts", + "mongodb.atlas.background_flush", + "mongodb.atlas.cache.io", + "mongodb.atlas.cache.size", + "mongodb.atlas.connections", + "mongodb.atlas.cpu", + "mongodb.atlas.cpu.children", + "mongodb.atlas.cpu.children.normalized", + "mongodb.atlas.cpu.normalized", + "mongodb.atlas.cursors", + "mongodb.atlas.db.storage", + "mongodb.atlas.document.rate", + "mongodb.atlas.fts.cpu", + "mongodb.atlas.fts.cpu.normalized", + "mongodb.atlas.fts.disk", + "mongodb.atlas.fts.memory", + "mongodb.atlas.global_lock", + "mongodb.atlas.index.btree_miss_ratio", + "mongodb.atlas.index.counters", + "mongodb.atlas.journaling.commits", + "mongodb.atlas.journaling.data_files", + "mongodb.atlas.journaling.written", + "mongodb.atlas.memory", + "mongodb.atlas.network.io", + "mongodb.atlas.network.requests", + "mongodb.atlas.op_execution_time", + "mongodb.atlas.operations.rate", + "mongodb.atlas.oplog.rate", + "mongodb.atlas.oplog.time", + "mongodb.atlas.ops", + "mongodb.atlas.page_faults", + "mongodb.atlas.query_executor.scanned", + "mongodb.atlas.query_targeting.scanned_per_returned", + "mongodb.atlas.restarts", + "mongodb.atlas.swap", + "mongodb.atlas.swap.io", + "mongodb.atlas.system.cpu", + "mongodb.atlas.system.memory", + "mongodb.atlas.system.network.io", + "mongodb.atlas.system.normalized.cpu", + "mongodb.atlas.tickets", + } +} + +var metricsByName = map[string]MetricIntf{ + "mongodb.atlas.asserts": Metrics.MongodbAtlasAsserts, + "mongodb.atlas.background_flush": Metrics.MongodbAtlasBackgroundFlush, + "mongodb.atlas.cache.io": Metrics.MongodbAtlasCacheIo, + "mongodb.atlas.cache.size": Metrics.MongodbAtlasCacheSize, + "mongodb.atlas.connections": Metrics.MongodbAtlasConnections, + "mongodb.atlas.cpu": Metrics.MongodbAtlasCPU, + "mongodb.atlas.cpu.children": Metrics.MongodbAtlasCPUChildren, + "mongodb.atlas.cpu.children.normalized": Metrics.MongodbAtlasCPUChildrenNormalized, + "mongodb.atlas.cpu.normalized": Metrics.MongodbAtlasCPUNormalized, + "mongodb.atlas.cursors": Metrics.MongodbAtlasCursors, + "mongodb.atlas.db.storage": Metrics.MongodbAtlasDbStorage, + "mongodb.atlas.document.rate": Metrics.MongodbAtlasDocumentRate, + "mongodb.atlas.fts.cpu": Metrics.MongodbAtlasFtsCPU, + "mongodb.atlas.fts.cpu.normalized": Metrics.MongodbAtlasFtsCPUNormalized, + "mongodb.atlas.fts.disk": Metrics.MongodbAtlasFtsDisk, + "mongodb.atlas.fts.memory": Metrics.MongodbAtlasFtsMemory, + "mongodb.atlas.global_lock": Metrics.MongodbAtlasGlobalLock, + "mongodb.atlas.index.btree_miss_ratio": Metrics.MongodbAtlasIndexBtreeMissRatio, + "mongodb.atlas.index.counters": Metrics.MongodbAtlasIndexCounters, + "mongodb.atlas.journaling.commits": Metrics.MongodbAtlasJournalingCommits, + "mongodb.atlas.journaling.data_files": Metrics.MongodbAtlasJournalingDataFiles, + "mongodb.atlas.journaling.written": Metrics.MongodbAtlasJournalingWritten, + "mongodb.atlas.memory": Metrics.MongodbAtlasMemory, + "mongodb.atlas.network.io": Metrics.MongodbAtlasNetworkIo, + "mongodb.atlas.network.requests": Metrics.MongodbAtlasNetworkRequests, + "mongodb.atlas.op_execution_time": Metrics.MongodbAtlasOpExecutionTime, + "mongodb.atlas.operations.rate": Metrics.MongodbAtlasOperationsRate, + "mongodb.atlas.oplog.rate": Metrics.MongodbAtlasOplogRate, + "mongodb.atlas.oplog.time": Metrics.MongodbAtlasOplogTime, + "mongodb.atlas.ops": Metrics.MongodbAtlasOps, + "mongodb.atlas.page_faults": Metrics.MongodbAtlasPageFaults, + "mongodb.atlas.query_executor.scanned": Metrics.MongodbAtlasQueryExecutorScanned, + "mongodb.atlas.query_targeting.scanned_per_returned": Metrics.MongodbAtlasQueryTargetingScannedPerReturned, + "mongodb.atlas.restarts": Metrics.MongodbAtlasRestarts, + "mongodb.atlas.swap": Metrics.MongodbAtlasSwap, + "mongodb.atlas.swap.io": Metrics.MongodbAtlasSwapIo, + "mongodb.atlas.system.cpu": Metrics.MongodbAtlasSystemCPU, + "mongodb.atlas.system.memory": Metrics.MongodbAtlasSystemMemory, + "mongodb.atlas.system.network.io": Metrics.MongodbAtlasSystemNetworkIo, + "mongodb.atlas.system.normalized.cpu": Metrics.MongodbAtlasSystemNormalizedCPU, + "mongodb.atlas.tickets": Metrics.MongodbAtlasTickets, +} + +func (m *metricStruct) ByName(n string) MetricIntf { + return metricsByName[n] +} + +// Metrics contains a set of methods for each metric that help with +// manipulating those metrics. +var Metrics = &metricStruct{ + &metricImpl{ + "mongodb.atlas.asserts", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.asserts") + metric.SetDescription("Number of assertions") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.background_flush", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.background_flush") + metric.SetDescription("Amount of data flushed in the background") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.cache.io", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.cache.io") + metric.SetDescription("Cache throughput") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.cache.size", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.cache.size") + metric.SetDescription("Cache sizes") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.connections", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.connections") + metric.SetDescription("Number of current connections") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.cpu", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.cpu") + metric.SetDescription("CPU Usage") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.cpu.children", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.cpu.children") + metric.SetDescription("CPU Usage for child processes") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.cpu.children.normalized", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.cpu.children.normalized") + metric.SetDescription("CPU Usage for child processes, normalized to pct") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.cpu.normalized", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.cpu.normalized") + metric.SetDescription("CPU Usage, normalized to pct") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.cursors", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.cursors") + metric.SetDescription("Number of cursors") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.db.storage", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.db.storage") + metric.SetDescription("FIXME") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.document.rate", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.document.rate") + metric.SetDescription("Document access rates") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.fts.cpu", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.fts.cpu") + metric.SetDescription("Full text search CPU") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.fts.cpu.normalized", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.fts.cpu.normalized") + metric.SetDescription("Full text search CPU, normalized to pct") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.fts.disk", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.fts.disk") + metric.SetDescription("Full text search disk usage") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.fts.memory", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.fts.memory") + metric.SetDescription("Full text search memory usage") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.global_lock", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.global_lock") + metric.SetDescription("Number and status of locks") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.index.btree_miss_ratio", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.index.btree_miss_ratio") + metric.SetDescription("Index miss ratio") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.index.counters", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.index.counters") + metric.SetDescription("Indexes") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.journaling.commits", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.journaling.commits") + metric.SetDescription("Journaling commits") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.journaling.data_files", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.journaling.data_files") + metric.SetDescription("Data file sizes") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.journaling.written", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.journaling.written") + metric.SetDescription("Journals written") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.memory", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.memory") + metric.SetDescription("Memory Usage") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.network.io", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.network.io") + metric.SetDescription("Network IO") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.network.requests", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.network.requests") + metric.SetDescription("Network requests") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.op_execution_time", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.op_execution_time") + metric.SetDescription("Execution time by operation") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.operations.rate", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.operations.rate") + metric.SetDescription("Execution rate by operation") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.oplog.rate", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.oplog.rate") + metric.SetDescription("Oplog rate") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.oplog.time", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.oplog.time") + metric.SetDescription("Oplog time") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.ops", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.ops") + metric.SetDescription("FIXME") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.page_faults", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.page_faults") + metric.SetDescription("Page faults") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.query_executor.scanned", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.query_executor.scanned") + metric.SetDescription("Scanned objects") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.query_targeting.scanned_per_returned", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.query_targeting.scanned_per_returned") + metric.SetDescription("Scanned objects per returned") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.restarts", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.restarts") + metric.SetDescription("Restarts in last hour") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.swap", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.swap") + metric.SetDescription("Swap usage") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.swap.io", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.swap.io") + metric.SetDescription("Swap IO") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.system.cpu", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.system.cpu") + metric.SetDescription("System CPU Usage") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.system.memory", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.system.memory") + metric.SetDescription("System Memory Usage") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.system.network.io", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.system.network.io") + metric.SetDescription("System Network IO") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.system.normalized.cpu", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.system.normalized.cpu") + metric.SetDescription("System CPU Normalized to pct") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodb.atlas.tickets", + func(metric pdata.Metric) { + metric.SetName("mongodb.atlas.tickets") + metric.SetDescription("Tickets") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, +} + +// M contains a set of methods for each metric that help with +// manipulating those metrics. M is an alias for Metrics +var M = Metrics + +// Labels contains the possible metric labels that can be used. +var Labels = struct { +}{} + +// L contains the possible metric labels that can be used. L is an alias for +// Labels. +var L = Labels diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go new file mode 100644 index 000000000000..1a5dab9f1fd1 --- /dev/null +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go @@ -0,0 +1,1001 @@ +// Copyright OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package metadata + +import ( + "fmt" + "strings" + "time" + + "go.mongodb.org/atlas/mongodbatlas" + "go.opentelemetry.io/collector/model/pdata" +) + +type metricMappingData struct { + metricName string + attributes map[string]pdata.AttributeValue +} + +var metricNameMapping = map[string]metricMappingData{ + // MongoDB CPU usage. For hosts with more than one CPU core, these values can exceed 100%. + + // sfx: process.cpu.user + "PROCESS_CPU_USER": {"process.cpu.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_PROCESS_CPU_USER": {"process.cpu.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx:process.cpu.kernel + "PROCESS_CPU_KERNEL": {"process.cpu.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_PROCESS_CPU_KERNEL": {"process.cpu.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: skipped + "PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: skipped + "PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // MongoDB CPU usage scaled to a range of 0% to 100%. Atlas computes this value by dividing by the number of CPU cores. + + // sfx: process.normalized.cpu.children_user + "PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: process.normalized.cpu.children_kernel + "PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: process.normalized.cpu.user + "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // Context: Process + // sfx: skipped + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: process.normalized.cpu.kernel + "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.utilization", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // Rate of asserts for a MongoDB process found in the asserts document that the serverStatus command generates. + + // sfx: asserts.regular + "ASSERT_REGULAR": {"process.asserts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("regular"), + }}, + + // sfx: asserts.warning + "ASSERT_WARNING": {"process.asserts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("warning"), + }}, + + // sfx: asserts.msg + "ASSERT_MSG": {"process.asserts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("msg"), + }}, + + // sfx: asserts.user + "ASSERT_USER": {"process.asserts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("user"), + }}, + + // Amount of data flushed in the background. + + // sfx: background_flush_avg + "BACKGROUND_FLUSH_AVG": {"process.background_flush", map[string]pdata.AttributeValue{}}, + + // Amount of bytes in the WiredTiger storage engine cache and tickets found in the wiredTiger.cache and wiredTiger.concurrentTransactions documents that the serverStatus command generates. + + // sfx: cache.bytes.read_into + "CACHE_BYTES_READ_INTO": {"process.cache.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("read_into"), + }}, + + // sfx: cache.bytes.written_from + "CACHE_BYTES_WRITTEN_FROM": {"process.cache.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("written_from"), + }}, + + // sfx: cache.dirty_bytes + "CACHE_DIRTY_BYTES": {"process.cache.size", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("dirty"), + }}, + + // sfx: cache.used_bytes + "CACHE_USED_BYTES": {"process.cache.size", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + }}, + + // sfx: tickets.available.reads + "TICKETS_AVAILABLE_READS": {"process.tickets", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("available_reads"), + }}, + + // sfx: tickets.available.writes + "TICKETS_AVAILABLE_WRITE": {"process.tickets", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("available_writes"), + }}, + + // Number of connections to a MongoDB process found in the connections document that the serverStatus command generates. + // sfx: connections.current + "CONNECTIONS": {"process.connections", map[string]pdata.AttributeValue{}}, + + // Number of cursors for a MongoDB process found in the metrics.cursor document that the serverStatus command generates. + // sfx: cursors.total_open + "CURSORS_TOTAL_OPEN": {"process.cursors", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("open"), + }}, + + // sfx: cursors.timed_out + "CURSORS_TOTAL_TIMED_OUT": {"process.cursors", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("timed_out"), + }}, + + // Numbers of Memory Issues and Page Faults for a MongoDB process. + // sfx: extra_info.page_faults + "EXTRA_INFO_PAGE_FAULTS": {"process.page_faults", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("extra_info"), + }}, + + // sfx: skipped + "GLOBAL_ACCESSES_NOT_IN_MEMORY": {"process.page_faults", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("global_accesses_not_in_memory"), + }}, + // sfx: skipped + "GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN": {"process.page_faults", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("exceptions_thrown"), + }}, + + // Number of operations waiting on locks for the MongoDB process that the serverStatus command generates. Cloud Manager computes these values based on the type of storage engine. + // sfx: global_lock.current_queue.total + "GLOBAL_LOCK_CURRENT_QUEUE_TOTAL": {"process.global_lock", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("current_queue_total"), + }}, + // sfx: global_lock.current_queue.readers + "GLOBAL_LOCK_CURRENT_QUEUE_READERS": {"process.global_lock", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("current_queue_readers"), + }}, + // sfx: global_lock.current_queue.writers + "GLOBAL_LOCK_CURRENT_QUEUE_WRITERS": {"process.global_lock", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("current_queue_writers"), + }}, + + // Number of index btree operations. + // sfx: skipped + "INDEX_COUNTERS_BTREE_ACCESSES": {"process.index.counters", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("btree_accesses"), + }}, + // sfx: skipped + "INDEX_COUNTERS_BTREE_HITS": {"process.index.counters", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("btree_hits"), + }}, + // sfx: skipped + "INDEX_COUNTERS_BTREE_MISSES": {"process.index.counters", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("btree_misses"), + }}, + // sfx: skipped + "INDEX_COUNTERS_BTREE_MISS_RATIO": {"process.index.btree_miss_ratio", map[string]pdata.AttributeValue{}}, + + // Number of journaling operations. + // sfx: skipped + "JOURNALING_COMMITS_IN_WRITE_LOCK": {"process.journaling.commits", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("in_write_lock"), + }}, + // sfx: skipped + "JOURNALING_MB": {"process.journaling.written", map[string]pdata.AttributeValue{}}, + // sfx: skipped + "JOURNALING_WRITE_DATA_FILES_MB": {"process.journaling.data_files", map[string]pdata.AttributeValue{}}, + + // Amount of memory for a MongoDB process found in the mem document that the serverStatus command collects. + // sfx: mem.resident + "MEMORY_RESIDENT": {"process.memory.usage", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("resident"), + }}, + // sfx: mem.virtual + "MEMORY_VIRTUAL": {"process.memory.usage", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("virtual"), + }}, + + // sfx: mem.mapped + "MEMORY_MAPPED": {"process.memory.usage", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("mapped"), + }}, + // sfx: skipped + "COMPUTED_MEMORY": {"process.memory.usage", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("computed"), + }}, + + // Amount of throughput for MongoDB process found in the network document that the serverStatus command collects. + + // sfx: network.bytes_in + "NETWORK_BYTES_IN": {"process.network.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("receive"), + }}, + // sfx: network.bytes_out + "NETWORK_BYTES_OUT": {"process.network.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("transmit"), + }}, + // sfx: network.num_requests + "NETWORK_NUM_REQUESTS": {"process.network.requests", map[string]pdata.AttributeValue{}}, + + // Durations and throughput of the MongoDB process' oplog. + // sfx: oplog.slave.lag_master_time + "OPLOG_SLAVE_LAG_MASTER_TIME": {"process.oplog.time", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("slave_lag_master_time"), + }}, + // sfx: oplog.master.time + "OPLOG_MASTER_TIME": {"process.oplog.time", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("master_time"), + }}, + // sfx: oplog.master.lag_time_diff + "OPLOG_MASTER_LAG_TIME_DIFF": {"process.oplog.time", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("master_lag_time_diff"), + }}, + // sfx: skipped + "OPLOG_RATE_GB_PER_HOUR": {"process.oplog.rate", map[string]pdata.AttributeValue{ + "aggregation": pdata.NewAttributeValueString("hour"), + }}, + + // Number of database operations on a MongoDB process since the process last started. + + // sfx: skipped + "DB_STORAGE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("total"), + }}, + + // sfx: skipped + "DB_DATA_SIZE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("data_size_total"), + }}, + + // Rate of database operations on a MongoDB process since the process last started found in the opcounters document that the serverStatus command collects. + // sfx: opcounter.command + "OPCOUNTER_CMD": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("cmd"), + "role": pdata.NewAttributeValueString("primary"), + }}, + // sfx: opcounter.query + "OPCOUNTER_QUERY": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("query"), + "role": pdata.NewAttributeValueString("primary"), + }}, + // sfx: opcounter.update + "OPCOUNTER_UPDATE": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("update"), + "role": pdata.NewAttributeValueString("primary"), + }}, + // sfx: opcounter.delete + "OPCOUNTER_DELETE": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("delete"), + "role": pdata.NewAttributeValueString("primary"), + }}, + // sfx: opcounter.getmore + "OPCOUNTER_GETMORE": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("getmore"), + "role": pdata.NewAttributeValueString("primary"), + }}, + // sfx: opcounter.insert + "OPCOUNTER_INSERT": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("insert"), + "role": pdata.NewAttributeValueString("primary"), + }}, + + // Rate of database operations on MongoDB secondaries found in the opcountersRepl document that the serverStatus command collects. + // sfx: opcounter.repl.command + "OPCOUNTER_REPL_CMD": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("cmd"), + "role": pdata.NewAttributeValueString("replica"), + }}, + // sfx: opcounter.repl.update + "OPCOUNTER_REPL_UPDATE": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("update"), + "role": pdata.NewAttributeValueString("replica"), + }}, + // sfx: opcounter.repl.delete + "OPCOUNTER_REPL_DELETE": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("delete"), + "role": pdata.NewAttributeValueString("replica"), + }}, + // sfx: opcounter.repl.insert + "OPCOUNTER_REPL_INSERT": {"process.db.ops", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("insert"), + "role": pdata.NewAttributeValueString("replica"), + }}, + + // Average rate of documents returned, inserted, updated, or deleted per second during a selected time period. + // sfx: document.metrics.returned + "DOCUMENT_METRICS_RETURNED": {"process.db.document.rate", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("returned"), + }}, + // sfx: document.metrics.inserted + "DOCUMENT_METRICS_INSERTED": {"process.db.document.rate", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("inserted"), + }}, + // sfx: document.metrics.updated + "DOCUMENT_METRICS_UPDATED": {"process.db.document.rate", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("updated"), + }}, + // sfx: document.metrics.deleted + "DOCUMENT_METRICS_DELETED": {"process.db.document.rate", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("deleted"), + }}, + + // Average rate for operations per second during a selected time period that perform a sort but cannot perform the sort using an index. + // sfx: operations_scan_and_order + "OPERATIONS_SCAN_AND_ORDER": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "operation": pdata.NewAttributeValueString("scan_and_order"), + }}, + + // Average execution time in milliseconds per read, write, or command operation during a selected time period. + // sfx: skipped + "OP_EXECUTION_TIME_READS": {"process.db.op_execution_time", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("reads"), + }}, + // sfx: skipped + "OP_EXECUTION_TIME_WRITES": {"process.db.op_execution_time", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("writes"), + }}, + // sfx: skipped + "OP_EXECUTION_TIME_COMMANDS": {"process.db.op_execution_time", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("commands"), + }}, + + // Number of times the host restarted within the previous hour. + // sfx: skipped + "RESTARTS_IN_LAST_HOUR": {"process.restarts", map[string]pdata.AttributeValue{ + "span": pdata.NewAttributeValueString("hour"), + }}, + + // Average rate per second to scan index items during queries and query-plan evaluations found in the value of totalKeysExamined from the explain command. + // sfx: query.executor.scanned + "QUERY_EXECUTOR_SCANNED": {"process.db.query_executor.scanned", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("index items"), + }}, + + // Average rate of documents scanned per second during queries and query-plan evaluations found in the value of totalDocsExamined from the explain command. + // sfx: query.executor.scanned_objects + "QUERY_EXECUTOR_SCANNED_OBJECTS": {"process.db.query_executor.scanned", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("objects"), + }}, + + // Ratio of the number of index items scanned to the number of documents returned. + // sfx: query.targeting.scanned_per_returned + "QUERY_TARGETING_SCANNED_PER_RETURNED": {"process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("index items"), + }}, + + // Ratio of the number of documents scanned to the number of documents returned. + // sfx: query.targeting.scanned_objects_per_returned + "QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED": {"process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("objects"), + }}, + + // CPU usage of processes on the host. For hosts with more than one CPU core, this value can exceed 100%. + // sfx: system.cpu.user + "SYSTEM_CPU_USER": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_CPU_USER": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.cpu.kernel + "SYSTEM_CPU_KERNEL": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_CPU_KERNEL": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.cpu.nice + "SYSTEM_CPU_NICE": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("nice"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: system.cpu.iowait + "SYSTEM_CPU_IOWAIT": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("iowait"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_CPU_IOWAIT": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("iowait"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.cpu.irq + "SYSTEM_CPU_IRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("irq"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_CPU_IRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("irq"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.cpu.softirq + "SYSTEM_CPU_SOFTIRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("softirq"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_CPU_SOFTIRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("softirq"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.cpu.guest + "SYSTEM_CPU_GUEST": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("guest"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_CPU_GUEST": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("guest"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.cpu.steal + "SYSTEM_CPU_STEAL": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("steal"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_CPU_STEAL": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("steal"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // CPU usage of processes on the host scaled to a range of 0 to 100% by dividing by the number of CPU cores. + // sfx: system.normalized.cpu.user + "SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("user"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.normalized.cpu.kernel + "SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("kernel"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.normalized.cpu.nice + "SYSTEM_NORMALIZED_CPU_NICE": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("nice"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: system.normalized.cpu.iowait + "SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("iowait"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("iowait"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.normalized.cpu.irq + "SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("irq"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("irq"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.normalized.cpu.softirq + "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("softirq"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("softirq"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.normalized.cpu.guest + "SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("guest"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("guest"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: system.normalized.cpu.steal + "SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("steal"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("steal"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // Physical memory usage, in bytes, that the host uses. + // sfx: skipped + "SYSTEM_MEMORY_AVAILABLE": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("available"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_MEMORY_AVAILABLE": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("available"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "SYSTEM_MEMORY_BUFFERS": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("buffers"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_MEMORY_BUFFERS": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("buffers"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "SYSTEM_MEMORY_CACHED": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("cached"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_MEMORY_CACHED": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("cached"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "SYSTEM_MEMORY_FREE": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_MEMORY_FREE": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "SYSTEM_MEMORY_SHARED": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("shared"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_MEMORY_SHARED": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("shared"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "SYSTEM_MEMORY_USED": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_MEMORY_USED": {"system.memory", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // Average rate of physical bytes per second that the eth0 network interface received and transmitted. + // sfx: skipped + "SYSTEM_NETWORK_IN": {"system.network.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("receive"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NETWORK_IN": {"system.network.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("receive"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "SYSTEM_NETWORK_OUT": {"system.network.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("transmit"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SYSTEM_NETWORK_OUT": {"system.network.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("transmit"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // Total amount of memory that swap uses. + // sfx: skipped + "SWAP_USAGE_USED": {"system.paging.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SWAP_USAGE_USED": {"system.paging.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "SWAP_USAGE_FREE": {"system.paging.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SWAP_USAGE_FREE": {"system.paging.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // Total amount of memory written and read from swap. + // sfx: skipped + "SWAP_IO_IN": {"system.paging.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("in"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SWAP_IO_IN": {"system.paging.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("in"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "SWAP_IO_OUT": {"system.paging.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("out"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_SWAP_IO_OUT": {"system.paging.io", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("out"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // Memory usage, in bytes, that Atlas Search processes use. + // sfx: skipped + "FTS_MEMORY_RESIDENT": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("resident"), + }}, + // sfx: skipped + "FTS_MEMORY_VIRTUAL": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("virtual"), + }}, + // sfx: skipped + "FTS_MEMORY_MAPPED": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("mapped"), + }}, + + // Disk space, in bytes, that Atlas Search indexes use. + // sfx: skipped + "FTS_DISK_UTILIZATION": {"system.fts.disk.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + }}, + + // Percentage of CPU that Atlas Search processes use. + // sfx: skipped + "FTS_PROCESS_CPU_USER": {"system.fts.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("user"), + }}, + // sfx: skipped + "FTS_PROCESS_CPU_KERNEL": {"system.fts.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("kernel"), + }}, + // sfx: skipped + "FTS_PROCESS_NORMAILIZED_CPU_USER": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("user"), + }}, + // sfx: skipped + "FTS_PROCESS_NORMAILIZED_CPU_KERNEL": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("kernel"), + }}, + + // Process Disk Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) + + // Measures throughput of I/O operations for the disk partition used for MongoDB. + // sfx: skipped + "DISK_PARTITION_IOPS_READ": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("read"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_DISK_PARTITION_IOPS_READ": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("read"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: skipped + "DISK_PARTITION_IOPS_WRITE": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("write"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_DISK_PARTITION_IOPS_WRITE": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("write"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: skipped + "DISK_PARTITION_IOPS_TOTAL": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("total"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_DISK_PARTITION_IOPS_TOTAL": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("total"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: skipped + "DISK_PARTITION_UTILIZATION": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_DISK_PARTITION_UTILIZATION": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // The percentage of time during which requests are being issued to and serviced by the partition. + // This includes requests from any process, not just MongoDB processes. + // sfx: skipped + "DISK_PARTITION_LATENCY_READ": {"disk.partition.latency", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("read"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_DISK_PARTITION_LATENCY_READ": {"disk.partition.latency", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("read"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: skipped + "DISK_PARTITION_LATENCY_WRITE": {"disk.partition.latency", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("write"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_DISK_PARTITION_LATENCY_WRITE": {"disk.partition.latency", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("write"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // Measures latency per operation type of the disk partition used by MongoDB. + // sfx: skipped + "DISK_PARTITION_SPACE_FREE": {"disk.partition.space", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_DISK_PARTITION_SPACE_FREE": {"disk.partition.space", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: skipped + "DISK_PARTITION_SPACE_USED": {"disk.partition.space", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + + // sfx: skipped + "MAX_DISK_PARTITION_SPACE_USED": {"disk.partition.space", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // sfx: skipped + "DISK_PARTITION_SPACE_PERCENT_FREE": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + // sfx: skipped + "DISK_PARTITION_SPACE_PERCENT_USED": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("avg"), + }}, + // sfx: skipped + "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, + + // Process Database Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) + // sfx: skipped + "DATABASE_COLLECTION_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("collection"), + }}, + // sfx: skipped + "DATABASE_INDEX_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("index"), + }}, + // sfx: skipped + "DATABASE_EXTENT_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("extent"), + }}, + // sfx: skipped + "DATABASE_OBJECT_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("object"), + }}, + // sfx: skipped + "DATABASE_VIEW_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("view"), + }}, + // sfx: skipped + "DATABASE_AVERAGE_OBJECT_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("object"), + }}, + // sfx: skipped + "DATABASE_AVERAGE_STORAGE_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("storage"), + }}, + // sfx: skipped + "DATABASE_AVERAGE_INDEX_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("index"), + }}, + // sfx: skipped + "DATABASE_AVERAGE_DATA_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "type": pdata.NewAttributeValueString("data"), + }}, +} + +func mappedMetricByName(name string) (MetricIntf, map[string]pdata.AttributeValue) { + info, found := metricNameMapping[name] + if !found { + return nil, nil + } + + metricinf := Metrics.ByName(info.metricName) + return metricinf, info.attributes +} + +func inferMetricType(mongoType string) (pdata.MetricDataType, string) { + var dataType pdata.MetricDataType + switch mongoType { + case "BYTES", "MEGABYTES", "SECONDS", "KILOBYTES": + dataType = pdata.MetricDataTypeSum + default: + dataType = pdata.MetricDataTypeGauge + } + + return dataType, strings.ToLower(mongoType) +} + +func buildMetricIntf(meas *mongodbatlas.Measurements) MetricIntf { + metricType, metricUnits := inferMetricType(meas.Units) + metricName := fmt.Sprintf("mongodb.atlas.%s", strings.ToLower(meas.Name)) + return &metricImpl{ + metricName, + func(m pdata.Metric) { + m.SetDataType(metricType) + m.SetUnit(metricUnits) + }, + } +} + +func MeasurementsToMetric(meas *mongodbatlas.Measurements, buildUnrecognized bool) (*pdata.Metric, error) { + intf, attrs := mappedMetricByName(meas.Name) + if intf == nil { + if buildUnrecognized { + intf = buildMetricIntf(meas) + } else { + return nil, nil // Not an error- simply skipping undocumented metrics + } + } + m := pdata.NewMetric() + intf.Init(m) + switch m.DataType() { + case pdata.MetricDataTypeGauge: + datapoints := m.Gauge().DataPoints() + addDataPoints(datapoints, meas, attrs) + case pdata.MetricDataTypeSum: + datapoints := m.Sum().DataPoints() + addDataPoints(datapoints, meas, attrs) + default: + return nil, fmt.Errorf("unrecognized data type for metric '%s'", meas.Name) + } + + return &m, nil +} + +func addDataPoints(datapoints pdata.NumberDataPointSlice, meas *mongodbatlas.Measurements, attrs map[string]pdata.AttributeValue) { + for _, point := range meas.DataPoints { + if point.Value != nil { + dp := datapoints.AppendEmpty() + curTime, err := time.Parse(time.RFC3339, point.Timestamp) + // FIXME: handle this error + if err != nil { + break + } + for k, v := range attrs { + dp.Attributes().Upsert(k, v) + } + dp.SetTimestamp(pdata.NewTimestampFromTime(curTime)) + dp.SetDoubleVal(float64(*point.Value)) + } + } +} diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping_test.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping_test.go new file mode 100644 index 000000000000..e3bdad3fceba --- /dev/null +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping_test.go @@ -0,0 +1,36 @@ +package metadata + +import ( + "fmt" + "strings" + "testing" + + "go.opentelemetry.io/collector/model/pdata" +) + +func TestKnownMetricsMapped(t *testing.T) { + missingMetrics := make([]string, 0) + wrongNames := make([]string, 0) + // Test all at once so we get one failure with all + // missing or unmatching metrics. + for mongodbName, metricData := range metricNameMapping { + m := pdata.NewMetric() + metricf, _ := mappedMetricByName(mongodbName) + if metricf == nil { + missingMetrics = append(missingMetrics, mongodbName) + } else { + metricf.Init(m) + if metricData.metricName != m.Name() { + wrongNames = append(wrongNames, fmt.Sprintf("found: %s, expected: %s", m.Name(), metricData.metricName)) + } + } + } + + if len(missingMetrics) > 0 { + t.Errorf("Missing metrics with MongoDB names: %s", strings.Join(missingMetrics, ", ")) + } + + if len(wrongNames) > 0 { + t.Errorf("Mismatching names found: %s", strings.Join(wrongNames, ",")) + } +} diff --git a/receiver/mongodbatlasreceiver/internal/metric_conversion.go b/receiver/mongodbatlasreceiver/internal/metric_conversion.go new file mode 100644 index 000000000000..84391e0f4411 --- /dev/null +++ b/receiver/mongodbatlasreceiver/internal/metric_conversion.go @@ -0,0 +1,45 @@ +// Copyright OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "go.mongodb.org/atlas/mongodbatlas" + "go.opentelemetry.io/collector/model/pdata" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/internal/metadata" +) + +func processMeasurements( + resource pdata.Resource, + measurements []*mongodbatlas.Measurements, +) (pdata.Metrics, []error) { + allErrors := make([]error, 0) + metricSlice := pdata.NewMetrics() + rm := metricSlice.ResourceMetrics().AppendEmpty() + resource.CopyTo(rm.Resource()) + ilms := rm.InstrumentationLibraryMetrics().AppendEmpty() + for _, meas := range measurements { + metric, err := metadata.MeasurementsToMetric(meas, false) + if err != nil { + allErrors = append(allErrors, err) + } else { + if metric != nil { + // TODO: still handling skipping metrics, there's got to be better + metric.CopyTo(ilms.Metrics().AppendEmpty()) + } + } + } + return metricSlice, allErrors +} diff --git a/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go b/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go index ecea71c3ba3f..7551f32adfbb 100644 --- a/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go +++ b/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go @@ -16,13 +16,13 @@ package internal import ( "context" - "fmt" "github.com/mongodb-forks/digest" "github.com/pkg/errors" "go.mongodb.org/atlas/mongodbatlas" - "go.opentelemetry.io/collector/model/pdata" "go.uber.org/zap" + + "go.opentelemetry.io/collector/model/pdata" ) // MongoDBAtlasClient wraps the official MongoDB Atlas client to manage pagination @@ -468,9 +468,3 @@ func (s *MongoDBAtlasClient) processDiskMeasurementsPage( } return measurements.Measurements, hasNext(measurements.Links), nil } - -func processMeasurements(_ pdata.Resource, measurements []*mongodbatlas.Measurements) (pdata.Metrics, error) { - // Stub- will be replaced with code for normalizing and processing metrics - fmt.Printf("Fake processing %d metrics\n", len(measurements)) - return pdata.NewMetrics(), nil -} diff --git a/receiver/mongodbatlasreceiver/metadata.yaml b/receiver/mongodbatlasreceiver/metadata.yaml new file mode 100644 index 000000000000..f40e52b53bb4 --- /dev/null +++ b/receiver/mongodbatlasreceiver/metadata.yaml @@ -0,0 +1,209 @@ +name: mongoatlasreceiver + +metrics: + mongodb.atlas.asserts: + description: Number of assertions + unit: 1 + data: + type: gauge + mongodb.atlas.background_flush: + description: Amount of data flushed in the background + unit: 1 + data: + type: gauge + mongodb.atlas.cache.io: + description: Cache throughput + unit: 1 + data: + type: gauge + mongodb.atlas.cache.size: + description: Cache sizes + unit: 1 + data: + type: gauge + mongodb.atlas.connections: + description: Number of current connections + unit: 1 + data: + type: gauge + mongodb.atlas.cpu: + description: CPU Usage + unit: 1 + data: + type: gauge + mongodb.atlas.cpu.children: + description: CPU Usage for child processes + unit: 1 + data: + type: gauge + mongodb.atlas.cpu.children.normalized: + description: CPU Usage for child processes, normalized to pct + unit: 1 + data: + type: gauge + mongodb.atlas.cpu.normalized: + description: CPU Usage, normalized to pct + unit: 1 + data: + type: gauge + mongodb.atlas.cursors: + description: Number of cursors + unit: 1 + data: + type: gauge + mongodb.atlas.db.storage: + description: FIXME + unit: 1 + data: + type: gauge + mongodb.atlas.document.rate: + # TODO: I'm not sure this one is right + description: Document access rates + unit: 1 + data: + type: gauge + mongodb.atlas.fts.cpu: + description: Full text search CPU + unit: 1 + data: + type: gauge + mongodb.atlas.fts.cpu.normalized: + description: Full text search CPU, normalized to pct + unit: 1 + data: + type: gauge + mongodb.atlas.fts.disk: + description: Full text search disk usage + unit: 1 + data: + type: gauge + mongodb.atlas.fts.memory: + description: Full text search memory usage + unit: 1 + data: + type: gauge + mongodb.atlas.global_lock: + description: Number and status of locks + unit: 1 + data: + type: gauge + mongodb.atlas.index.btree_miss_ratio: + description: Index miss ratio + unit: 1 + data: + type: gauge + mongodb.atlas.index.counters: + description: Indexes + unit: 1 + data: + type: gauge + mongodb.atlas.journaling.commits: + description: Journaling commits + unit: 1 + data: + type: gauge + mongodb.atlas.journaling.data_files: + description: Data file sizes + unit: 1 + data: + type: gauge + mongodb.atlas.journaling.written: + description: Journals written + unit: 1 + data: + type: gauge + mongodb.atlas.memory: + description: Memory Usage + unit: 1 + data: + type: gauge + mongodb.atlas.network.io: + description: Network IO + unit: 1 + data: + type: gauge + mongodb.atlas.network.requests: + description: Network requests + unit: 1 + data: + type: gauge + mongodb.atlas.op_execution_time: + description: Execution time by operation + unit: 1 + data: + type: gauge + mongodb.atlas.operations.rate: + description: Execution rate by operation + unit: 1 + data: + type: gauge + mongodb.atlas.oplog.rate: + description: Oplog rate + unit: 1 + data: + type: gauge + mongodb.atlas.oplog.time: + description: Oplog time + unit: 1 + data: + type: gauge + mongodb.atlas.ops: + description: FIXME + unit: 1 + data: + type: gauge + mongodb.atlas.page_faults: + description: Page faults + unit: 1 + data: + type: gauge + mongodb.atlas.query_executor.scanned: + description: Scanned objects + unit: 1 + data: + type: gauge + mongodb.atlas.query_targeting.scanned_per_returned: + description: Scanned objects per returned + unit: 1 + data: + type: gauge + mongodb.atlas.restarts: + description: Restarts in last hour + unit: 1 + data: + type: gauge + mongodb.atlas.swap: + description: Swap usage + unit: 1 + data: + type: gauge + mongodb.atlas.swap.io: + description: Swap IO + unit: 1 + data: + type: gauge + mongodb.atlas.system.cpu: + description: System CPU Usage + unit: 1 + data: + type: gauge + mongodb.atlas.system.memory: + description: System Memory Usage + unit: 1 + data: + type: gauge + mongodb.atlas.system.network.io: + description: System Network IO + unit: 1 + data: + type: gauge + mongodb.atlas.system.normalized.cpu: + description: System CPU Normalized to pct + unit: 1 + data: + type: gauge + mongodb.atlas.tickets: + description: Tickets + unit: 1 + data: + type: gauge From 89e45bc7012624d3bbc8c3056dcfe3da0a3dd812 Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Fri, 1 Oct 2021 10:59:53 -0700 Subject: [PATCH 04/13] align metrics in metadata.yaml with name map --- receiver/mongodbatlasreceiver/codegen.go | 20 + .../internal/metadata/generated_metrics.go | 566 +++++++++++------- .../internal/metadata/metric_name_mapping.go | 152 ++--- receiver/mongodbatlasreceiver/metadata.yaml | 137 +++-- 4 files changed, 524 insertions(+), 351 deletions(-) create mode 100644 receiver/mongodbatlasreceiver/codegen.go diff --git a/receiver/mongodbatlasreceiver/codegen.go b/receiver/mongodbatlasreceiver/codegen.go new file mode 100644 index 000000000000..fc2ac8137f74 --- /dev/null +++ b/receiver/mongodbatlasreceiver/codegen.go @@ -0,0 +1,20 @@ +// Copyright 2020 The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build !windows +// +build !windows + +//go:generate mdatagen metadata.yaml + +package mongodbatlasreceiver diff --git a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go index ef0410e8916b..03058ccfebeb 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go @@ -55,138 +55,165 @@ func (m *metricImpl) Init(metric pdata.Metric) { } type metricStruct struct { - MongodbAtlasAsserts MetricIntf - MongodbAtlasBackgroundFlush MetricIntf - MongodbAtlasCacheIo MetricIntf - MongodbAtlasCacheSize MetricIntf - MongodbAtlasConnections MetricIntf - MongodbAtlasCPU MetricIntf - MongodbAtlasCPUChildren MetricIntf - MongodbAtlasCPUChildrenNormalized MetricIntf - MongodbAtlasCPUNormalized MetricIntf - MongodbAtlasCursors MetricIntf - MongodbAtlasDbStorage MetricIntf - MongodbAtlasDocumentRate MetricIntf - MongodbAtlasFtsCPU MetricIntf - MongodbAtlasFtsCPUNormalized MetricIntf - MongodbAtlasFtsDisk MetricIntf - MongodbAtlasFtsMemory MetricIntf - MongodbAtlasGlobalLock MetricIntf - MongodbAtlasIndexBtreeMissRatio MetricIntf - MongodbAtlasIndexCounters MetricIntf - MongodbAtlasJournalingCommits MetricIntf - MongodbAtlasJournalingDataFiles MetricIntf - MongodbAtlasJournalingWritten MetricIntf - MongodbAtlasMemory MetricIntf - MongodbAtlasNetworkIo MetricIntf - MongodbAtlasNetworkRequests MetricIntf - MongodbAtlasOpExecutionTime MetricIntf - MongodbAtlasOperationsRate MetricIntf - MongodbAtlasOplogRate MetricIntf - MongodbAtlasOplogTime MetricIntf - MongodbAtlasOps MetricIntf - MongodbAtlasPageFaults MetricIntf - MongodbAtlasQueryExecutorScanned MetricIntf - MongodbAtlasQueryTargetingScannedPerReturned MetricIntf - MongodbAtlasRestarts MetricIntf - MongodbAtlasSwap MetricIntf - MongodbAtlasSwapIo MetricIntf - MongodbAtlasSystemCPU MetricIntf - MongodbAtlasSystemMemory MetricIntf - MongodbAtlasSystemNetworkIo MetricIntf - MongodbAtlasSystemNormalizedCPU MetricIntf - MongodbAtlasTickets MetricIntf + DbCounts MetricIntf + DbSize MetricIntf + DiskPartitionIops MetricIntf + DiskPartitionLatency MetricIntf + DiskPartitionSpace MetricIntf + DiskPartitionUtilization MetricIntf + ProcessAsserts MetricIntf + ProcessBackgroundFlush MetricIntf + ProcessCacheIo MetricIntf + ProcessCacheSize MetricIntf + ProcessConnections MetricIntf + ProcessCPUChildrenNormalizedUsage MetricIntf + ProcessCPUChildrenUsage MetricIntf + ProcessCPUNormalizedUsage MetricIntf + ProcessCPUUsage MetricIntf + ProcessCursors MetricIntf + ProcessDbDocumentRate MetricIntf + ProcessDbOperationsRate MetricIntf + ProcessDbOperationsTime MetricIntf + ProcessDbQueryExecutorScanned MetricIntf + ProcessDbQueryTargetingScannedPerReturned MetricIntf + ProcessDbStorage MetricIntf + ProcessFtsCPUNormalizedUsage MetricIntf + ProcessFtsCPUUsage MetricIntf + ProcessFtsDiskUsage MetricIntf + ProcessFtsMemoryUsage MetricIntf + ProcessGlobalLock MetricIntf + ProcessIndexBtreeMissRatio MetricIntf + ProcessIndexCounters MetricIntf + ProcessJournalingCommits MetricIntf + ProcessJournalingDataFiles MetricIntf + ProcessJournalingWritten MetricIntf + ProcessMemoryUsage MetricIntf + ProcessNetworkIo MetricIntf + ProcessNetworkRequests MetricIntf + ProcessOplogRate MetricIntf + ProcessOplogTime MetricIntf + ProcessPageFaults MetricIntf + ProcessRestarts MetricIntf + ProcessTickets MetricIntf + SystemCPUNormalizedUsage MetricIntf + SystemCPUUsage MetricIntf + SystemFtsCPUNormalizedUsage MetricIntf + SystemFtsCPUUsage MetricIntf + SystemFtsDiskUtilization MetricIntf + SystemFtsMemoryUsage MetricIntf + SystemMemoryUsage MetricIntf + SystemNetworkIo MetricIntf + SystemPagingIo MetricIntf + SystemPagingUsage MetricIntf } // Names returns a list of all the metric name strings. func (m *metricStruct) Names() []string { return []string{ - "mongodb.atlas.asserts", - "mongodb.atlas.background_flush", - "mongodb.atlas.cache.io", - "mongodb.atlas.cache.size", - "mongodb.atlas.connections", - "mongodb.atlas.cpu", - "mongodb.atlas.cpu.children", - "mongodb.atlas.cpu.children.normalized", - "mongodb.atlas.cpu.normalized", - "mongodb.atlas.cursors", - "mongodb.atlas.db.storage", - "mongodb.atlas.document.rate", - "mongodb.atlas.fts.cpu", - "mongodb.atlas.fts.cpu.normalized", - "mongodb.atlas.fts.disk", - "mongodb.atlas.fts.memory", - "mongodb.atlas.global_lock", - "mongodb.atlas.index.btree_miss_ratio", - "mongodb.atlas.index.counters", - "mongodb.atlas.journaling.commits", - "mongodb.atlas.journaling.data_files", - "mongodb.atlas.journaling.written", - "mongodb.atlas.memory", - "mongodb.atlas.network.io", - "mongodb.atlas.network.requests", - "mongodb.atlas.op_execution_time", - "mongodb.atlas.operations.rate", - "mongodb.atlas.oplog.rate", - "mongodb.atlas.oplog.time", - "mongodb.atlas.ops", - "mongodb.atlas.page_faults", - "mongodb.atlas.query_executor.scanned", - "mongodb.atlas.query_targeting.scanned_per_returned", - "mongodb.atlas.restarts", - "mongodb.atlas.swap", - "mongodb.atlas.swap.io", - "mongodb.atlas.system.cpu", - "mongodb.atlas.system.memory", - "mongodb.atlas.system.network.io", - "mongodb.atlas.system.normalized.cpu", - "mongodb.atlas.tickets", + "db.counts", + "db.size", + "disk.partition.iops", + "disk.partition.latency", + "disk.partition.space", + "disk.partition.utilization", + "process.asserts", + "process.background_flush", + "process.cache.io", + "process.cache.size", + "process.connections", + "process.cpu.children.normalized.usage", + "process.cpu.children.usage", + "process.cpu.normalized.usage", + "process.cpu.usage", + "process.cursors", + "process.db.document.rate", + "process.db.operations.rate", + "process.db.operations.time", + "process.db.query_executor.scanned", + "process.db.query_targeting.scanned_per_returned", + "process.db.storage", + "process.fts.cpu.normalized.usage", + "process.fts.cpu.usage", + "process.fts.disk.usage", + "process.fts.memory.usage", + "process.global_lock", + "process.index.btree_miss_ratio", + "process.index.counters", + "process.journaling.commits", + "process.journaling.data_files", + "process.journaling.written", + "process.memory.usage", + "process.network.io", + "process.network.requests", + "process.oplog.rate", + "process.oplog.time", + "process.page_faults", + "process.restarts", + "process.tickets", + "system.cpu.normalized.usage", + "system.cpu.usage", + "system.fts.cpu.normalized.usage", + "system.fts.cpu.usage", + "system.fts.disk.utilization", + "system.fts.memory.usage", + "system.memory.usage", + "system.network.io", + "system.paging.io", + "system.paging.usage", } } var metricsByName = map[string]MetricIntf{ - "mongodb.atlas.asserts": Metrics.MongodbAtlasAsserts, - "mongodb.atlas.background_flush": Metrics.MongodbAtlasBackgroundFlush, - "mongodb.atlas.cache.io": Metrics.MongodbAtlasCacheIo, - "mongodb.atlas.cache.size": Metrics.MongodbAtlasCacheSize, - "mongodb.atlas.connections": Metrics.MongodbAtlasConnections, - "mongodb.atlas.cpu": Metrics.MongodbAtlasCPU, - "mongodb.atlas.cpu.children": Metrics.MongodbAtlasCPUChildren, - "mongodb.atlas.cpu.children.normalized": Metrics.MongodbAtlasCPUChildrenNormalized, - "mongodb.atlas.cpu.normalized": Metrics.MongodbAtlasCPUNormalized, - "mongodb.atlas.cursors": Metrics.MongodbAtlasCursors, - "mongodb.atlas.db.storage": Metrics.MongodbAtlasDbStorage, - "mongodb.atlas.document.rate": Metrics.MongodbAtlasDocumentRate, - "mongodb.atlas.fts.cpu": Metrics.MongodbAtlasFtsCPU, - "mongodb.atlas.fts.cpu.normalized": Metrics.MongodbAtlasFtsCPUNormalized, - "mongodb.atlas.fts.disk": Metrics.MongodbAtlasFtsDisk, - "mongodb.atlas.fts.memory": Metrics.MongodbAtlasFtsMemory, - "mongodb.atlas.global_lock": Metrics.MongodbAtlasGlobalLock, - "mongodb.atlas.index.btree_miss_ratio": Metrics.MongodbAtlasIndexBtreeMissRatio, - "mongodb.atlas.index.counters": Metrics.MongodbAtlasIndexCounters, - "mongodb.atlas.journaling.commits": Metrics.MongodbAtlasJournalingCommits, - "mongodb.atlas.journaling.data_files": Metrics.MongodbAtlasJournalingDataFiles, - "mongodb.atlas.journaling.written": Metrics.MongodbAtlasJournalingWritten, - "mongodb.atlas.memory": Metrics.MongodbAtlasMemory, - "mongodb.atlas.network.io": Metrics.MongodbAtlasNetworkIo, - "mongodb.atlas.network.requests": Metrics.MongodbAtlasNetworkRequests, - "mongodb.atlas.op_execution_time": Metrics.MongodbAtlasOpExecutionTime, - "mongodb.atlas.operations.rate": Metrics.MongodbAtlasOperationsRate, - "mongodb.atlas.oplog.rate": Metrics.MongodbAtlasOplogRate, - "mongodb.atlas.oplog.time": Metrics.MongodbAtlasOplogTime, - "mongodb.atlas.ops": Metrics.MongodbAtlasOps, - "mongodb.atlas.page_faults": Metrics.MongodbAtlasPageFaults, - "mongodb.atlas.query_executor.scanned": Metrics.MongodbAtlasQueryExecutorScanned, - "mongodb.atlas.query_targeting.scanned_per_returned": Metrics.MongodbAtlasQueryTargetingScannedPerReturned, - "mongodb.atlas.restarts": Metrics.MongodbAtlasRestarts, - "mongodb.atlas.swap": Metrics.MongodbAtlasSwap, - "mongodb.atlas.swap.io": Metrics.MongodbAtlasSwapIo, - "mongodb.atlas.system.cpu": Metrics.MongodbAtlasSystemCPU, - "mongodb.atlas.system.memory": Metrics.MongodbAtlasSystemMemory, - "mongodb.atlas.system.network.io": Metrics.MongodbAtlasSystemNetworkIo, - "mongodb.atlas.system.normalized.cpu": Metrics.MongodbAtlasSystemNormalizedCPU, - "mongodb.atlas.tickets": Metrics.MongodbAtlasTickets, + "db.counts": Metrics.DbCounts, + "db.size": Metrics.DbSize, + "disk.partition.iops": Metrics.DiskPartitionIops, + "disk.partition.latency": Metrics.DiskPartitionLatency, + "disk.partition.space": Metrics.DiskPartitionSpace, + "disk.partition.utilization": Metrics.DiskPartitionUtilization, + "process.asserts": Metrics.ProcessAsserts, + "process.background_flush": Metrics.ProcessBackgroundFlush, + "process.cache.io": Metrics.ProcessCacheIo, + "process.cache.size": Metrics.ProcessCacheSize, + "process.connections": Metrics.ProcessConnections, + "process.cpu.children.normalized.usage": Metrics.ProcessCPUChildrenNormalizedUsage, + "process.cpu.children.usage": Metrics.ProcessCPUChildrenUsage, + "process.cpu.normalized.usage": Metrics.ProcessCPUNormalizedUsage, + "process.cpu.usage": Metrics.ProcessCPUUsage, + "process.cursors": Metrics.ProcessCursors, + "process.db.document.rate": Metrics.ProcessDbDocumentRate, + "process.db.operations.rate": Metrics.ProcessDbOperationsRate, + "process.db.operations.time": Metrics.ProcessDbOperationsTime, + "process.db.query_executor.scanned": Metrics.ProcessDbQueryExecutorScanned, + "process.db.query_targeting.scanned_per_returned": Metrics.ProcessDbQueryTargetingScannedPerReturned, + "process.db.storage": Metrics.ProcessDbStorage, + "process.fts.cpu.normalized.usage": Metrics.ProcessFtsCPUNormalizedUsage, + "process.fts.cpu.usage": Metrics.ProcessFtsCPUUsage, + "process.fts.disk.usage": Metrics.ProcessFtsDiskUsage, + "process.fts.memory.usage": Metrics.ProcessFtsMemoryUsage, + "process.global_lock": Metrics.ProcessGlobalLock, + "process.index.btree_miss_ratio": Metrics.ProcessIndexBtreeMissRatio, + "process.index.counters": Metrics.ProcessIndexCounters, + "process.journaling.commits": Metrics.ProcessJournalingCommits, + "process.journaling.data_files": Metrics.ProcessJournalingDataFiles, + "process.journaling.written": Metrics.ProcessJournalingWritten, + "process.memory.usage": Metrics.ProcessMemoryUsage, + "process.network.io": Metrics.ProcessNetworkIo, + "process.network.requests": Metrics.ProcessNetworkRequests, + "process.oplog.rate": Metrics.ProcessOplogRate, + "process.oplog.time": Metrics.ProcessOplogTime, + "process.page_faults": Metrics.ProcessPageFaults, + "process.restarts": Metrics.ProcessRestarts, + "process.tickets": Metrics.ProcessTickets, + "system.cpu.normalized.usage": Metrics.SystemCPUNormalizedUsage, + "system.cpu.usage": Metrics.SystemCPUUsage, + "system.fts.cpu.normalized.usage": Metrics.SystemFtsCPUNormalizedUsage, + "system.fts.cpu.usage": Metrics.SystemFtsCPUUsage, + "system.fts.disk.utilization": Metrics.SystemFtsDiskUtilization, + "system.fts.memory.usage": Metrics.SystemFtsMemoryUsage, + "system.memory.usage": Metrics.SystemMemoryUsage, + "system.network.io": Metrics.SystemNetworkIo, + "system.paging.io": Metrics.SystemPagingIo, + "system.paging.usage": Metrics.SystemPagingUsage, } func (m *metricStruct) ByName(n string) MetricIntf { @@ -197,370 +224,451 @@ func (m *metricStruct) ByName(n string) MetricIntf { // manipulating those metrics. var Metrics = &metricStruct{ &metricImpl{ - "mongodb.atlas.asserts", + "db.counts", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.asserts") + metric.SetName("db.counts") + metric.SetDescription("Database feature size") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "db.size", + func(metric pdata.Metric) { + metric.SetName("db.size") + metric.SetDescription("Database feature size") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "disk.partition.iops", + func(metric pdata.Metric) { + metric.SetName("disk.partition.iops") + metric.SetDescription("Disk partition iops") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "disk.partition.latency", + func(metric pdata.Metric) { + metric.SetName("disk.partition.latency") + metric.SetDescription("Disk partition latency") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "disk.partition.space", + func(metric pdata.Metric) { + metric.SetName("disk.partition.space") + metric.SetDescription("Disk partition space") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "disk.partition.utilization", + func(metric pdata.Metric) { + metric.SetName("disk.partition.utilization") + metric.SetDescription("Disk partition utilization") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "process.asserts", + func(metric pdata.Metric) { + metric.SetName("process.asserts") metric.SetDescription("Number of assertions") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.background_flush", + "process.background_flush", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.background_flush") + metric.SetName("process.background_flush") metric.SetDescription("Amount of data flushed in the background") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.cache.io", + "process.cache.io", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.cache.io") + metric.SetName("process.cache.io") metric.SetDescription("Cache throughput") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.cache.size", + "process.cache.size", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.cache.size") + metric.SetName("process.cache.size") metric.SetDescription("Cache sizes") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.connections", + "process.connections", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.connections") + metric.SetName("process.connections") metric.SetDescription("Number of current connections") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.cpu", + "process.cpu.children.normalized.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.cpu") - metric.SetDescription("CPU Usage") + metric.SetName("process.cpu.children.normalized.usage") + metric.SetDescription("CPU Usage for child processes, normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.cpu.children", + "process.cpu.children.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.cpu.children") + metric.SetName("process.cpu.children.usage") metric.SetDescription("CPU Usage for child processes") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.cpu.children.normalized", + "process.cpu.normalized.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.cpu.children.normalized") - metric.SetDescription("CPU Usage for child processes, normalized to pct") + metric.SetName("process.cpu.normalized.usage") + metric.SetDescription("CPU Usage, normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.cpu.normalized", + "process.cpu.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.cpu.normalized") - metric.SetDescription("CPU Usage, normalized to pct") + metric.SetName("process.cpu.usage") + metric.SetDescription("CPU Usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.cursors", + "process.cursors", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.cursors") + metric.SetName("process.cursors") metric.SetDescription("Number of cursors") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.db.storage", + "process.db.document.rate", + func(metric pdata.Metric) { + metric.SetName("process.db.document.rate") + metric.SetDescription("Document access rates") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "process.db.operations.rate", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.db.storage") + metric.SetName("process.db.operations.rate") metric.SetDescription("FIXME") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.document.rate", + "process.db.operations.time", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.document.rate") - metric.SetDescription("Document access rates") + metric.SetName("process.db.operations.time") + metric.SetDescription("FIXME") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.fts.cpu", + "process.db.query_executor.scanned", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.fts.cpu") - metric.SetDescription("Full text search CPU") + metric.SetName("process.db.query_executor.scanned") + metric.SetDescription("Scanned objects") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.fts.cpu.normalized", + "process.db.query_targeting.scanned_per_returned", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.fts.cpu.normalized") + metric.SetName("process.db.query_targeting.scanned_per_returned") + metric.SetDescription("Scanned objects per returned") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "process.db.storage", + func(metric pdata.Metric) { + metric.SetName("process.db.storage") + metric.SetDescription("FIXME") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "process.fts.cpu.normalized.usage", + func(metric pdata.Metric) { + metric.SetName("process.fts.cpu.normalized.usage") metric.SetDescription("Full text search CPU, normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.fts.disk", + "process.fts.cpu.usage", + func(metric pdata.Metric) { + metric.SetName("process.fts.cpu.usage") + metric.SetDescription("Full text search CPU") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "process.fts.disk.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.fts.disk") + metric.SetName("process.fts.disk.usage") metric.SetDescription("Full text search disk usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.fts.memory", + "process.fts.memory.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.fts.memory") + metric.SetName("process.fts.memory.usage") metric.SetDescription("Full text search memory usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.global_lock", + "process.global_lock", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.global_lock") + metric.SetName("process.global_lock") metric.SetDescription("Number and status of locks") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.index.btree_miss_ratio", + "process.index.btree_miss_ratio", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.index.btree_miss_ratio") + metric.SetName("process.index.btree_miss_ratio") metric.SetDescription("Index miss ratio") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.index.counters", + "process.index.counters", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.index.counters") + metric.SetName("process.index.counters") metric.SetDescription("Indexes") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.journaling.commits", + "process.journaling.commits", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.journaling.commits") + metric.SetName("process.journaling.commits") metric.SetDescription("Journaling commits") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.journaling.data_files", + "process.journaling.data_files", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.journaling.data_files") + metric.SetName("process.journaling.data_files") metric.SetDescription("Data file sizes") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.journaling.written", + "process.journaling.written", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.journaling.written") + metric.SetName("process.journaling.written") metric.SetDescription("Journals written") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.memory", + "process.memory.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.memory") + metric.SetName("process.memory.usage") metric.SetDescription("Memory Usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.network.io", + "process.network.io", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.network.io") + metric.SetName("process.network.io") metric.SetDescription("Network IO") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.network.requests", + "process.network.requests", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.network.requests") + metric.SetName("process.network.requests") metric.SetDescription("Network requests") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.op_execution_time", - func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.op_execution_time") - metric.SetDescription("Execution time by operation") - metric.SetUnit("1") - metric.SetDataType(pdata.MetricDataTypeGauge) - }, - }, - &metricImpl{ - "mongodb.atlas.operations.rate", + "process.oplog.rate", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.operations.rate") + metric.SetName("process.oplog.rate") metric.SetDescription("Execution rate by operation") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.oplog.rate", + "process.oplog.time", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.oplog.rate") - metric.SetDescription("Oplog rate") + metric.SetName("process.oplog.time") + metric.SetDescription("Execution time by operation") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.oplog.time", + "process.page_faults", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.oplog.time") - metric.SetDescription("Oplog time") + metric.SetName("process.page_faults") + metric.SetDescription("Page faults") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.ops", + "process.restarts", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.ops") - metric.SetDescription("FIXME") + metric.SetName("process.restarts") + metric.SetDescription("Restarts in last hour") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.page_faults", + "process.tickets", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.page_faults") - metric.SetDescription("Page faults") + metric.SetName("process.tickets") + metric.SetDescription("Tickets") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.query_executor.scanned", + "system.cpu.normalized.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.query_executor.scanned") - metric.SetDescription("Scanned objects") + metric.SetName("system.cpu.normalized.usage") + metric.SetDescription("System CPU Normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.query_targeting.scanned_per_returned", + "system.cpu.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.query_targeting.scanned_per_returned") - metric.SetDescription("Scanned objects per returned") + metric.SetName("system.cpu.usage") + metric.SetDescription("System CPU Usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.restarts", + "system.fts.cpu.normalized.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.restarts") - metric.SetDescription("Restarts in last hour") + metric.SetName("system.fts.cpu.normalized.usage") + metric.SetDescription("Full text search disk usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.swap", + "system.fts.cpu.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.swap") - metric.SetDescription("Swap usage") + metric.SetName("system.fts.cpu.usage") + metric.SetDescription("Full-text search") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.swap.io", + "system.fts.disk.utilization", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.swap.io") - metric.SetDescription("Swap IO") + metric.SetName("system.fts.disk.utilization") + metric.SetDescription("Full text search disk usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.system.cpu", + "system.fts.memory.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.system.cpu") - metric.SetDescription("System CPU Usage") + metric.SetName("system.fts.memory.usage") + metric.SetDescription("Full-text search") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.system.memory", + "system.memory.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.system.memory") + metric.SetName("system.memory.usage") metric.SetDescription("System Memory Usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.system.network.io", + "system.network.io", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.system.network.io") + metric.SetName("system.network.io") metric.SetDescription("System Network IO") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.system.normalized.cpu", + "system.paging.io", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.system.normalized.cpu") - metric.SetDescription("System CPU Normalized to pct") + metric.SetName("system.paging.io") + metric.SetDescription("Swap IO") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodb.atlas.tickets", + "system.paging.usage", func(metric pdata.Metric) { - metric.SetName("mongodb.atlas.tickets") - metric.SetDescription("Tickets") + metric.SetName("system.paging.usage") + metric.SetDescription("Swap usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go index 1a5dab9f1fd1..f706c366313d 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go @@ -32,49 +32,49 @@ var metricNameMapping = map[string]metricMappingData{ // MongoDB CPU usage. For hosts with more than one CPU core, these values can exceed 100%. // sfx: process.cpu.user - "PROCESS_CPU_USER": {"process.cpu.utilization", map[string]pdata.AttributeValue{ + "PROCESS_CPU_USER": {"process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_PROCESS_CPU_USER": {"process.cpu.utilization", map[string]pdata.AttributeValue{ + "MAX_PROCESS_CPU_USER": {"process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx:process.cpu.kernel - "PROCESS_CPU_KERNEL": {"process.cpu.utilization", map[string]pdata.AttributeValue{ + "PROCESS_CPU_KERNEL": {"process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_PROCESS_CPU_KERNEL": {"process.cpu.utilization", map[string]pdata.AttributeValue{ + "MAX_PROCESS_CPU_KERNEL": {"process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped - "PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.utilization", map[string]pdata.AttributeValue{ + "PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.utilization", map[string]pdata.AttributeValue{ + "MAX_PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped - "PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.utilization", map[string]pdata.AttributeValue{ + "PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.utilization", map[string]pdata.AttributeValue{ + "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, @@ -82,50 +82,50 @@ var metricNameMapping = map[string]metricMappingData{ // MongoDB CPU usage scaled to a range of 0% to 100%. Atlas computes this value by dividing by the number of CPU cores. // sfx: process.normalized.cpu.children_user - "PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: process.normalized.cpu.children_kernel - "PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: process.normalized.cpu.user - "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.utilization", map[string]pdata.AttributeValue{ + "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // Context: Process // sfx: skipped - "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: process.normalized.cpu.kernel - "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.utilization", map[string]pdata.AttributeValue{ + "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, @@ -255,7 +255,7 @@ var metricNameMapping = map[string]metricMappingData{ "status": pdata.NewAttributeValueString("in_write_lock"), }}, // sfx: skipped - "JOURNALING_MB": {"process.journaling.written", map[string]pdata.AttributeValue{}}, + "JOURNALING_MB": {"process.journaling.written", map[string]pdata.AttributeValue{}}, // sfx: skipped "JOURNALING_WRITE_DATA_FILES_MB": {"process.journaling.data_files", map[string]pdata.AttributeValue{}}, @@ -323,54 +323,54 @@ var metricNameMapping = map[string]metricMappingData{ // Rate of database operations on a MongoDB process since the process last started found in the opcounters document that the serverStatus command collects. // sfx: opcounter.command - "OPCOUNTER_CMD": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_CMD": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("cmd"), "role": pdata.NewAttributeValueString("primary"), }}, // sfx: opcounter.query - "OPCOUNTER_QUERY": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_QUERY": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("query"), "role": pdata.NewAttributeValueString("primary"), }}, // sfx: opcounter.update - "OPCOUNTER_UPDATE": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_UPDATE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("update"), "role": pdata.NewAttributeValueString("primary"), }}, // sfx: opcounter.delete - "OPCOUNTER_DELETE": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_DELETE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("delete"), "role": pdata.NewAttributeValueString("primary"), }}, // sfx: opcounter.getmore - "OPCOUNTER_GETMORE": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_GETMORE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("getmore"), "role": pdata.NewAttributeValueString("primary"), }}, // sfx: opcounter.insert - "OPCOUNTER_INSERT": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_INSERT": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("insert"), "role": pdata.NewAttributeValueString("primary"), }}, // Rate of database operations on MongoDB secondaries found in the opcountersRepl document that the serverStatus command collects. // sfx: opcounter.repl.command - "OPCOUNTER_REPL_CMD": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_REPL_CMD": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("cmd"), "role": pdata.NewAttributeValueString("replica"), }}, // sfx: opcounter.repl.update - "OPCOUNTER_REPL_UPDATE": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_REPL_UPDATE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("update"), "role": pdata.NewAttributeValueString("replica"), }}, // sfx: opcounter.repl.delete - "OPCOUNTER_REPL_DELETE": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_REPL_DELETE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("delete"), "role": pdata.NewAttributeValueString("replica"), }}, // sfx: opcounter.repl.insert - "OPCOUNTER_REPL_INSERT": {"process.db.ops", map[string]pdata.AttributeValue{ + "OPCOUNTER_REPL_INSERT": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("insert"), "role": pdata.NewAttributeValueString("replica"), }}, @@ -401,15 +401,15 @@ var metricNameMapping = map[string]metricMappingData{ // Average execution time in milliseconds per read, write, or command operation during a selected time period. // sfx: skipped - "OP_EXECUTION_TIME_READS": {"process.db.op_execution_time", map[string]pdata.AttributeValue{ + "OP_EXECUTION_TIME_READS": {"process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("reads"), }}, // sfx: skipped - "OP_EXECUTION_TIME_WRITES": {"process.db.op_execution_time", map[string]pdata.AttributeValue{ + "OP_EXECUTION_TIME_WRITES": {"process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("writes"), }}, // sfx: skipped - "OP_EXECUTION_TIME_COMMANDS": {"process.db.op_execution_time", map[string]pdata.AttributeValue{ + "OP_EXECUTION_TIME_COMMANDS": {"process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("commands"), }}, @@ -522,139 +522,139 @@ var metricNameMapping = map[string]metricMappingData{ // CPU usage of processes on the host scaled to a range of 0 to 100% by dividing by the number of CPU cores. // sfx: system.normalized.cpu.user - "SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: system.normalized.cpu.kernel - "SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: system.normalized.cpu.nice - "SYSTEM_NORMALIZED_CPU_NICE": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_NICE": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: system.normalized.cpu.iowait - "SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: system.normalized.cpu.irq - "SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: system.normalized.cpu.softirq - "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: system.normalized.cpu.guest - "SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: system.normalized.cpu.steal - "SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.utilization", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Physical memory usage, in bytes, that the host uses. // sfx: skipped - "SYSTEM_MEMORY_AVAILABLE": {"system.memory", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_AVAILABLE": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("available"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_MEMORY_AVAILABLE": {"system.memory", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_AVAILABLE": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("available"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped - "SYSTEM_MEMORY_BUFFERS": {"system.memory", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_BUFFERS": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("buffers"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_MEMORY_BUFFERS": {"system.memory", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_BUFFERS": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("buffers"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped - "SYSTEM_MEMORY_CACHED": {"system.memory", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_CACHED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("cached"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_MEMORY_CACHED": {"system.memory", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_CACHED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("cached"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped - "SYSTEM_MEMORY_FREE": {"system.memory", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_FREE": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_MEMORY_FREE": {"system.memory", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_FREE": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped - "SYSTEM_MEMORY_SHARED": {"system.memory", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_SHARED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("shared"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_MEMORY_SHARED": {"system.memory", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_SHARED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("shared"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped - "SYSTEM_MEMORY_USED": {"system.memory", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_USED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped - "MAX_SYSTEM_MEMORY_USED": {"system.memory", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_USED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, @@ -741,7 +741,7 @@ var metricNameMapping = map[string]metricMappingData{ // Disk space, in bytes, that Atlas Search indexes use. // sfx: skipped - "FTS_DISK_UTILIZATION": {"system.fts.disk.usage", map[string]pdata.AttributeValue{ + "FTS_DISK_UTILIZATION": {"system.fts.disk.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), }}, @@ -768,37 +768,37 @@ var metricNameMapping = map[string]metricMappingData{ // Measures throughput of I/O operations for the disk partition used for MongoDB. // sfx: skipped "DISK_PARTITION_IOPS_READ": {"disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read"), + "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_IOPS_READ": {"disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read"), + "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped "DISK_PARTITION_IOPS_WRITE": {"disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("write"), + "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_IOPS_WRITE": {"disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("write"), + "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped "DISK_PARTITION_IOPS_TOTAL": {"disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("total"), + "direction": pdata.NewAttributeValueString("total"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_IOPS_TOTAL": {"disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("total"), + "direction": pdata.NewAttributeValueString("total"), "aggregation": pdata.NewAttributeValueString("max"), }}, @@ -816,71 +816,71 @@ var metricNameMapping = map[string]metricMappingData{ // This includes requests from any process, not just MongoDB processes. // sfx: skipped "DISK_PARTITION_LATENCY_READ": {"disk.partition.latency", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read"), + "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_LATENCY_READ": {"disk.partition.latency", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read"), + "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped "DISK_PARTITION_LATENCY_WRITE": {"disk.partition.latency", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("write"), + "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_LATENCY_WRITE": {"disk.partition.latency", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("write"), + "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Measures latency per operation type of the disk partition used by MongoDB. // sfx: skipped "DISK_PARTITION_SPACE_FREE": {"disk.partition.space", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), + "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_SPACE_FREE": {"disk.partition.space", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), + "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped "DISK_PARTITION_SPACE_USED": {"disk.partition.space", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), + "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_SPACE_USED": {"disk.partition.space", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), + "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped "DISK_PARTITION_SPACE_PERCENT_FREE": {"disk.partition.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), + "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"disk.partition.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), + "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, // sfx: skipped "DISK_PARTITION_SPACE_PERCENT_USED": {"disk.partition.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), + "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // sfx: skipped "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"disk.partition.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), + "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, diff --git a/receiver/mongodbatlasreceiver/metadata.yaml b/receiver/mongodbatlasreceiver/metadata.yaml index f40e52b53bb4..767682869f07 100644 --- a/receiver/mongodbatlasreceiver/metadata.yaml +++ b/receiver/mongodbatlasreceiver/metadata.yaml @@ -1,209 +1,254 @@ name: mongoatlasreceiver metrics: - mongodb.atlas.asserts: + process.asserts: description: Number of assertions unit: 1 data: type: gauge - mongodb.atlas.background_flush: + process.background_flush: description: Amount of data flushed in the background unit: 1 data: type: gauge - mongodb.atlas.cache.io: + process.cache.io: description: Cache throughput unit: 1 data: type: gauge - mongodb.atlas.cache.size: + process.cache.size: description: Cache sizes unit: 1 data: type: gauge - mongodb.atlas.connections: + process.connections: description: Number of current connections unit: 1 data: type: gauge - mongodb.atlas.cpu: + process.cpu.usage: description: CPU Usage unit: 1 data: type: gauge - mongodb.atlas.cpu.children: + process.cpu.children.usage: description: CPU Usage for child processes unit: 1 data: type: gauge - mongodb.atlas.cpu.children.normalized: + process.cpu.children.normalized.usage: description: CPU Usage for child processes, normalized to pct unit: 1 data: type: gauge - mongodb.atlas.cpu.normalized: + process.cpu.normalized.usage: description: CPU Usage, normalized to pct unit: 1 data: type: gauge - mongodb.atlas.cursors: + process.cursors: description: Number of cursors unit: 1 data: type: gauge - mongodb.atlas.db.storage: + process.db.storage: description: FIXME unit: 1 data: type: gauge - mongodb.atlas.document.rate: + process.db.document.rate: # TODO: I'm not sure this one is right description: Document access rates unit: 1 data: type: gauge - mongodb.atlas.fts.cpu: + process.fts.cpu.usage: description: Full text search CPU unit: 1 data: type: gauge - mongodb.atlas.fts.cpu.normalized: + process.fts.cpu.normalized.usage: description: Full text search CPU, normalized to pct unit: 1 data: type: gauge - mongodb.atlas.fts.disk: + process.fts.disk.usage: description: Full text search disk usage unit: 1 data: type: gauge - mongodb.atlas.fts.memory: + process.fts.memory.usage: description: Full text search memory usage unit: 1 data: type: gauge - mongodb.atlas.global_lock: + process.global_lock: description: Number and status of locks unit: 1 data: type: gauge - mongodb.atlas.index.btree_miss_ratio: + process.index.btree_miss_ratio: description: Index miss ratio unit: 1 data: type: gauge - mongodb.atlas.index.counters: + process.index.counters: description: Indexes unit: 1 data: type: gauge - mongodb.atlas.journaling.commits: + process.journaling.commits: description: Journaling commits unit: 1 data: type: gauge - mongodb.atlas.journaling.data_files: + process.journaling.data_files: description: Data file sizes unit: 1 data: type: gauge - mongodb.atlas.journaling.written: + process.journaling.written: description: Journals written unit: 1 data: type: gauge - mongodb.atlas.memory: + process.memory.usage: description: Memory Usage unit: 1 data: type: gauge - mongodb.atlas.network.io: + process.network.io: description: Network IO unit: 1 data: type: gauge - mongodb.atlas.network.requests: + process.network.requests: description: Network requests unit: 1 data: type: gauge - mongodb.atlas.op_execution_time: + process.oplog.time: description: Execution time by operation unit: 1 data: type: gauge - mongodb.atlas.operations.rate: + process.oplog.rate: description: Execution rate by operation unit: 1 data: type: gauge - mongodb.atlas.oplog.rate: - description: Oplog rate - unit: 1 - data: - type: gauge - mongodb.atlas.oplog.time: - description: Oplog time + process.db.operations.rate: + description: FIXME unit: 1 data: type: gauge - mongodb.atlas.ops: + process.db.operations.time: description: FIXME unit: 1 data: type: gauge - mongodb.atlas.page_faults: + process.page_faults: description: Page faults unit: 1 data: type: gauge - mongodb.atlas.query_executor.scanned: + process.db.query_executor.scanned: description: Scanned objects unit: 1 data: type: gauge - mongodb.atlas.query_targeting.scanned_per_returned: + process.db.query_targeting.scanned_per_returned: description: Scanned objects per returned unit: 1 data: type: gauge - mongodb.atlas.restarts: + process.restarts: description: Restarts in last hour unit: 1 data: type: gauge - mongodb.atlas.swap: + system.paging.usage: description: Swap usage unit: 1 data: type: gauge - mongodb.atlas.swap.io: + system.paging.io: description: Swap IO unit: 1 data: type: gauge - mongodb.atlas.system.cpu: + system.cpu.usage: description: System CPU Usage unit: 1 data: type: gauge - mongodb.atlas.system.memory: + system.memory.usage: description: System Memory Usage unit: 1 data: type: gauge - mongodb.atlas.system.network.io: + system.network.io: description: System Network IO unit: 1 data: type: gauge - mongodb.atlas.system.normalized.cpu: + system.cpu.normalized.usage: description: System CPU Normalized to pct unit: 1 data: type: gauge - mongodb.atlas.tickets: + process.tickets: description: Tickets unit: 1 data: type: gauge + disk.partition.iops: + description: Disk partition iops + unit: 1 + data: + type: gauge + disk.partition.utilization: + description: Disk partition utilization + unit: 1 + data: + type: gauge + disk.partition.latency: + description: Disk partition latency + unit: 1 + data: + type: gauge + disk.partition.space: + description: Disk partition space + unit: 1 + data: + type: gauge + db.size: + description: Database feature size + unit: 1 + data: + type: gauge + db.counts: + description: Database feature size + unit: 1 + data: + type: gauge + system.fts.memory.usage: + description: Full-text search + unit: 1 + data: + type: gauge + system.fts.disk.utilization: + description: Full text search disk usage + unit: 1 + data: + type: gauge + system.fts.cpu.usage: + description: Full-text search + unit: 1 + data: + type: gauge + system.fts.cpu.normalized.usage: + description: Full text search disk usage + unit: 1 + data: + type: gauge From 27981f80c159ae607e56be9d44c8927bd49e5b21 Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Tue, 5 Oct 2021 09:15:43 -0700 Subject: [PATCH 05/13] start using multierror --- receiver/mongodbatlasreceiver/go.mod | 2 ++ receiver/mongodbatlasreceiver/go.sum | 2 ++ .../mongodbatlasreceiver/internal/metric_conversion.go | 7 +++++-- .../mongodbatlasreceiver/internal/mongodb_atlas_client.go | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/receiver/mongodbatlasreceiver/go.mod b/receiver/mongodbatlasreceiver/go.mod index 75d135540954..7a591d3d9c41 100644 --- a/receiver/mongodbatlasreceiver/go.mod +++ b/receiver/mongodbatlasreceiver/go.mod @@ -3,6 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongod go 1.17 require ( + github.com/hashicorp/go-multierror v1.0.0 github.com/mongodb-forks/digest v1.0.3 github.com/pkg/errors v0.9.1 go.mongodb.org/atlas v0.13.0 @@ -15,6 +16,7 @@ require ( github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect github.com/knadh/koanf v1.3.2 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect diff --git a/receiver/mongodbatlasreceiver/go.sum b/receiver/mongodbatlasreceiver/go.sum index ffb9003320f4..1adfc104b67e 100644 --- a/receiver/mongodbatlasreceiver/go.sum +++ b/receiver/mongodbatlasreceiver/go.sum @@ -202,6 +202,7 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -209,6 +210,7 @@ github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9 github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= diff --git a/receiver/mongodbatlasreceiver/internal/metric_conversion.go b/receiver/mongodbatlasreceiver/internal/metric_conversion.go index 84391e0f4411..b2f74b3ae6c1 100644 --- a/receiver/mongodbatlasreceiver/internal/metric_conversion.go +++ b/receiver/mongodbatlasreceiver/internal/metric_conversion.go @@ -15,16 +15,19 @@ package internal import ( + "errors" + "go.mongodb.org/atlas/mongodbatlas" "go.opentelemetry.io/collector/model/pdata" + "github.com/hashicorp/go-multierror" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/internal/metadata" ) func processMeasurements( resource pdata.Resource, measurements []*mongodbatlas.Measurements, -) (pdata.Metrics, []error) { +) (pdata.Metrics, error) { allErrors := make([]error, 0) metricSlice := pdata.NewMetrics() rm := metricSlice.ResourceMetrics().AppendEmpty() @@ -41,5 +44,5 @@ func processMeasurements( } } } - return metricSlice, allErrors + return metricSlice, multierror.Append(errors.New("errors occurred while processing measurements"), allErrors...) } diff --git a/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go b/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go index 7551f32adfbb..d2dc479ae4c5 100644 --- a/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go +++ b/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go @@ -16,6 +16,7 @@ package internal import ( "context" + "fmt" "github.com/mongodb-forks/digest" "github.com/pkg/errors" From 3042d6ea158c39c94f786ab87e36769e88af7dcc Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Thu, 21 Oct 2021 11:58:13 -0700 Subject: [PATCH 06/13] fix error handling with scraper, align metrics --- go.mod | 5 ++ go.sum | 4 ++ .../internal/metadata/metric_name_mapping.go | 49 ++++++++++++++----- .../metadata/metric_name_mapping_test.go | 14 ++++++ .../internal/metric_conversion.go | 7 ++- .../internal/mongodb_atlas_client.go | 3 +- receiver/mongodbatlasreceiver/receiver.go | 8 --- 7 files changed, 65 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index 44c23d7ac4c5..e4bbce3cf97e 100644 --- a/go.mod +++ b/go.mod @@ -220,9 +220,11 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/consul/api v1.10.1 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v0.16.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-multierror v1.1.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect @@ -273,6 +275,7 @@ require ( github.com/moby/sys/mountinfo v0.4.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mongodb-forks/digest v1.0.3 // indirect github.com/mostynb/go-grpc-compression v1.1.14 // indirect github.com/mrunalp/fileutils v0.5.0 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect @@ -307,6 +310,7 @@ require ( github.com/opencontainers/runc v1.0.2 // indirect github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect github.com/opencontainers/selinux v1.8.2 // indirect + github.com/openlyinc/pointy v1.1.2 // indirect github.com/openshift/api v0.0.0-20210521075222-e273a339932a // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect @@ -369,6 +373,7 @@ require ( go.elastic.co/apm v1.14.0 // indirect go.elastic.co/fastjson v1.1.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect + go.mongodb.org/atlas v0.13.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/collector/model v0.38.1-0.20211112010215-bcb90636ae66 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.26.1 // indirect diff --git a/go.sum b/go.sum index 6109732a68c3..e2decb0a0967 100644 --- a/go.sum +++ b/go.sum @@ -829,6 +829,7 @@ github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= @@ -1491,6 +1492,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mongodb-forks/digest v1.0.3 h1:ZUK1vyZnBiRMvET0O1SzmnBmv935CkcOTjhfR4zIQ2s= github.com/mongodb-forks/digest v1.0.3/go.mod h1:eHRfgovT+dvSFfltrOa27hy1oR/rcwyDdp5H1ZQxEMA= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= @@ -1616,6 +1618,7 @@ github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqi github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opencontainers/selinux v1.8.2 h1:c4ca10UMgRcvZ6h0K4HtS15UaVSBEaE+iln2LVpAuGc= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/openlyinc/pointy v1.1.2 h1:LywVV2BWC5Sp5v7FoP4bUD+2Yn5k0VNeRbU5vq9jUMY= github.com/openlyinc/pointy v1.1.2/go.mod h1:w2Sytx+0FVuMKn37xpXIAyBNhFNBIJGR/v2m7ik1WtM= github.com/openshift/api v0.0.0-20210521075222-e273a339932a h1:aBPwLqCg66SbQd+HrjB1GhgTfPtqSY4aeB022tEYmE0= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= @@ -2095,6 +2098,7 @@ go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQc go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.mongodb.org/atlas v0.13.0 h1:JkJOWsKm9k2mcFaivaaMNDpKDsxJJj1O0eUsDtnNvuE= go.mongodb.org/atlas v0.13.0/go.mod h1:wVCnHcm/7/IfTjEB6K8K35PLG70yGz8BdkRwX0oK9/M= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go index f706c366313d..4d28fa396d1c 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go @@ -320,6 +320,12 @@ var metricNameMapping = map[string]metricMappingData{ "DB_DATA_SIZE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("data_size_total"), }}, + "DB_INDEX_SIZE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("index_size_total"), + }}, + "DB_DATA_SIZE_TOTAL_WO_SYSTEM": {"process.db.storage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("data_size_total_wo_system"), + }}, // Rate of database operations on a MongoDB process since the process last started found in the opcounters document that the serverStatus command collects. // sfx: opcounter.command @@ -469,6 +475,10 @@ var metricNameMapping = map[string]metricMappingData{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("avg"), }}, + "MAX_SYSTEM_CPU_NICE": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("nice"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, // sfx: system.cpu.iowait "SYSTEM_CPU_IOWAIT": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), @@ -531,6 +541,10 @@ var metricNameMapping = map[string]metricMappingData{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, + "MAX_SYSTEM_NORMALIZED_CPU_NICE": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "status": pdata.NewAttributeValueString("nice"), + "aggregation": pdata.NewAttributeValueString("max"), + }}, // sfx: system.normalized.cpu.kernel "SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), @@ -727,13 +741,16 @@ var metricNameMapping = map[string]metricMappingData{ // Memory usage, in bytes, that Atlas Search processes use. // sfx: skipped - "FTS_MEMORY_RESIDENT": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_RESIDENT_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("resident"), }}, // sfx: skipped - "FTS_MEMORY_VIRTUAL": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_VIRTUAL_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("virtual"), }}, + "FTS_PROCESS_SHARED_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "state": pdata.NewAttributeValueString("shared"), + }}, // sfx: skipped "FTS_MEMORY_MAPPED": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("mapped"), @@ -741,7 +758,7 @@ var metricNameMapping = map[string]metricMappingData{ // Disk space, in bytes, that Atlas Search indexes use. // sfx: skipped - "FTS_DISK_UTILIZATION": {"system.fts.disk.utilization", map[string]pdata.AttributeValue{ + "FTS_DISK_USAGE": {"system.fts.disk.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), }}, @@ -755,11 +772,11 @@ var metricNameMapping = map[string]metricMappingData{ "status": pdata.NewAttributeValueString("kernel"), }}, // sfx: skipped - "FTS_PROCESS_NORMAILIZED_CPU_USER": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_NORMALIZED_CPU_USER": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), }}, // sfx: skipped - "FTS_PROCESS_NORMAILIZED_CPU_KERNEL": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_NORMALIZED_CPU_KERNEL": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), }}, @@ -910,15 +927,15 @@ var metricNameMapping = map[string]metricMappingData{ "type": pdata.NewAttributeValueString("object"), }}, // sfx: skipped - "DATABASE_AVERAGE_STORAGE_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "DATABASE_STORAGE_SIZE": {"db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("storage"), }}, // sfx: skipped - "DATABASE_AVERAGE_INDEX_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "DATABASE_INDEX_SIZE": {"db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index"), }}, // sfx: skipped - "DATABASE_AVERAGE_DATA_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "DATABASE_DATA_SIZE": {"db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("data"), }}, } @@ -971,10 +988,16 @@ func MeasurementsToMetric(meas *mongodbatlas.Measurements, buildUnrecognized boo switch m.DataType() { case pdata.MetricDataTypeGauge: datapoints := m.Gauge().DataPoints() - addDataPoints(datapoints, meas, attrs) + err := addDataPoints(datapoints, meas, attrs) + if err != nil { + return nil, err + } case pdata.MetricDataTypeSum: datapoints := m.Sum().DataPoints() - addDataPoints(datapoints, meas, attrs) + err := addDataPoints(datapoints, meas, attrs) + if err != nil { + return nil, err + } default: return nil, fmt.Errorf("unrecognized data type for metric '%s'", meas.Name) } @@ -982,14 +1005,13 @@ func MeasurementsToMetric(meas *mongodbatlas.Measurements, buildUnrecognized boo return &m, nil } -func addDataPoints(datapoints pdata.NumberDataPointSlice, meas *mongodbatlas.Measurements, attrs map[string]pdata.AttributeValue) { +func addDataPoints(datapoints pdata.NumberDataPointSlice, meas *mongodbatlas.Measurements, attrs map[string]pdata.AttributeValue) error { for _, point := range meas.DataPoints { if point.Value != nil { dp := datapoints.AppendEmpty() curTime, err := time.Parse(time.RFC3339, point.Timestamp) - // FIXME: handle this error if err != nil { - break + return err } for k, v := range attrs { dp.Attributes().Upsert(k, v) @@ -998,4 +1020,5 @@ func addDataPoints(datapoints pdata.NumberDataPointSlice, meas *mongodbatlas.Mea dp.SetDoubleVal(float64(*point.Value)) } } + return nil } diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping_test.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping_test.go index e3bdad3fceba..98083c0d4c0d 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping_test.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package metadata import ( diff --git a/receiver/mongodbatlasreceiver/internal/metric_conversion.go b/receiver/mongodbatlasreceiver/internal/metric_conversion.go index b2f74b3ae6c1..f9286785426c 100644 --- a/receiver/mongodbatlasreceiver/internal/metric_conversion.go +++ b/receiver/mongodbatlasreceiver/internal/metric_conversion.go @@ -17,10 +17,10 @@ package internal import ( "errors" + "github.com/hashicorp/go-multierror" "go.mongodb.org/atlas/mongodbatlas" "go.opentelemetry.io/collector/model/pdata" - "github.com/hashicorp/go-multierror" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/internal/metadata" ) @@ -44,5 +44,8 @@ func processMeasurements( } } } - return metricSlice, multierror.Append(errors.New("errors occurred while processing measurements"), allErrors...) + if len(allErrors) > 0 { + return metricSlice, multierror.Append(errors.New("errors occurred while processing measurements"), allErrors...) + } + return metricSlice, nil } diff --git a/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go b/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go index d2dc479ae4c5..e5aa2e7fc23c 100644 --- a/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go +++ b/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go @@ -21,9 +21,8 @@ import ( "github.com/mongodb-forks/digest" "github.com/pkg/errors" "go.mongodb.org/atlas/mongodbatlas" - "go.uber.org/zap" - "go.opentelemetry.io/collector/model/pdata" + "go.uber.org/zap" ) // MongoDBAtlasClient wraps the official MongoDB Atlas client to manage pagination diff --git a/receiver/mongodbatlasreceiver/receiver.go b/receiver/mongodbatlasreceiver/receiver.go index 3a011449afa7..1b4a32e2d8bb 100644 --- a/receiver/mongodbatlasreceiver/receiver.go +++ b/receiver/mongodbatlasreceiver/receiver.go @@ -20,14 +20,6 @@ import ( "time" "github.com/pkg/errors" -<<<<<<< HEAD -<<<<<<< HEAD -======= - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/consumer" ->>>>>>> 8bdb6c4d9 (poll should return an error, not log) -======= ->>>>>>> d09dc6781 (changes to work with scraperhelper) "go.opentelemetry.io/collector/model/pdata" "go.opentelemetry.io/collector/receiver/scraperhelper" "go.uber.org/zap" From 58686b4ed878bfd7c542a2cb9846afe91575baca Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Mon, 25 Oct 2021 16:58:43 -0700 Subject: [PATCH 07/13] break up poll function --- receiver/mongodbatlasreceiver/receiver.go | 219 +++++++++++++++------- 1 file changed, 151 insertions(+), 68 deletions(-) diff --git a/receiver/mongodbatlasreceiver/receiver.go b/receiver/mongodbatlasreceiver/receiver.go index 1b4a32e2d8bb..82c9069de5f8 100644 --- a/receiver/mongodbatlasreceiver/receiver.go +++ b/receiver/mongodbatlasreceiver/receiver.go @@ -20,6 +20,7 @@ import ( "time" "github.com/pkg/errors" + "go.mongodb.org/atlas/mongodbatlas" "go.opentelemetry.io/collector/model/pdata" "go.opentelemetry.io/collector/receiver/scraperhelper" "go.uber.org/zap" @@ -34,6 +35,12 @@ type receiver struct { lastRun time.Time } +type timeconstraints struct { + start string + end string + resolution string +} + func newMongoDBAtlasScraper(log *zap.Logger, cfg *Config) (scraperhelper.Scraper, error) { client, err := internal.NewMongoDBAtlasClient(cfg.PublicKey, cfg.PrivateKey, log) if err != nil { @@ -51,7 +58,12 @@ func (s *receiver) scrape(ctx context.Context) (pdata.Metrics, error) { start = time.Now().Add(s.cfg.CollectionInterval * -1) } now := time.Now() - metrics, err := s.poll(ctx, start.UTC().Format(time.RFC3339), now.UTC().Format(time.RFC3339), s.cfg.Granularity) + timeConstraints := timeconstraints{ + start.UTC().Format(time.RFC3339), + now.UTC().Format(time.RFC3339), + s.cfg.Granularity, + } + metrics, err := s.poll(ctx, timeConstraints) if err != nil { return pdata.Metrics{}, err } @@ -59,7 +71,7 @@ func (s *receiver) scrape(ctx context.Context) (pdata.Metrics, error) { return metrics, nil } -func (s *receiver) poll(ctx context.Context, start string, end string, resolution string) (pdata.Metrics, error) { +func (s *receiver) poll(ctx context.Context, time timeconstraints) (pdata.Metrics, error) { resourceAttributes := pdata.NewAttributeMap() allMetrics := pdata.NewMetrics() orgs, err := s.client.Organizations(ctx) @@ -83,78 +95,149 @@ func (s *receiver) poll(ctx context.Context, start string, end string, resolutio resourceAttributes.CopyTo(resource.Attributes()) resource.Attributes().InsertString("host.name", process.Hostname) resource.Attributes().InsertString("process.port", strconv.Itoa(process.Port)) - // This receiver will support both logs and metrics- if one pipeline - // or the other is not configured, it will be nil. - metrics, err := - s.client.ProcessMetrics( - ctx, - resource, - project.ID, - process.Hostname, - process.Port, - start, - end, - resolution, - ) - if err != nil { - return pdata.Metrics{}, errors.Wrap(err, "error when polling process metrics from MongoDB Atlas") - } - metrics.ResourceMetrics().MoveAndAppendTo(allMetrics.ResourceMetrics()) - - processDatabases, err := s.client.ProcessDatabases( + resourceMetrics, err := s.extractProcessMetrics( ctx, - project.ID, - process.Hostname, - process.Port, + time, + project, + process, + resource, ) if err != nil { - return pdata.Metrics{}, errors.Wrap(err, "error retrieving process databases") - } - - for _, db := range processDatabases { - dbResource := pdata.NewResource() - resource.CopyTo(dbResource) - resource.Attributes(). - InsertString("mongodb.atlas.database_name", db.DatabaseName) - metrics, err := s.client.ProcessDatabaseMetrics( - ctx, - resource, - project.ID, - process.Hostname, - process.Port, - db.DatabaseName, - start, - end, - resolution, - ) - if err != nil { - return pdata.Metrics{}, errors.Wrap(err, "error when polling database metrics from MongoDB Atlas") - } - metrics.ResourceMetrics().MoveAndAppendTo(allMetrics.ResourceMetrics()) - } - for _, disk := range s.client.ProcessDisks(ctx, project.ID, process.Hostname, process.Port) { - diskResource := pdata.NewResource() - resource.CopyTo(diskResource) - diskResource.Attributes(). - InsertString("mongodb.atlas.partition", disk.PartitionName) - metrics, err := s.client.ProcessDiskMetrics( - ctx, - diskResource, - project.ID, - process.Hostname, - process.Port, - disk.PartitionName, - start, - end, - resolution, - ) - if err != nil { - return pdata.Metrics{}, errors.Wrap(err, "error when polling from MongoDB Atlas") - } - metrics.ResourceMetrics().MoveAndAppendTo(allMetrics.ResourceMetrics()) + return pdata.Metrics{}, err } + resourceMetrics.MoveAndAppendTo(allMetrics.ResourceMetrics()) } } } return allMetrics, nil } + +func (s *receiver) extractProcessMetrics( + ctx context.Context, + time timeconstraints, + project *mongodbatlas.Project, + process *mongodbatlas.Process, + resource pdata.Resource, +) (pdata.ResourceMetricsSlice, error) { + processMetrics := pdata.NewResourceMetricsSlice() + // This receiver will support both logs and metrics- if one pipeline + // or the other is not configured, it will be nil. + metrics, err := + s.client.ProcessMetrics( + ctx, + resource, + project.ID, + process.Hostname, + process.Port, + time.start, + time.end, + time.resolution, + ) + if err != nil { + return pdata.ResourceMetricsSlice{}, errors.Wrap( + err, + "error when polling process metrics from MongoDB Atlas", + ) + } + metrics.ResourceMetrics().MoveAndAppendTo(processMetrics) + + databaseMetrics, err := s.extractProcessDatabaseMetrics(ctx, time, project, process, resource) + if err != nil { + return pdata.ResourceMetricsSlice{}, errors.Wrap( + err, + "error when polling process database metrics from MongoDB Atlas", + ) + } + databaseMetrics.MoveAndAppendTo(processMetrics) + + diskMetrics, err := s.extractProcessDiskMetrics(ctx, time, project, process, resource) + if err != nil { + return pdata.ResourceMetricsSlice{}, errors.Wrap( + err, + "error when polling process disk metrics from MongoDB Atlas", + ) + } + diskMetrics.MoveAndAppendTo(processMetrics) + + return processMetrics, nil +} + +func (s *receiver) extractProcessDatabaseMetrics( + ctx context.Context, + time timeconstraints, + project *mongodbatlas.Project, + process *mongodbatlas.Process, + resource pdata.Resource, +) (pdata.ResourceMetricsSlice, error) { + pdMetrics := pdata.NewResourceMetricsSlice() + processDatabases, err := s.client.ProcessDatabases( + ctx, + project.ID, + process.Hostname, + process.Port, + ) + if err != nil { + return pdata.ResourceMetricsSlice{}, errors.Wrap(err, "error retrieving process databases") + } + + for _, db := range processDatabases { + dbResource := pdata.NewResource() + resource.CopyTo(dbResource) + resource.Attributes(). + InsertString("mongodb.atlas.database_name", db.DatabaseName) + metrics, err := s.client.ProcessDatabaseMetrics( + ctx, + resource, + project.ID, + process.Hostname, + process.Port, + db.DatabaseName, + time.start, + time.end, + time.resolution, + ) + if err != nil { + return pdata.ResourceMetricsSlice{}, errors.Wrap( + err, + "error when polling database metrics from MongoDB Atlas", + ) + } + metrics.ResourceMetrics().MoveAndAppendTo(pdMetrics) + } + return pdMetrics, nil +} + +func (s *receiver) extractProcessDiskMetrics( + ctx context.Context, + time timeconstraints, + project *mongodbatlas.Project, + process *mongodbatlas.Process, + resource pdata.Resource, +) (pdata.ResourceMetricsSlice, error) { + pdMetrics := pdata.NewResourceMetricsSlice() + for _, disk := range s.client.ProcessDisks(ctx, project.ID, process.Hostname, process.Port) { + diskResource := pdata.NewResource() + resource.CopyTo(diskResource) + diskResource.Attributes(). + InsertString("mongodb.atlas.partition", disk.PartitionName) + metrics, err := s.client.ProcessDiskMetrics( + ctx, + diskResource, + project.ID, + process.Hostname, + process.Port, + disk.PartitionName, + time.start, + time.end, + time.resolution, + ) + if err != nil { + return pdata.ResourceMetricsSlice{}, errors.Wrap( + err, + "error when polling from MongoDB Atlas", + ) + } + metrics.ResourceMetrics().MoveAndAppendTo(pdMetrics) + } + return pdMetrics, nil +} From 6f8de18a8284aaae9e4881847cf3e7b8ffb16691 Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Mon, 25 Oct 2021 16:58:12 -0700 Subject: [PATCH 08/13] remove sfx annotation comments --- .../internal/metadata/metric_name_mapping.go | 172 +----------------- 1 file changed, 1 insertion(+), 171 deletions(-) diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go index 4d28fa396d1c..9dd4267c9242 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go @@ -31,49 +31,41 @@ type metricMappingData struct { var metricNameMapping = map[string]metricMappingData{ // MongoDB CPU usage. For hosts with more than one CPU core, these values can exceed 100%. - // sfx: process.cpu.user "PROCESS_CPU_USER": {"process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_PROCESS_CPU_USER": {"process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx:process.cpu.kernel "PROCESS_CPU_KERNEL": {"process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_PROCESS_CPU_KERNEL": {"process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), @@ -81,50 +73,42 @@ var metricNameMapping = map[string]metricMappingData{ // MongoDB CPU usage scaled to a range of 0% to 100%. Atlas computes this value by dividing by the number of CPU cores. - // sfx: process.normalized.cpu.children_user "PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: process.normalized.cpu.children_kernel "PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: process.normalized.cpu.user "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // Context: Process - // sfx: skipped "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: process.normalized.cpu.kernel "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), @@ -132,191 +116,151 @@ var metricNameMapping = map[string]metricMappingData{ // Rate of asserts for a MongoDB process found in the asserts document that the serverStatus command generates. - // sfx: asserts.regular "ASSERT_REGULAR": {"process.asserts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("regular"), }}, - // sfx: asserts.warning "ASSERT_WARNING": {"process.asserts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("warning"), }}, - // sfx: asserts.msg "ASSERT_MSG": {"process.asserts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("msg"), }}, - // sfx: asserts.user "ASSERT_USER": {"process.asserts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("user"), }}, // Amount of data flushed in the background. - // sfx: background_flush_avg "BACKGROUND_FLUSH_AVG": {"process.background_flush", map[string]pdata.AttributeValue{}}, // Amount of bytes in the WiredTiger storage engine cache and tickets found in the wiredTiger.cache and wiredTiger.concurrentTransactions documents that the serverStatus command generates. - // sfx: cache.bytes.read_into "CACHE_BYTES_READ_INTO": {"process.cache.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read_into"), }}, - // sfx: cache.bytes.written_from "CACHE_BYTES_WRITTEN_FROM": {"process.cache.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("written_from"), }}, - // sfx: cache.dirty_bytes "CACHE_DIRTY_BYTES": {"process.cache.size", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("dirty"), }}, - // sfx: cache.used_bytes "CACHE_USED_BYTES": {"process.cache.size", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), }}, - // sfx: tickets.available.reads "TICKETS_AVAILABLE_READS": {"process.tickets", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("available_reads"), }}, - // sfx: tickets.available.writes "TICKETS_AVAILABLE_WRITE": {"process.tickets", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("available_writes"), }}, // Number of connections to a MongoDB process found in the connections document that the serverStatus command generates. - // sfx: connections.current "CONNECTIONS": {"process.connections", map[string]pdata.AttributeValue{}}, // Number of cursors for a MongoDB process found in the metrics.cursor document that the serverStatus command generates. - // sfx: cursors.total_open "CURSORS_TOTAL_OPEN": {"process.cursors", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("open"), }}, - // sfx: cursors.timed_out "CURSORS_TOTAL_TIMED_OUT": {"process.cursors", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("timed_out"), }}, // Numbers of Memory Issues and Page Faults for a MongoDB process. - // sfx: extra_info.page_faults "EXTRA_INFO_PAGE_FAULTS": {"process.page_faults", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("extra_info"), }}, - // sfx: skipped "GLOBAL_ACCESSES_NOT_IN_MEMORY": {"process.page_faults", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("global_accesses_not_in_memory"), }}, - // sfx: skipped "GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN": {"process.page_faults", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("exceptions_thrown"), }}, // Number of operations waiting on locks for the MongoDB process that the serverStatus command generates. Cloud Manager computes these values based on the type of storage engine. - // sfx: global_lock.current_queue.total "GLOBAL_LOCK_CURRENT_QUEUE_TOTAL": {"process.global_lock", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("current_queue_total"), }}, - // sfx: global_lock.current_queue.readers "GLOBAL_LOCK_CURRENT_QUEUE_READERS": {"process.global_lock", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("current_queue_readers"), }}, - // sfx: global_lock.current_queue.writers "GLOBAL_LOCK_CURRENT_QUEUE_WRITERS": {"process.global_lock", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("current_queue_writers"), }}, // Number of index btree operations. - // sfx: skipped "INDEX_COUNTERS_BTREE_ACCESSES": {"process.index.counters", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("btree_accesses"), }}, - // sfx: skipped "INDEX_COUNTERS_BTREE_HITS": {"process.index.counters", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("btree_hits"), }}, - // sfx: skipped "INDEX_COUNTERS_BTREE_MISSES": {"process.index.counters", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("btree_misses"), }}, - // sfx: skipped "INDEX_COUNTERS_BTREE_MISS_RATIO": {"process.index.btree_miss_ratio", map[string]pdata.AttributeValue{}}, // Number of journaling operations. - // sfx: skipped "JOURNALING_COMMITS_IN_WRITE_LOCK": {"process.journaling.commits", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("in_write_lock"), }}, - // sfx: skipped - "JOURNALING_MB": {"process.journaling.written", map[string]pdata.AttributeValue{}}, - // sfx: skipped + "JOURNALING_MB": {"process.journaling.written", map[string]pdata.AttributeValue{}}, "JOURNALING_WRITE_DATA_FILES_MB": {"process.journaling.data_files", map[string]pdata.AttributeValue{}}, // Amount of memory for a MongoDB process found in the mem document that the serverStatus command collects. - // sfx: mem.resident "MEMORY_RESIDENT": {"process.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("resident"), }}, - // sfx: mem.virtual "MEMORY_VIRTUAL": {"process.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("virtual"), }}, - // sfx: mem.mapped "MEMORY_MAPPED": {"process.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("mapped"), }}, - // sfx: skipped "COMPUTED_MEMORY": {"process.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("computed"), }}, // Amount of throughput for MongoDB process found in the network document that the serverStatus command collects. - // sfx: network.bytes_in "NETWORK_BYTES_IN": {"process.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("receive"), }}, - // sfx: network.bytes_out "NETWORK_BYTES_OUT": {"process.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("transmit"), }}, - // sfx: network.num_requests "NETWORK_NUM_REQUESTS": {"process.network.requests", map[string]pdata.AttributeValue{}}, // Durations and throughput of the MongoDB process' oplog. - // sfx: oplog.slave.lag_master_time "OPLOG_SLAVE_LAG_MASTER_TIME": {"process.oplog.time", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("slave_lag_master_time"), }}, - // sfx: oplog.master.time "OPLOG_MASTER_TIME": {"process.oplog.time", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("master_time"), }}, - // sfx: oplog.master.lag_time_diff "OPLOG_MASTER_LAG_TIME_DIFF": {"process.oplog.time", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("master_lag_time_diff"), }}, - // sfx: skipped "OPLOG_RATE_GB_PER_HOUR": {"process.oplog.rate", map[string]pdata.AttributeValue{ "aggregation": pdata.NewAttributeValueString("hour"), }}, // Number of database operations on a MongoDB process since the process last started. - // sfx: skipped "DB_STORAGE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("total"), }}, - // sfx: skipped "DB_DATA_SIZE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("data_size_total"), }}, @@ -328,149 +272,121 @@ var metricNameMapping = map[string]metricMappingData{ }}, // Rate of database operations on a MongoDB process since the process last started found in the opcounters document that the serverStatus command collects. - // sfx: opcounter.command "OPCOUNTER_CMD": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("cmd"), "role": pdata.NewAttributeValueString("primary"), }}, - // sfx: opcounter.query "OPCOUNTER_QUERY": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("query"), "role": pdata.NewAttributeValueString("primary"), }}, - // sfx: opcounter.update "OPCOUNTER_UPDATE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("update"), "role": pdata.NewAttributeValueString("primary"), }}, - // sfx: opcounter.delete "OPCOUNTER_DELETE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("delete"), "role": pdata.NewAttributeValueString("primary"), }}, - // sfx: opcounter.getmore "OPCOUNTER_GETMORE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("getmore"), "role": pdata.NewAttributeValueString("primary"), }}, - // sfx: opcounter.insert "OPCOUNTER_INSERT": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("insert"), "role": pdata.NewAttributeValueString("primary"), }}, // Rate of database operations on MongoDB secondaries found in the opcountersRepl document that the serverStatus command collects. - // sfx: opcounter.repl.command "OPCOUNTER_REPL_CMD": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("cmd"), "role": pdata.NewAttributeValueString("replica"), }}, - // sfx: opcounter.repl.update "OPCOUNTER_REPL_UPDATE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("update"), "role": pdata.NewAttributeValueString("replica"), }}, - // sfx: opcounter.repl.delete "OPCOUNTER_REPL_DELETE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("delete"), "role": pdata.NewAttributeValueString("replica"), }}, - // sfx: opcounter.repl.insert "OPCOUNTER_REPL_INSERT": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("insert"), "role": pdata.NewAttributeValueString("replica"), }}, // Average rate of documents returned, inserted, updated, or deleted per second during a selected time period. - // sfx: document.metrics.returned "DOCUMENT_METRICS_RETURNED": {"process.db.document.rate", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("returned"), }}, - // sfx: document.metrics.inserted "DOCUMENT_METRICS_INSERTED": {"process.db.document.rate", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("inserted"), }}, - // sfx: document.metrics.updated "DOCUMENT_METRICS_UPDATED": {"process.db.document.rate", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("updated"), }}, - // sfx: document.metrics.deleted "DOCUMENT_METRICS_DELETED": {"process.db.document.rate", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("deleted"), }}, // Average rate for operations per second during a selected time period that perform a sort but cannot perform the sort using an index. - // sfx: operations_scan_and_order "OPERATIONS_SCAN_AND_ORDER": {"process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("scan_and_order"), }}, // Average execution time in milliseconds per read, write, or command operation during a selected time period. - // sfx: skipped "OP_EXECUTION_TIME_READS": {"process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("reads"), }}, - // sfx: skipped "OP_EXECUTION_TIME_WRITES": {"process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("writes"), }}, - // sfx: skipped "OP_EXECUTION_TIME_COMMANDS": {"process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("commands"), }}, // Number of times the host restarted within the previous hour. - // sfx: skipped "RESTARTS_IN_LAST_HOUR": {"process.restarts", map[string]pdata.AttributeValue{ "span": pdata.NewAttributeValueString("hour"), }}, // Average rate per second to scan index items during queries and query-plan evaluations found in the value of totalKeysExamined from the explain command. - // sfx: query.executor.scanned "QUERY_EXECUTOR_SCANNED": {"process.db.query_executor.scanned", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index items"), }}, // Average rate of documents scanned per second during queries and query-plan evaluations found in the value of totalDocsExamined from the explain command. - // sfx: query.executor.scanned_objects "QUERY_EXECUTOR_SCANNED_OBJECTS": {"process.db.query_executor.scanned", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("objects"), }}, // Ratio of the number of index items scanned to the number of documents returned. - // sfx: query.targeting.scanned_per_returned "QUERY_TARGETING_SCANNED_PER_RETURNED": {"process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index items"), }}, // Ratio of the number of documents scanned to the number of documents returned. - // sfx: query.targeting.scanned_objects_per_returned "QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED": {"process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("objects"), }}, // CPU usage of processes on the host. For hosts with more than one CPU core, this value can exceed 100%. - // sfx: system.cpu.user "SYSTEM_CPU_USER": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_CPU_USER": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.cpu.kernel "SYSTEM_CPU_KERNEL": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_CPU_KERNEL": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.cpu.nice "SYSTEM_CPU_NICE": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("avg"), @@ -479,64 +395,52 @@ var metricNameMapping = map[string]metricMappingData{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.cpu.iowait "SYSTEM_CPU_IOWAIT": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_CPU_IOWAIT": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.cpu.irq "SYSTEM_CPU_IRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_CPU_IRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.cpu.softirq "SYSTEM_CPU_SOFTIRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_CPU_SOFTIRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.cpu.guest "SYSTEM_CPU_GUEST": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_CPU_GUEST": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.cpu.steal "SYSTEM_CPU_STEAL": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_CPU_STEAL": {"system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("max"), }}, // CPU usage of processes on the host scaled to a range of 0 to 100% by dividing by the number of CPU cores. - // sfx: system.normalized.cpu.user "SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), @@ -545,237 +449,192 @@ var metricNameMapping = map[string]metricMappingData{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.normalized.cpu.kernel "SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.normalized.cpu.nice "SYSTEM_NORMALIZED_CPU_NICE": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: system.normalized.cpu.iowait "SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.normalized.cpu.irq "SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.normalized.cpu.softirq "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.normalized.cpu.guest "SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: system.normalized.cpu.steal "SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Physical memory usage, in bytes, that the host uses. - // sfx: skipped "SYSTEM_MEMORY_AVAILABLE": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("available"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_MEMORY_AVAILABLE": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("available"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "SYSTEM_MEMORY_BUFFERS": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("buffers"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_MEMORY_BUFFERS": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("buffers"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "SYSTEM_MEMORY_CACHED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("cached"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_MEMORY_CACHED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("cached"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "SYSTEM_MEMORY_FREE": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_MEMORY_FREE": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "SYSTEM_MEMORY_SHARED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("shared"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_MEMORY_SHARED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("shared"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "SYSTEM_MEMORY_USED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_MEMORY_USED": {"system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Average rate of physical bytes per second that the eth0 network interface received and transmitted. - // sfx: skipped "SYSTEM_NETWORK_IN": {"system.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("receive"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NETWORK_IN": {"system.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("receive"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "SYSTEM_NETWORK_OUT": {"system.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("transmit"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SYSTEM_NETWORK_OUT": {"system.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("transmit"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Total amount of memory that swap uses. - // sfx: skipped "SWAP_USAGE_USED": {"system.paging.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SWAP_USAGE_USED": {"system.paging.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "SWAP_USAGE_FREE": {"system.paging.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SWAP_USAGE_FREE": {"system.paging.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Total amount of memory written and read from swap. - // sfx: skipped "SWAP_IO_IN": {"system.paging.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("in"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SWAP_IO_IN": {"system.paging.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("in"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "SWAP_IO_OUT": {"system.paging.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("out"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_SWAP_IO_OUT": {"system.paging.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("out"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Memory usage, in bytes, that Atlas Search processes use. - // sfx: skipped "FTS_PROCESS_RESIDENT_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("resident"), }}, - // sfx: skipped "FTS_PROCESS_VIRTUAL_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("virtual"), }}, "FTS_PROCESS_SHARED_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("shared"), }}, - // sfx: skipped "FTS_MEMORY_MAPPED": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("mapped"), }}, // Disk space, in bytes, that Atlas Search indexes use. - // sfx: skipped "FTS_DISK_USAGE": {"system.fts.disk.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), }}, // Percentage of CPU that Atlas Search processes use. - // sfx: skipped "FTS_PROCESS_CPU_USER": {"system.fts.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), }}, - // sfx: skipped "FTS_PROCESS_CPU_KERNEL": {"system.fts.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), }}, - // sfx: skipped "FTS_PROCESS_NORMALIZED_CPU_USER": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), }}, - // sfx: skipped "FTS_PROCESS_NORMALIZED_CPU_KERNEL": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), }}, @@ -783,158 +642,129 @@ var metricNameMapping = map[string]metricMappingData{ // Process Disk Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) // Measures throughput of I/O operations for the disk partition used for MongoDB. - // sfx: skipped "DISK_PARTITION_IOPS_READ": {"disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_IOPS_READ": {"disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "DISK_PARTITION_IOPS_WRITE": {"disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_IOPS_WRITE": {"disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "DISK_PARTITION_IOPS_TOTAL": {"disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("total"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_IOPS_TOTAL": {"disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("total"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "DISK_PARTITION_UTILIZATION": {"disk.partition.utilization", map[string]pdata.AttributeValue{ "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_UTILIZATION": {"disk.partition.utilization", map[string]pdata.AttributeValue{ "aggregation": pdata.NewAttributeValueString("max"), }}, // The percentage of time during which requests are being issued to and serviced by the partition. // This includes requests from any process, not just MongoDB processes. - // sfx: skipped "DISK_PARTITION_LATENCY_READ": {"disk.partition.latency", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_LATENCY_READ": {"disk.partition.latency", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "DISK_PARTITION_LATENCY_WRITE": {"disk.partition.latency", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_LATENCY_WRITE": {"disk.partition.latency", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Measures latency per operation type of the disk partition used by MongoDB. - // sfx: skipped "DISK_PARTITION_SPACE_FREE": {"disk.partition.space", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_SPACE_FREE": {"disk.partition.space", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "DISK_PARTITION_SPACE_USED": {"disk.partition.space", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_SPACE_USED": {"disk.partition.space", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "DISK_PARTITION_SPACE_PERCENT_FREE": {"disk.partition.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"disk.partition.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // sfx: skipped "DISK_PARTITION_SPACE_PERCENT_USED": {"disk.partition.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - // sfx: skipped "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"disk.partition.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Process Database Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) - // sfx: skipped "DATABASE_COLLECTION_COUNT": {"db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("collection"), }}, - // sfx: skipped "DATABASE_INDEX_COUNT": {"db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index"), }}, - // sfx: skipped "DATABASE_EXTENT_COUNT": {"db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("extent"), }}, - // sfx: skipped "DATABASE_OBJECT_COUNT": {"db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("object"), }}, - // sfx: skipped "DATABASE_VIEW_COUNT": {"db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("view"), }}, - // sfx: skipped "DATABASE_AVERAGE_OBJECT_SIZE": {"db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("object"), }}, - // sfx: skipped "DATABASE_STORAGE_SIZE": {"db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("storage"), }}, - // sfx: skipped "DATABASE_INDEX_SIZE": {"db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index"), }}, - // sfx: skipped "DATABASE_DATA_SIZE": {"db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("data"), }}, From 60fc326e90cfa55410bf3e42c95081c81e9cca02 Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Wed, 27 Oct 2021 16:34:47 -0700 Subject: [PATCH 09/13] add mongodbatlas prefix to metric names --- .../internal/metadata/generated_metrics.go | 500 +++++++++--------- .../internal/metadata/metric_name_mapping.go | 350 ++++++------ receiver/mongodbatlasreceiver/metadata.yaml | 101 ++-- 3 files changed, 475 insertions(+), 476 deletions(-) diff --git a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go index 03058ccfebeb..2d4e5f4b47b1 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go @@ -55,165 +55,165 @@ func (m *metricImpl) Init(metric pdata.Metric) { } type metricStruct struct { - DbCounts MetricIntf - DbSize MetricIntf - DiskPartitionIops MetricIntf - DiskPartitionLatency MetricIntf - DiskPartitionSpace MetricIntf - DiskPartitionUtilization MetricIntf - ProcessAsserts MetricIntf - ProcessBackgroundFlush MetricIntf - ProcessCacheIo MetricIntf - ProcessCacheSize MetricIntf - ProcessConnections MetricIntf - ProcessCPUChildrenNormalizedUsage MetricIntf - ProcessCPUChildrenUsage MetricIntf - ProcessCPUNormalizedUsage MetricIntf - ProcessCPUUsage MetricIntf - ProcessCursors MetricIntf - ProcessDbDocumentRate MetricIntf - ProcessDbOperationsRate MetricIntf - ProcessDbOperationsTime MetricIntf - ProcessDbQueryExecutorScanned MetricIntf - ProcessDbQueryTargetingScannedPerReturned MetricIntf - ProcessDbStorage MetricIntf - ProcessFtsCPUNormalizedUsage MetricIntf - ProcessFtsCPUUsage MetricIntf - ProcessFtsDiskUsage MetricIntf - ProcessFtsMemoryUsage MetricIntf - ProcessGlobalLock MetricIntf - ProcessIndexBtreeMissRatio MetricIntf - ProcessIndexCounters MetricIntf - ProcessJournalingCommits MetricIntf - ProcessJournalingDataFiles MetricIntf - ProcessJournalingWritten MetricIntf - ProcessMemoryUsage MetricIntf - ProcessNetworkIo MetricIntf - ProcessNetworkRequests MetricIntf - ProcessOplogRate MetricIntf - ProcessOplogTime MetricIntf - ProcessPageFaults MetricIntf - ProcessRestarts MetricIntf - ProcessTickets MetricIntf - SystemCPUNormalizedUsage MetricIntf - SystemCPUUsage MetricIntf - SystemFtsCPUNormalizedUsage MetricIntf - SystemFtsCPUUsage MetricIntf - SystemFtsDiskUtilization MetricIntf - SystemFtsMemoryUsage MetricIntf - SystemMemoryUsage MetricIntf - SystemNetworkIo MetricIntf - SystemPagingIo MetricIntf - SystemPagingUsage MetricIntf + MongodbatlasDbCounts MetricIntf + MongodbatlasDbSize MetricIntf + MongodbatlasDiskPartitionIops MetricIntf + MongodbatlasDiskPartitionLatency MetricIntf + MongodbatlasDiskPartitionSpace MetricIntf + MongodbatlasDiskPartitionUtilization MetricIntf + MongodbatlasProcessAsserts MetricIntf + MongodbatlasProcessBackgroundFlush MetricIntf + MongodbatlasProcessCacheIo MetricIntf + MongodbatlasProcessCacheSize MetricIntf + MongodbatlasProcessConnections MetricIntf + MongodbatlasProcessCPUChildrenNormalizedUsage MetricIntf + MongodbatlasProcessCPUChildrenUsage MetricIntf + MongodbatlasProcessCPUNormalizedUsage MetricIntf + MongodbatlasProcessCPUUsage MetricIntf + MongodbatlasProcessCursors MetricIntf + MongodbatlasProcessDbDocumentRate MetricIntf + MongodbatlasProcessDbOperationsRate MetricIntf + MongodbatlasProcessDbOperationsTime MetricIntf + MongodbatlasProcessDbQueryExecutorScanned MetricIntf + MongodbatlasProcessDbQueryTargetingScannedPerReturned MetricIntf + MongodbatlasProcessDbStorage MetricIntf + MongodbatlasProcessFtsCPUNormalizedUsage MetricIntf + MongodbatlasProcessFtsCPUUsage MetricIntf + MongodbatlasProcessFtsDiskUsage MetricIntf + MongodbatlasProcessFtsMemoryUsage MetricIntf + MongodbatlasProcessGlobalLock MetricIntf + MongodbatlasProcessIndexBtreeMissRatio MetricIntf + MongodbatlasProcessIndexCounters MetricIntf + MongodbatlasProcessJournalingCommits MetricIntf + MongodbatlasProcessJournalingDataFiles MetricIntf + MongodbatlasProcessJournalingWritten MetricIntf + MongodbatlasProcessMemoryUsage MetricIntf + MongodbatlasProcessNetworkIo MetricIntf + MongodbatlasProcessNetworkRequests MetricIntf + MongodbatlasProcessOplogRate MetricIntf + MongodbatlasProcessOplogTime MetricIntf + MongodbatlasProcessPageFaults MetricIntf + MongodbatlasProcessRestarts MetricIntf + MongodbatlasProcessTickets MetricIntf + MongodbatlasSystemCPUNormalizedUsage MetricIntf + MongodbatlasSystemCPUUsage MetricIntf + MongodbatlasSystemFtsCPUNormalizedUsage MetricIntf + MongodbatlasSystemFtsCPUUsage MetricIntf + MongodbatlasSystemFtsDiskUtilization MetricIntf + MongodbatlasSystemFtsMemoryUsage MetricIntf + MongodbatlasSystemMemoryUsage MetricIntf + MongodbatlasSystemNetworkIo MetricIntf + MongodbatlasSystemPagingIo MetricIntf + MongodbatlasSystemPagingUsage MetricIntf } // Names returns a list of all the metric name strings. func (m *metricStruct) Names() []string { return []string{ - "db.counts", - "db.size", - "disk.partition.iops", - "disk.partition.latency", - "disk.partition.space", - "disk.partition.utilization", - "process.asserts", - "process.background_flush", - "process.cache.io", - "process.cache.size", - "process.connections", - "process.cpu.children.normalized.usage", - "process.cpu.children.usage", - "process.cpu.normalized.usage", - "process.cpu.usage", - "process.cursors", - "process.db.document.rate", - "process.db.operations.rate", - "process.db.operations.time", - "process.db.query_executor.scanned", - "process.db.query_targeting.scanned_per_returned", - "process.db.storage", - "process.fts.cpu.normalized.usage", - "process.fts.cpu.usage", - "process.fts.disk.usage", - "process.fts.memory.usage", - "process.global_lock", - "process.index.btree_miss_ratio", - "process.index.counters", - "process.journaling.commits", - "process.journaling.data_files", - "process.journaling.written", - "process.memory.usage", - "process.network.io", - "process.network.requests", - "process.oplog.rate", - "process.oplog.time", - "process.page_faults", - "process.restarts", - "process.tickets", - "system.cpu.normalized.usage", - "system.cpu.usage", - "system.fts.cpu.normalized.usage", - "system.fts.cpu.usage", - "system.fts.disk.utilization", - "system.fts.memory.usage", - "system.memory.usage", - "system.network.io", - "system.paging.io", - "system.paging.usage", + "mongodbatlas.db.counts", + "mongodbatlas.db.size", + "mongodbatlas.disk.partition.iops", + "mongodbatlas.disk.partition.latency", + "mongodbatlas.disk.partition.space", + "mongodbatlas.disk.partition.utilization", + "mongodbatlas.process.asserts", + "mongodbatlas.process.background_flush", + "mongodbatlas.process.cache.io", + "mongodbatlas.process.cache.size", + "mongodbatlas.process.connections", + "mongodbatlas.process.cpu.children.normalized.usage", + "mongodbatlas.process.cpu.children.usage", + "mongodbatlas.process.cpu.normalized.usage", + "mongodbatlas.process.cpu.usage", + "mongodbatlas.process.cursors", + "mongodbatlas.process.db.document.rate", + "mongodbatlas.process.db.operations.rate", + "mongodbatlas.process.db.operations.time", + "mongodbatlas.process.db.query_executor.scanned", + "mongodbatlas.process.db.query_targeting.scanned_per_returned", + "mongodbatlas.process.db.storage", + "mongodbatlas.process.fts.cpu.normalized.usage", + "mongodbatlas.process.fts.cpu.usage", + "mongodbatlas.process.fts.disk.usage", + "mongodbatlas.process.fts.memory.usage", + "mongodbatlas.process.global_lock", + "mongodbatlas.process.index.btree_miss_ratio", + "mongodbatlas.process.index.counters", + "mongodbatlas.process.journaling.commits", + "mongodbatlas.process.journaling.data_files", + "mongodbatlas.process.journaling.written", + "mongodbatlas.process.memory.usage", + "mongodbatlas.process.network.io", + "mongodbatlas.process.network.requests", + "mongodbatlas.process.oplog.rate", + "mongodbatlas.process.oplog.time", + "mongodbatlas.process.page_faults", + "mongodbatlas.process.restarts", + "mongodbatlas.process.tickets", + "mongodbatlas.system.cpu.normalized.usage", + "mongodbatlas.system.cpu.usage", + "mongodbatlas.system.fts.cpu.normalized.usage", + "mongodbatlas.system.fts.cpu.usage", + "mongodbatlas.system.fts.disk.utilization", + "mongodbatlas.system.fts.memory.usage", + "mongodbatlas.system.memory.usage", + "mongodbatlas.system.network.io", + "mongodbatlas.system.paging.io", + "mongodbatlas.system.paging.usage", } } var metricsByName = map[string]MetricIntf{ - "db.counts": Metrics.DbCounts, - "db.size": Metrics.DbSize, - "disk.partition.iops": Metrics.DiskPartitionIops, - "disk.partition.latency": Metrics.DiskPartitionLatency, - "disk.partition.space": Metrics.DiskPartitionSpace, - "disk.partition.utilization": Metrics.DiskPartitionUtilization, - "process.asserts": Metrics.ProcessAsserts, - "process.background_flush": Metrics.ProcessBackgroundFlush, - "process.cache.io": Metrics.ProcessCacheIo, - "process.cache.size": Metrics.ProcessCacheSize, - "process.connections": Metrics.ProcessConnections, - "process.cpu.children.normalized.usage": Metrics.ProcessCPUChildrenNormalizedUsage, - "process.cpu.children.usage": Metrics.ProcessCPUChildrenUsage, - "process.cpu.normalized.usage": Metrics.ProcessCPUNormalizedUsage, - "process.cpu.usage": Metrics.ProcessCPUUsage, - "process.cursors": Metrics.ProcessCursors, - "process.db.document.rate": Metrics.ProcessDbDocumentRate, - "process.db.operations.rate": Metrics.ProcessDbOperationsRate, - "process.db.operations.time": Metrics.ProcessDbOperationsTime, - "process.db.query_executor.scanned": Metrics.ProcessDbQueryExecutorScanned, - "process.db.query_targeting.scanned_per_returned": Metrics.ProcessDbQueryTargetingScannedPerReturned, - "process.db.storage": Metrics.ProcessDbStorage, - "process.fts.cpu.normalized.usage": Metrics.ProcessFtsCPUNormalizedUsage, - "process.fts.cpu.usage": Metrics.ProcessFtsCPUUsage, - "process.fts.disk.usage": Metrics.ProcessFtsDiskUsage, - "process.fts.memory.usage": Metrics.ProcessFtsMemoryUsage, - "process.global_lock": Metrics.ProcessGlobalLock, - "process.index.btree_miss_ratio": Metrics.ProcessIndexBtreeMissRatio, - "process.index.counters": Metrics.ProcessIndexCounters, - "process.journaling.commits": Metrics.ProcessJournalingCommits, - "process.journaling.data_files": Metrics.ProcessJournalingDataFiles, - "process.journaling.written": Metrics.ProcessJournalingWritten, - "process.memory.usage": Metrics.ProcessMemoryUsage, - "process.network.io": Metrics.ProcessNetworkIo, - "process.network.requests": Metrics.ProcessNetworkRequests, - "process.oplog.rate": Metrics.ProcessOplogRate, - "process.oplog.time": Metrics.ProcessOplogTime, - "process.page_faults": Metrics.ProcessPageFaults, - "process.restarts": Metrics.ProcessRestarts, - "process.tickets": Metrics.ProcessTickets, - "system.cpu.normalized.usage": Metrics.SystemCPUNormalizedUsage, - "system.cpu.usage": Metrics.SystemCPUUsage, - "system.fts.cpu.normalized.usage": Metrics.SystemFtsCPUNormalizedUsage, - "system.fts.cpu.usage": Metrics.SystemFtsCPUUsage, - "system.fts.disk.utilization": Metrics.SystemFtsDiskUtilization, - "system.fts.memory.usage": Metrics.SystemFtsMemoryUsage, - "system.memory.usage": Metrics.SystemMemoryUsage, - "system.network.io": Metrics.SystemNetworkIo, - "system.paging.io": Metrics.SystemPagingIo, - "system.paging.usage": Metrics.SystemPagingUsage, + "mongodbatlas.db.counts": Metrics.MongodbatlasDbCounts, + "mongodbatlas.db.size": Metrics.MongodbatlasDbSize, + "mongodbatlas.disk.partition.iops": Metrics.MongodbatlasDiskPartitionIops, + "mongodbatlas.disk.partition.latency": Metrics.MongodbatlasDiskPartitionLatency, + "mongodbatlas.disk.partition.space": Metrics.MongodbatlasDiskPartitionSpace, + "mongodbatlas.disk.partition.utilization": Metrics.MongodbatlasDiskPartitionUtilization, + "mongodbatlas.process.asserts": Metrics.MongodbatlasProcessAsserts, + "mongodbatlas.process.background_flush": Metrics.MongodbatlasProcessBackgroundFlush, + "mongodbatlas.process.cache.io": Metrics.MongodbatlasProcessCacheIo, + "mongodbatlas.process.cache.size": Metrics.MongodbatlasProcessCacheSize, + "mongodbatlas.process.connections": Metrics.MongodbatlasProcessConnections, + "mongodbatlas.process.cpu.children.normalized.usage": Metrics.MongodbatlasProcessCPUChildrenNormalizedUsage, + "mongodbatlas.process.cpu.children.usage": Metrics.MongodbatlasProcessCPUChildrenUsage, + "mongodbatlas.process.cpu.normalized.usage": Metrics.MongodbatlasProcessCPUNormalizedUsage, + "mongodbatlas.process.cpu.usage": Metrics.MongodbatlasProcessCPUUsage, + "mongodbatlas.process.cursors": Metrics.MongodbatlasProcessCursors, + "mongodbatlas.process.db.document.rate": Metrics.MongodbatlasProcessDbDocumentRate, + "mongodbatlas.process.db.operations.rate": Metrics.MongodbatlasProcessDbOperationsRate, + "mongodbatlas.process.db.operations.time": Metrics.MongodbatlasProcessDbOperationsTime, + "mongodbatlas.process.db.query_executor.scanned": Metrics.MongodbatlasProcessDbQueryExecutorScanned, + "mongodbatlas.process.db.query_targeting.scanned_per_returned": Metrics.MongodbatlasProcessDbQueryTargetingScannedPerReturned, + "mongodbatlas.process.db.storage": Metrics.MongodbatlasProcessDbStorage, + "mongodbatlas.process.fts.cpu.normalized.usage": Metrics.MongodbatlasProcessFtsCPUNormalizedUsage, + "mongodbatlas.process.fts.cpu.usage": Metrics.MongodbatlasProcessFtsCPUUsage, + "mongodbatlas.process.fts.disk.usage": Metrics.MongodbatlasProcessFtsDiskUsage, + "mongodbatlas.process.fts.memory.usage": Metrics.MongodbatlasProcessFtsMemoryUsage, + "mongodbatlas.process.global_lock": Metrics.MongodbatlasProcessGlobalLock, + "mongodbatlas.process.index.btree_miss_ratio": Metrics.MongodbatlasProcessIndexBtreeMissRatio, + "mongodbatlas.process.index.counters": Metrics.MongodbatlasProcessIndexCounters, + "mongodbatlas.process.journaling.commits": Metrics.MongodbatlasProcessJournalingCommits, + "mongodbatlas.process.journaling.data_files": Metrics.MongodbatlasProcessJournalingDataFiles, + "mongodbatlas.process.journaling.written": Metrics.MongodbatlasProcessJournalingWritten, + "mongodbatlas.process.memory.usage": Metrics.MongodbatlasProcessMemoryUsage, + "mongodbatlas.process.network.io": Metrics.MongodbatlasProcessNetworkIo, + "mongodbatlas.process.network.requests": Metrics.MongodbatlasProcessNetworkRequests, + "mongodbatlas.process.oplog.rate": Metrics.MongodbatlasProcessOplogRate, + "mongodbatlas.process.oplog.time": Metrics.MongodbatlasProcessOplogTime, + "mongodbatlas.process.page_faults": Metrics.MongodbatlasProcessPageFaults, + "mongodbatlas.process.restarts": Metrics.MongodbatlasProcessRestarts, + "mongodbatlas.process.tickets": Metrics.MongodbatlasProcessTickets, + "mongodbatlas.system.cpu.normalized.usage": Metrics.MongodbatlasSystemCPUNormalizedUsage, + "mongodbatlas.system.cpu.usage": Metrics.MongodbatlasSystemCPUUsage, + "mongodbatlas.system.fts.cpu.normalized.usage": Metrics.MongodbatlasSystemFtsCPUNormalizedUsage, + "mongodbatlas.system.fts.cpu.usage": Metrics.MongodbatlasSystemFtsCPUUsage, + "mongodbatlas.system.fts.disk.utilization": Metrics.MongodbatlasSystemFtsDiskUtilization, + "mongodbatlas.system.fts.memory.usage": Metrics.MongodbatlasSystemFtsMemoryUsage, + "mongodbatlas.system.memory.usage": Metrics.MongodbatlasSystemMemoryUsage, + "mongodbatlas.system.network.io": Metrics.MongodbatlasSystemNetworkIo, + "mongodbatlas.system.paging.io": Metrics.MongodbatlasSystemPagingIo, + "mongodbatlas.system.paging.usage": Metrics.MongodbatlasSystemPagingUsage, } func (m *metricStruct) ByName(n string) MetricIntf { @@ -224,450 +224,450 @@ func (m *metricStruct) ByName(n string) MetricIntf { // manipulating those metrics. var Metrics = &metricStruct{ &metricImpl{ - "db.counts", + "mongodbatlas.db.counts", func(metric pdata.Metric) { - metric.SetName("db.counts") + metric.SetName("mongodbatlas.db.counts") metric.SetDescription("Database feature size") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "db.size", + "mongodbatlas.db.size", func(metric pdata.Metric) { - metric.SetName("db.size") + metric.SetName("mongodbatlas.db.size") metric.SetDescription("Database feature size") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "disk.partition.iops", + "mongodbatlas.disk.partition.iops", func(metric pdata.Metric) { - metric.SetName("disk.partition.iops") + metric.SetName("mongodbatlas.disk.partition.iops") metric.SetDescription("Disk partition iops") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "disk.partition.latency", + "mongodbatlas.disk.partition.latency", func(metric pdata.Metric) { - metric.SetName("disk.partition.latency") + metric.SetName("mongodbatlas.disk.partition.latency") metric.SetDescription("Disk partition latency") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "disk.partition.space", + "mongodbatlas.disk.partition.space", func(metric pdata.Metric) { - metric.SetName("disk.partition.space") + metric.SetName("mongodbatlas.disk.partition.space") metric.SetDescription("Disk partition space") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "disk.partition.utilization", + "mongodbatlas.disk.partition.utilization", func(metric pdata.Metric) { - metric.SetName("disk.partition.utilization") + metric.SetName("mongodbatlas.disk.partition.utilization") metric.SetDescription("Disk partition utilization") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.asserts", + "mongodbatlas.process.asserts", func(metric pdata.Metric) { - metric.SetName("process.asserts") + metric.SetName("mongodbatlas.process.asserts") metric.SetDescription("Number of assertions") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.background_flush", + "mongodbatlas.process.background_flush", func(metric pdata.Metric) { - metric.SetName("process.background_flush") + metric.SetName("mongodbatlas.process.background_flush") metric.SetDescription("Amount of data flushed in the background") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.cache.io", + "mongodbatlas.process.cache.io", func(metric pdata.Metric) { - metric.SetName("process.cache.io") + metric.SetName("mongodbatlas.process.cache.io") metric.SetDescription("Cache throughput") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.cache.size", + "mongodbatlas.process.cache.size", func(metric pdata.Metric) { - metric.SetName("process.cache.size") + metric.SetName("mongodbatlas.process.cache.size") metric.SetDescription("Cache sizes") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.connections", + "mongodbatlas.process.connections", func(metric pdata.Metric) { - metric.SetName("process.connections") + metric.SetName("mongodbatlas.process.connections") metric.SetDescription("Number of current connections") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.cpu.children.normalized.usage", + "mongodbatlas.process.cpu.children.normalized.usage", func(metric pdata.Metric) { - metric.SetName("process.cpu.children.normalized.usage") + metric.SetName("mongodbatlas.process.cpu.children.normalized.usage") metric.SetDescription("CPU Usage for child processes, normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.cpu.children.usage", + "mongodbatlas.process.cpu.children.usage", func(metric pdata.Metric) { - metric.SetName("process.cpu.children.usage") + metric.SetName("mongodbatlas.process.cpu.children.usage") metric.SetDescription("CPU Usage for child processes") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.cpu.normalized.usage", + "mongodbatlas.process.cpu.normalized.usage", func(metric pdata.Metric) { - metric.SetName("process.cpu.normalized.usage") + metric.SetName("mongodbatlas.process.cpu.normalized.usage") metric.SetDescription("CPU Usage, normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.cpu.usage", + "mongodbatlas.process.cpu.usage", func(metric pdata.Metric) { - metric.SetName("process.cpu.usage") + metric.SetName("mongodbatlas.process.cpu.usage") metric.SetDescription("CPU Usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.cursors", + "mongodbatlas.process.cursors", func(metric pdata.Metric) { - metric.SetName("process.cursors") + metric.SetName("mongodbatlas.process.cursors") metric.SetDescription("Number of cursors") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.db.document.rate", + "mongodbatlas.process.db.document.rate", func(metric pdata.Metric) { - metric.SetName("process.db.document.rate") + metric.SetName("mongodbatlas.process.db.document.rate") metric.SetDescription("Document access rates") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.db.operations.rate", + "mongodbatlas.process.db.operations.rate", func(metric pdata.Metric) { - metric.SetName("process.db.operations.rate") + metric.SetName("mongodbatlas.process.db.operations.rate") metric.SetDescription("FIXME") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.db.operations.time", + "mongodbatlas.process.db.operations.time", func(metric pdata.Metric) { - metric.SetName("process.db.operations.time") + metric.SetName("mongodbatlas.process.db.operations.time") metric.SetDescription("FIXME") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.db.query_executor.scanned", + "mongodbatlas.process.db.query_executor.scanned", func(metric pdata.Metric) { - metric.SetName("process.db.query_executor.scanned") + metric.SetName("mongodbatlas.process.db.query_executor.scanned") metric.SetDescription("Scanned objects") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.db.query_targeting.scanned_per_returned", + "mongodbatlas.process.db.query_targeting.scanned_per_returned", func(metric pdata.Metric) { - metric.SetName("process.db.query_targeting.scanned_per_returned") + metric.SetName("mongodbatlas.process.db.query_targeting.scanned_per_returned") metric.SetDescription("Scanned objects per returned") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.db.storage", + "mongodbatlas.process.db.storage", func(metric pdata.Metric) { - metric.SetName("process.db.storage") + metric.SetName("mongodbatlas.process.db.storage") metric.SetDescription("FIXME") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.fts.cpu.normalized.usage", + "mongodbatlas.process.fts.cpu.normalized.usage", func(metric pdata.Metric) { - metric.SetName("process.fts.cpu.normalized.usage") + metric.SetName("mongodbatlas.process.fts.cpu.normalized.usage") metric.SetDescription("Full text search CPU, normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.fts.cpu.usage", + "mongodbatlas.process.fts.cpu.usage", func(metric pdata.Metric) { - metric.SetName("process.fts.cpu.usage") + metric.SetName("mongodbatlas.process.fts.cpu.usage") metric.SetDescription("Full text search CPU") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.fts.disk.usage", + "mongodbatlas.process.fts.disk.usage", func(metric pdata.Metric) { - metric.SetName("process.fts.disk.usage") + metric.SetName("mongodbatlas.process.fts.disk.usage") metric.SetDescription("Full text search disk usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.fts.memory.usage", + "mongodbatlas.process.fts.memory.usage", func(metric pdata.Metric) { - metric.SetName("process.fts.memory.usage") + metric.SetName("mongodbatlas.process.fts.memory.usage") metric.SetDescription("Full text search memory usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.global_lock", + "mongodbatlas.process.global_lock", func(metric pdata.Metric) { - metric.SetName("process.global_lock") + metric.SetName("mongodbatlas.process.global_lock") metric.SetDescription("Number and status of locks") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.index.btree_miss_ratio", + "mongodbatlas.process.index.btree_miss_ratio", func(metric pdata.Metric) { - metric.SetName("process.index.btree_miss_ratio") + metric.SetName("mongodbatlas.process.index.btree_miss_ratio") metric.SetDescription("Index miss ratio") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.index.counters", + "mongodbatlas.process.index.counters", func(metric pdata.Metric) { - metric.SetName("process.index.counters") + metric.SetName("mongodbatlas.process.index.counters") metric.SetDescription("Indexes") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.journaling.commits", + "mongodbatlas.process.journaling.commits", func(metric pdata.Metric) { - metric.SetName("process.journaling.commits") + metric.SetName("mongodbatlas.process.journaling.commits") metric.SetDescription("Journaling commits") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.journaling.data_files", + "mongodbatlas.process.journaling.data_files", func(metric pdata.Metric) { - metric.SetName("process.journaling.data_files") + metric.SetName("mongodbatlas.process.journaling.data_files") metric.SetDescription("Data file sizes") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.journaling.written", + "mongodbatlas.process.journaling.written", func(metric pdata.Metric) { - metric.SetName("process.journaling.written") + metric.SetName("mongodbatlas.process.journaling.written") metric.SetDescription("Journals written") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.memory.usage", + "mongodbatlas.process.memory.usage", func(metric pdata.Metric) { - metric.SetName("process.memory.usage") + metric.SetName("mongodbatlas.process.memory.usage") metric.SetDescription("Memory Usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.network.io", + "mongodbatlas.process.network.io", func(metric pdata.Metric) { - metric.SetName("process.network.io") + metric.SetName("mongodbatlas.process.network.io") metric.SetDescription("Network IO") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.network.requests", + "mongodbatlas.process.network.requests", func(metric pdata.Metric) { - metric.SetName("process.network.requests") + metric.SetName("mongodbatlas.process.network.requests") metric.SetDescription("Network requests") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.oplog.rate", + "mongodbatlas.process.oplog.rate", func(metric pdata.Metric) { - metric.SetName("process.oplog.rate") + metric.SetName("mongodbatlas.process.oplog.rate") metric.SetDescription("Execution rate by operation") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.oplog.time", + "mongodbatlas.process.oplog.time", func(metric pdata.Metric) { - metric.SetName("process.oplog.time") + metric.SetName("mongodbatlas.process.oplog.time") metric.SetDescription("Execution time by operation") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.page_faults", + "mongodbatlas.process.page_faults", func(metric pdata.Metric) { - metric.SetName("process.page_faults") + metric.SetName("mongodbatlas.process.page_faults") metric.SetDescription("Page faults") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.restarts", + "mongodbatlas.process.restarts", func(metric pdata.Metric) { - metric.SetName("process.restarts") + metric.SetName("mongodbatlas.process.restarts") metric.SetDescription("Restarts in last hour") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "process.tickets", + "mongodbatlas.process.tickets", func(metric pdata.Metric) { - metric.SetName("process.tickets") + metric.SetName("mongodbatlas.process.tickets") metric.SetDescription("Tickets") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.cpu.normalized.usage", + "mongodbatlas.system.cpu.normalized.usage", func(metric pdata.Metric) { - metric.SetName("system.cpu.normalized.usage") + metric.SetName("mongodbatlas.system.cpu.normalized.usage") metric.SetDescription("System CPU Normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.cpu.usage", + "mongodbatlas.system.cpu.usage", func(metric pdata.Metric) { - metric.SetName("system.cpu.usage") + metric.SetName("mongodbatlas.system.cpu.usage") metric.SetDescription("System CPU Usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.fts.cpu.normalized.usage", + "mongodbatlas.system.fts.cpu.normalized.usage", func(metric pdata.Metric) { - metric.SetName("system.fts.cpu.normalized.usage") + metric.SetName("mongodbatlas.system.fts.cpu.normalized.usage") metric.SetDescription("Full text search disk usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.fts.cpu.usage", + "mongodbatlas.system.fts.cpu.usage", func(metric pdata.Metric) { - metric.SetName("system.fts.cpu.usage") + metric.SetName("mongodbatlas.system.fts.cpu.usage") metric.SetDescription("Full-text search") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.fts.disk.utilization", + "mongodbatlas.system.fts.disk.utilization", func(metric pdata.Metric) { - metric.SetName("system.fts.disk.utilization") + metric.SetName("mongodbatlas.system.fts.disk.utilization") metric.SetDescription("Full text search disk usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.fts.memory.usage", + "mongodbatlas.system.fts.memory.usage", func(metric pdata.Metric) { - metric.SetName("system.fts.memory.usage") + metric.SetName("mongodbatlas.system.fts.memory.usage") metric.SetDescription("Full-text search") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.memory.usage", + "mongodbatlas.system.memory.usage", func(metric pdata.Metric) { - metric.SetName("system.memory.usage") + metric.SetName("mongodbatlas.system.memory.usage") metric.SetDescription("System Memory Usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.network.io", + "mongodbatlas.system.network.io", func(metric pdata.Metric) { - metric.SetName("system.network.io") + metric.SetName("mongodbatlas.system.network.io") metric.SetDescription("System Network IO") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.paging.io", + "mongodbatlas.system.paging.io", func(metric pdata.Metric) { - metric.SetName("system.paging.io") + metric.SetName("mongodbatlas.system.paging.io") metric.SetDescription("Swap IO") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "system.paging.usage", + "mongodbatlas.system.paging.usage", func(metric pdata.Metric) { - metric.SetName("system.paging.usage") + metric.SetName("mongodbatlas.system.paging.usage") metric.SetDescription("Swap usage") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go index 9dd4267c9242..3116636c0972 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go @@ -31,741 +31,741 @@ type metricMappingData struct { var metricNameMapping = map[string]metricMappingData{ // MongoDB CPU usage. For hosts with more than one CPU core, these values can exceed 100%. - "PROCESS_CPU_USER": {"process.cpu.usage", map[string]pdata.AttributeValue{ + "PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_PROCESS_CPU_USER": {"process.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "PROCESS_CPU_KERNEL": {"process.cpu.usage", map[string]pdata.AttributeValue{ + "PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_PROCESS_CPU_KERNEL": {"process.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ + "PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_PROCESS_CPU_CHILDREN_USER": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ + "MAX_PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ + "PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"process.cpu.children.usage", map[string]pdata.AttributeValue{ + "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, // MongoDB CPU usage scaled to a range of 0% to 100%. Atlas computes this value by dividing by the number of CPU cores. - "PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_PROCESS_NORMALIZED_CPU_USER": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"process.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ + "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // Context: Process - "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ + "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Rate of asserts for a MongoDB process found in the asserts document that the serverStatus command generates. - "ASSERT_REGULAR": {"process.asserts", map[string]pdata.AttributeValue{ + "ASSERT_REGULAR": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("regular"), }}, - "ASSERT_WARNING": {"process.asserts", map[string]pdata.AttributeValue{ + "ASSERT_WARNING": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("warning"), }}, - "ASSERT_MSG": {"process.asserts", map[string]pdata.AttributeValue{ + "ASSERT_MSG": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("msg"), }}, - "ASSERT_USER": {"process.asserts", map[string]pdata.AttributeValue{ + "ASSERT_USER": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("user"), }}, // Amount of data flushed in the background. - "BACKGROUND_FLUSH_AVG": {"process.background_flush", map[string]pdata.AttributeValue{}}, + "BACKGROUND_FLUSH_AVG": {"mongodbatlas.process.background_flush", map[string]pdata.AttributeValue{}}, // Amount of bytes in the WiredTiger storage engine cache and tickets found in the wiredTiger.cache and wiredTiger.concurrentTransactions documents that the serverStatus command generates. - "CACHE_BYTES_READ_INTO": {"process.cache.io", map[string]pdata.AttributeValue{ + "CACHE_BYTES_READ_INTO": {"mongodbatlas.process.cache.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read_into"), }}, - "CACHE_BYTES_WRITTEN_FROM": {"process.cache.io", map[string]pdata.AttributeValue{ + "CACHE_BYTES_WRITTEN_FROM": {"mongodbatlas.process.cache.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("written_from"), }}, - "CACHE_DIRTY_BYTES": {"process.cache.size", map[string]pdata.AttributeValue{ + "CACHE_DIRTY_BYTES": {"mongodbatlas.process.cache.size", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("dirty"), }}, - "CACHE_USED_BYTES": {"process.cache.size", map[string]pdata.AttributeValue{ + "CACHE_USED_BYTES": {"mongodbatlas.process.cache.size", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), }}, - "TICKETS_AVAILABLE_READS": {"process.tickets", map[string]pdata.AttributeValue{ + "TICKETS_AVAILABLE_READS": {"mongodbatlas.process.tickets", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("available_reads"), }}, - "TICKETS_AVAILABLE_WRITE": {"process.tickets", map[string]pdata.AttributeValue{ + "TICKETS_AVAILABLE_WRITE": {"mongodbatlas.process.tickets", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("available_writes"), }}, // Number of connections to a MongoDB process found in the connections document that the serverStatus command generates. - "CONNECTIONS": {"process.connections", map[string]pdata.AttributeValue{}}, + "CONNECTIONS": {"mongodbatlas.process.connections", map[string]pdata.AttributeValue{}}, // Number of cursors for a MongoDB process found in the metrics.cursor document that the serverStatus command generates. - "CURSORS_TOTAL_OPEN": {"process.cursors", map[string]pdata.AttributeValue{ + "CURSORS_TOTAL_OPEN": {"mongodbatlas.process.cursors", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("open"), }}, - "CURSORS_TOTAL_TIMED_OUT": {"process.cursors", map[string]pdata.AttributeValue{ + "CURSORS_TOTAL_TIMED_OUT": {"mongodbatlas.process.cursors", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("timed_out"), }}, // Numbers of Memory Issues and Page Faults for a MongoDB process. - "EXTRA_INFO_PAGE_FAULTS": {"process.page_faults", map[string]pdata.AttributeValue{ + "EXTRA_INFO_PAGE_FAULTS": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("extra_info"), }}, - "GLOBAL_ACCESSES_NOT_IN_MEMORY": {"process.page_faults", map[string]pdata.AttributeValue{ + "GLOBAL_ACCESSES_NOT_IN_MEMORY": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("global_accesses_not_in_memory"), }}, - "GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN": {"process.page_faults", map[string]pdata.AttributeValue{ + "GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("exceptions_thrown"), }}, // Number of operations waiting on locks for the MongoDB process that the serverStatus command generates. Cloud Manager computes these values based on the type of storage engine. - "GLOBAL_LOCK_CURRENT_QUEUE_TOTAL": {"process.global_lock", map[string]pdata.AttributeValue{ + "GLOBAL_LOCK_CURRENT_QUEUE_TOTAL": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("current_queue_total"), }}, - "GLOBAL_LOCK_CURRENT_QUEUE_READERS": {"process.global_lock", map[string]pdata.AttributeValue{ + "GLOBAL_LOCK_CURRENT_QUEUE_READERS": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("current_queue_readers"), }}, - "GLOBAL_LOCK_CURRENT_QUEUE_WRITERS": {"process.global_lock", map[string]pdata.AttributeValue{ + "GLOBAL_LOCK_CURRENT_QUEUE_WRITERS": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("current_queue_writers"), }}, // Number of index btree operations. - "INDEX_COUNTERS_BTREE_ACCESSES": {"process.index.counters", map[string]pdata.AttributeValue{ + "INDEX_COUNTERS_BTREE_ACCESSES": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("btree_accesses"), }}, - "INDEX_COUNTERS_BTREE_HITS": {"process.index.counters", map[string]pdata.AttributeValue{ + "INDEX_COUNTERS_BTREE_HITS": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("btree_hits"), }}, - "INDEX_COUNTERS_BTREE_MISSES": {"process.index.counters", map[string]pdata.AttributeValue{ + "INDEX_COUNTERS_BTREE_MISSES": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("btree_misses"), }}, - "INDEX_COUNTERS_BTREE_MISS_RATIO": {"process.index.btree_miss_ratio", map[string]pdata.AttributeValue{}}, + "INDEX_COUNTERS_BTREE_MISS_RATIO": {"mongodbatlas.process.index.btree_miss_ratio", map[string]pdata.AttributeValue{}}, // Number of journaling operations. - "JOURNALING_COMMITS_IN_WRITE_LOCK": {"process.journaling.commits", map[string]pdata.AttributeValue{ + "JOURNALING_COMMITS_IN_WRITE_LOCK": {"mongodbatlas.process.journaling.commits", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("in_write_lock"), }}, - "JOURNALING_MB": {"process.journaling.written", map[string]pdata.AttributeValue{}}, - "JOURNALING_WRITE_DATA_FILES_MB": {"process.journaling.data_files", map[string]pdata.AttributeValue{}}, + "JOURNALING_MB": {"mongodbatlas.process.journaling.written", map[string]pdata.AttributeValue{}}, + "JOURNALING_WRITE_DATA_FILES_MB": {"mongodbatlas.process.journaling.data_files", map[string]pdata.AttributeValue{}}, // Amount of memory for a MongoDB process found in the mem document that the serverStatus command collects. - "MEMORY_RESIDENT": {"process.memory.usage", map[string]pdata.AttributeValue{ + "MEMORY_RESIDENT": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("resident"), }}, - "MEMORY_VIRTUAL": {"process.memory.usage", map[string]pdata.AttributeValue{ + "MEMORY_VIRTUAL": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("virtual"), }}, - "MEMORY_MAPPED": {"process.memory.usage", map[string]pdata.AttributeValue{ + "MEMORY_MAPPED": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("mapped"), }}, - "COMPUTED_MEMORY": {"process.memory.usage", map[string]pdata.AttributeValue{ + "COMPUTED_MEMORY": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("computed"), }}, // Amount of throughput for MongoDB process found in the network document that the serverStatus command collects. - "NETWORK_BYTES_IN": {"process.network.io", map[string]pdata.AttributeValue{ + "NETWORK_BYTES_IN": {"mongodbatlas.process.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("receive"), }}, - "NETWORK_BYTES_OUT": {"process.network.io", map[string]pdata.AttributeValue{ + "NETWORK_BYTES_OUT": {"mongodbatlas.process.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("transmit"), }}, - "NETWORK_NUM_REQUESTS": {"process.network.requests", map[string]pdata.AttributeValue{}}, + "NETWORK_NUM_REQUESTS": {"mongodbatlas.process.network.requests", map[string]pdata.AttributeValue{}}, // Durations and throughput of the MongoDB process' oplog. - "OPLOG_SLAVE_LAG_MASTER_TIME": {"process.oplog.time", map[string]pdata.AttributeValue{ + "OPLOG_SLAVE_LAG_MASTER_TIME": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("slave_lag_master_time"), }}, - "OPLOG_MASTER_TIME": {"process.oplog.time", map[string]pdata.AttributeValue{ + "OPLOG_MASTER_TIME": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("master_time"), }}, - "OPLOG_MASTER_LAG_TIME_DIFF": {"process.oplog.time", map[string]pdata.AttributeValue{ + "OPLOG_MASTER_LAG_TIME_DIFF": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("master_lag_time_diff"), }}, - "OPLOG_RATE_GB_PER_HOUR": {"process.oplog.rate", map[string]pdata.AttributeValue{ + "OPLOG_RATE_GB_PER_HOUR": {"mongodbatlas.process.oplog.rate", map[string]pdata.AttributeValue{ "aggregation": pdata.NewAttributeValueString("hour"), }}, // Number of database operations on a MongoDB process since the process last started. - "DB_STORAGE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ + "DB_STORAGE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("total"), }}, - "DB_DATA_SIZE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ + "DB_DATA_SIZE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("data_size_total"), }}, - "DB_INDEX_SIZE_TOTAL": {"process.db.storage", map[string]pdata.AttributeValue{ + "DB_INDEX_SIZE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("index_size_total"), }}, - "DB_DATA_SIZE_TOTAL_WO_SYSTEM": {"process.db.storage", map[string]pdata.AttributeValue{ + "DB_DATA_SIZE_TOTAL_WO_SYSTEM": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("data_size_total_wo_system"), }}, // Rate of database operations on a MongoDB process since the process last started found in the opcounters document that the serverStatus command collects. - "OPCOUNTER_CMD": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_CMD": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("cmd"), "role": pdata.NewAttributeValueString("primary"), }}, - "OPCOUNTER_QUERY": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_QUERY": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("query"), "role": pdata.NewAttributeValueString("primary"), }}, - "OPCOUNTER_UPDATE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_UPDATE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("update"), "role": pdata.NewAttributeValueString("primary"), }}, - "OPCOUNTER_DELETE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_DELETE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("delete"), "role": pdata.NewAttributeValueString("primary"), }}, - "OPCOUNTER_GETMORE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_GETMORE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("getmore"), "role": pdata.NewAttributeValueString("primary"), }}, - "OPCOUNTER_INSERT": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_INSERT": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("insert"), "role": pdata.NewAttributeValueString("primary"), }}, // Rate of database operations on MongoDB secondaries found in the opcountersRepl document that the serverStatus command collects. - "OPCOUNTER_REPL_CMD": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_REPL_CMD": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("cmd"), "role": pdata.NewAttributeValueString("replica"), }}, - "OPCOUNTER_REPL_UPDATE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_REPL_UPDATE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("update"), "role": pdata.NewAttributeValueString("replica"), }}, - "OPCOUNTER_REPL_DELETE": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_REPL_DELETE": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("delete"), "role": pdata.NewAttributeValueString("replica"), }}, - "OPCOUNTER_REPL_INSERT": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPCOUNTER_REPL_INSERT": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("insert"), "role": pdata.NewAttributeValueString("replica"), }}, // Average rate of documents returned, inserted, updated, or deleted per second during a selected time period. - "DOCUMENT_METRICS_RETURNED": {"process.db.document.rate", map[string]pdata.AttributeValue{ + "DOCUMENT_METRICS_RETURNED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("returned"), }}, - "DOCUMENT_METRICS_INSERTED": {"process.db.document.rate", map[string]pdata.AttributeValue{ + "DOCUMENT_METRICS_INSERTED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("inserted"), }}, - "DOCUMENT_METRICS_UPDATED": {"process.db.document.rate", map[string]pdata.AttributeValue{ + "DOCUMENT_METRICS_UPDATED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("updated"), }}, - "DOCUMENT_METRICS_DELETED": {"process.db.document.rate", map[string]pdata.AttributeValue{ + "DOCUMENT_METRICS_DELETED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("deleted"), }}, // Average rate for operations per second during a selected time period that perform a sort but cannot perform the sort using an index. - "OPERATIONS_SCAN_AND_ORDER": {"process.db.operations.rate", map[string]pdata.AttributeValue{ + "OPERATIONS_SCAN_AND_ORDER": {"mongodbatlas.process.db.operations.rate", map[string]pdata.AttributeValue{ "operation": pdata.NewAttributeValueString("scan_and_order"), }}, // Average execution time in milliseconds per read, write, or command operation during a selected time period. - "OP_EXECUTION_TIME_READS": {"process.db.operations.time", map[string]pdata.AttributeValue{ + "OP_EXECUTION_TIME_READS": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("reads"), }}, - "OP_EXECUTION_TIME_WRITES": {"process.db.operations.time", map[string]pdata.AttributeValue{ + "OP_EXECUTION_TIME_WRITES": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("writes"), }}, - "OP_EXECUTION_TIME_COMMANDS": {"process.db.operations.time", map[string]pdata.AttributeValue{ + "OP_EXECUTION_TIME_COMMANDS": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("commands"), }}, // Number of times the host restarted within the previous hour. - "RESTARTS_IN_LAST_HOUR": {"process.restarts", map[string]pdata.AttributeValue{ + "RESTARTS_IN_LAST_HOUR": {"mongodbatlas.process.restarts", map[string]pdata.AttributeValue{ "span": pdata.NewAttributeValueString("hour"), }}, // Average rate per second to scan index items during queries and query-plan evaluations found in the value of totalKeysExamined from the explain command. - "QUERY_EXECUTOR_SCANNED": {"process.db.query_executor.scanned", map[string]pdata.AttributeValue{ + "QUERY_EXECUTOR_SCANNED": {"mongodbatlas.process.db.query_executor.scanned", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index items"), }}, // Average rate of documents scanned per second during queries and query-plan evaluations found in the value of totalDocsExamined from the explain command. - "QUERY_EXECUTOR_SCANNED_OBJECTS": {"process.db.query_executor.scanned", map[string]pdata.AttributeValue{ + "QUERY_EXECUTOR_SCANNED_OBJECTS": {"mongodbatlas.process.db.query_executor.scanned", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("objects"), }}, // Ratio of the number of index items scanned to the number of documents returned. - "QUERY_TARGETING_SCANNED_PER_RETURNED": {"process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ + "QUERY_TARGETING_SCANNED_PER_RETURNED": {"mongodbatlas.process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index items"), }}, // Ratio of the number of documents scanned to the number of documents returned. - "QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED": {"process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ + "QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED": {"mongodbatlas.process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("objects"), }}, // CPU usage of processes on the host. For hosts with more than one CPU core, this value can exceed 100%. - "SYSTEM_CPU_USER": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_CPU_USER": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_CPU_KERNEL": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_CPU_KERNEL": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_CPU_NICE": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_CPU_NICE": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_CPU_IOWAIT": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_CPU_IOWAIT": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_CPU_IRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_CPU_IRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_CPU_SOFTIRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_CPU_SOFTIRQ": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_CPU_GUEST": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_CPU_GUEST": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_CPU_STEAL": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_CPU_STEAL": {"system.cpu.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("max"), }}, // CPU usage of processes on the host scaled to a range of 0 to 100% by dividing by the number of CPU cores. - "SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_USER": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_NICE": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_NORMALIZED_CPU_NICE": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"system.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Physical memory usage, in bytes, that the host uses. - "SYSTEM_MEMORY_AVAILABLE": {"system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("available"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_AVAILABLE": {"system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("available"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_BUFFERS": {"system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("buffers"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_BUFFERS": {"system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("buffers"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_CACHED": {"system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("cached"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_CACHED": {"system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("cached"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_FREE": {"system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_FREE": {"system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_SHARED": {"system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("shared"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_SHARED": {"system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("shared"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_USED": {"system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_USED": {"system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Average rate of physical bytes per second that the eth0 network interface received and transmitted. - "SYSTEM_NETWORK_IN": {"system.network.io", map[string]pdata.AttributeValue{ + "SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("receive"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NETWORK_IN": {"system.network.io", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("receive"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_NETWORK_OUT": {"system.network.io", map[string]pdata.AttributeValue{ + "SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("transmit"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_NETWORK_OUT": {"system.network.io", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("transmit"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Total amount of memory that swap uses. - "SWAP_USAGE_USED": {"system.paging.usage", map[string]pdata.AttributeValue{ + "SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SWAP_USAGE_USED": {"system.paging.usage", map[string]pdata.AttributeValue{ + "MAX_SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SWAP_USAGE_FREE": {"system.paging.usage", map[string]pdata.AttributeValue{ + "SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SWAP_USAGE_FREE": {"system.paging.usage", map[string]pdata.AttributeValue{ + "MAX_SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Total amount of memory written and read from swap. - "SWAP_IO_IN": {"system.paging.io", map[string]pdata.AttributeValue{ + "SWAP_IO_IN": {"mongodbatlas.system.paging.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("in"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SWAP_IO_IN": {"system.paging.io", map[string]pdata.AttributeValue{ + "MAX_SWAP_IO_IN": {"mongodbatlas.system.paging.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("in"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "SWAP_IO_OUT": {"system.paging.io", map[string]pdata.AttributeValue{ + "SWAP_IO_OUT": {"mongodbatlas.system.paging.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("out"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SWAP_IO_OUT": {"system.paging.io", map[string]pdata.AttributeValue{ + "MAX_SWAP_IO_OUT": {"mongodbatlas.system.paging.io", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("out"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Memory usage, in bytes, that Atlas Search processes use. - "FTS_PROCESS_RESIDENT_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_RESIDENT_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("resident"), }}, - "FTS_PROCESS_VIRTUAL_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_VIRTUAL_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("virtual"), }}, - "FTS_PROCESS_SHARED_MEMORY": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_SHARED_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("shared"), }}, - "FTS_MEMORY_MAPPED": {"system.fts.memory.usage", map[string]pdata.AttributeValue{ + "FTS_MEMORY_MAPPED": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ "state": pdata.NewAttributeValueString("mapped"), }}, // Disk space, in bytes, that Atlas Search indexes use. - "FTS_DISK_USAGE": {"system.fts.disk.utilization", map[string]pdata.AttributeValue{ + "FTS_DISK_USAGE": {"mongodbatlas.system.fts.disk.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), }}, // Percentage of CPU that Atlas Search processes use. - "FTS_PROCESS_CPU_USER": {"system.fts.cpu.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_CPU_USER": {"mongodbatlas.system.fts.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), }}, - "FTS_PROCESS_CPU_KERNEL": {"system.fts.cpu.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_CPU_KERNEL": {"mongodbatlas.system.fts.cpu.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), }}, - "FTS_PROCESS_NORMALIZED_CPU_USER": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("user"), }}, - "FTS_PROCESS_NORMALIZED_CPU_KERNEL": {"system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ + "FTS_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("kernel"), }}, // Process Disk Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) // Measures throughput of I/O operations for the disk partition used for MongoDB. - "DISK_PARTITION_IOPS_READ": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_IOPS_READ": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_IOPS_WRITE": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_IOPS_WRITE": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_IOPS_TOTAL": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("total"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_IOPS_TOTAL": {"disk.partition.iops", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("total"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_UTILIZATION": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_UTILIZATION": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ "aggregation": pdata.NewAttributeValueString("max"), }}, // The percentage of time during which requests are being issued to and serviced by the partition. // This includes requests from any process, not just MongoDB processes. - "DISK_PARTITION_LATENCY_READ": {"disk.partition.latency", map[string]pdata.AttributeValue{ + "DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_LATENCY_READ": {"disk.partition.latency", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("read"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_LATENCY_WRITE": {"disk.partition.latency", map[string]pdata.AttributeValue{ + "DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_LATENCY_WRITE": {"disk.partition.latency", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ "direction": pdata.NewAttributeValueString("write"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Measures latency per operation type of the disk partition used by MongoDB. - "DISK_PARTITION_SPACE_FREE": {"disk.partition.space", map[string]pdata.AttributeValue{ + "DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_SPACE_FREE": {"disk.partition.space", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_SPACE_USED": {"disk.partition.space", map[string]pdata.AttributeValue{ + "DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_SPACE_USED": {"disk.partition.space", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_SPACE_PERCENT_FREE": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("free"), "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_SPACE_PERCENT_USED": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"disk.partition.utilization", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ "status": pdata.NewAttributeValueString("used"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Process Database Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) - "DATABASE_COLLECTION_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "DATABASE_COLLECTION_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("collection"), }}, - "DATABASE_INDEX_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "DATABASE_INDEX_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index"), }}, - "DATABASE_EXTENT_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "DATABASE_EXTENT_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("extent"), }}, - "DATABASE_OBJECT_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "DATABASE_OBJECT_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("object"), }}, - "DATABASE_VIEW_COUNT": {"db.counts", map[string]pdata.AttributeValue{ + "DATABASE_VIEW_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("view"), }}, - "DATABASE_AVERAGE_OBJECT_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "DATABASE_AVERAGE_OBJECT_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("object"), }}, - "DATABASE_STORAGE_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "DATABASE_STORAGE_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("storage"), }}, - "DATABASE_INDEX_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "DATABASE_INDEX_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("index"), }}, - "DATABASE_DATA_SIZE": {"db.size", map[string]pdata.AttributeValue{ + "DATABASE_DATA_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ "type": pdata.NewAttributeValueString("data"), }}, } diff --git a/receiver/mongodbatlasreceiver/metadata.yaml b/receiver/mongodbatlasreceiver/metadata.yaml index 767682869f07..a25499cf3be8 100644 --- a/receiver/mongodbatlasreceiver/metadata.yaml +++ b/receiver/mongodbatlasreceiver/metadata.yaml @@ -1,253 +1,252 @@ name: mongoatlasreceiver metrics: - process.asserts: + mongodbatlas.process.asserts: description: Number of assertions unit: 1 data: type: gauge - process.background_flush: + mongodbatlas.process.background_flush: description: Amount of data flushed in the background unit: 1 data: type: gauge - process.cache.io: + mongodbatlas.process.cache.io: description: Cache throughput unit: 1 data: type: gauge - process.cache.size: + mongodbatlas.process.cache.size: description: Cache sizes unit: 1 data: type: gauge - process.connections: + mongodbatlas.process.connections: description: Number of current connections unit: 1 data: type: gauge - process.cpu.usage: + mongodbatlas.process.cpu.usage: description: CPU Usage unit: 1 data: type: gauge - process.cpu.children.usage: + mongodbatlas.process.cpu.children.usage: description: CPU Usage for child processes unit: 1 data: type: gauge - process.cpu.children.normalized.usage: + mongodbatlas.process.cpu.children.normalized.usage: description: CPU Usage for child processes, normalized to pct unit: 1 data: type: gauge - process.cpu.normalized.usage: + mongodbatlas.process.cpu.normalized.usage: description: CPU Usage, normalized to pct unit: 1 data: type: gauge - process.cursors: + mongodbatlas.process.cursors: description: Number of cursors unit: 1 data: type: gauge - process.db.storage: + mongodbatlas.process.db.storage: description: FIXME unit: 1 data: type: gauge - process.db.document.rate: - # TODO: I'm not sure this one is right + mongodbatlas.process.db.document.rate: description: Document access rates unit: 1 data: type: gauge - process.fts.cpu.usage: + mongodbatlas.process.fts.cpu.usage: description: Full text search CPU unit: 1 data: type: gauge - process.fts.cpu.normalized.usage: + mongodbatlas.process.fts.cpu.normalized.usage: description: Full text search CPU, normalized to pct unit: 1 data: type: gauge - process.fts.disk.usage: + mongodbatlas.process.fts.disk.usage: description: Full text search disk usage unit: 1 data: type: gauge - process.fts.memory.usage: + mongodbatlas.process.fts.memory.usage: description: Full text search memory usage unit: 1 data: type: gauge - process.global_lock: + mongodbatlas.process.global_lock: description: Number and status of locks unit: 1 data: type: gauge - process.index.btree_miss_ratio: + mongodbatlas.process.index.btree_miss_ratio: description: Index miss ratio unit: 1 data: type: gauge - process.index.counters: + mongodbatlas.process.index.counters: description: Indexes unit: 1 data: type: gauge - process.journaling.commits: + mongodbatlas.process.journaling.commits: description: Journaling commits unit: 1 data: type: gauge - process.journaling.data_files: + mongodbatlas.process.journaling.data_files: description: Data file sizes unit: 1 data: type: gauge - process.journaling.written: + mongodbatlas.process.journaling.written: description: Journals written unit: 1 data: type: gauge - process.memory.usage: + mongodbatlas.process.memory.usage: description: Memory Usage unit: 1 data: type: gauge - process.network.io: + mongodbatlas.process.network.io: description: Network IO unit: 1 data: type: gauge - process.network.requests: + mongodbatlas.process.network.requests: description: Network requests unit: 1 data: type: gauge - process.oplog.time: + mongodbatlas.process.oplog.time: description: Execution time by operation unit: 1 data: type: gauge - process.oplog.rate: + mongodbatlas.process.oplog.rate: description: Execution rate by operation unit: 1 data: type: gauge - process.db.operations.rate: + mongodbatlas.process.db.operations.rate: description: FIXME unit: 1 data: type: gauge - process.db.operations.time: + mongodbatlas.process.db.operations.time: description: FIXME unit: 1 data: type: gauge - process.page_faults: + mongodbatlas.process.page_faults: description: Page faults unit: 1 data: type: gauge - process.db.query_executor.scanned: + mongodbatlas.process.db.query_executor.scanned: description: Scanned objects unit: 1 data: type: gauge - process.db.query_targeting.scanned_per_returned: + mongodbatlas.process.db.query_targeting.scanned_per_returned: description: Scanned objects per returned unit: 1 data: type: gauge - process.restarts: + mongodbatlas.process.restarts: description: Restarts in last hour unit: 1 data: type: gauge - system.paging.usage: + mongodbatlas.system.paging.usage: description: Swap usage unit: 1 data: type: gauge - system.paging.io: + mongodbatlas.system.paging.io: description: Swap IO unit: 1 data: type: gauge - system.cpu.usage: + mongodbatlas.system.cpu.usage: description: System CPU Usage unit: 1 data: type: gauge - system.memory.usage: + mongodbatlas.system.memory.usage: description: System Memory Usage unit: 1 data: type: gauge - system.network.io: + mongodbatlas.system.network.io: description: System Network IO unit: 1 data: type: gauge - system.cpu.normalized.usage: + mongodbatlas.system.cpu.normalized.usage: description: System CPU Normalized to pct unit: 1 data: type: gauge - process.tickets: + mongodbatlas.process.tickets: description: Tickets unit: 1 data: type: gauge - disk.partition.iops: + mongodbatlas.disk.partition.iops: description: Disk partition iops unit: 1 data: type: gauge - disk.partition.utilization: + mongodbatlas.disk.partition.utilization: description: Disk partition utilization unit: 1 data: type: gauge - disk.partition.latency: + mongodbatlas.disk.partition.latency: description: Disk partition latency unit: 1 data: type: gauge - disk.partition.space: + mongodbatlas.disk.partition.space: description: Disk partition space unit: 1 data: type: gauge - db.size: + mongodbatlas.db.size: description: Database feature size unit: 1 data: type: gauge - db.counts: + mongodbatlas.db.counts: description: Database feature size unit: 1 data: type: gauge - system.fts.memory.usage: + mongodbatlas.system.fts.memory.usage: description: Full-text search unit: 1 data: type: gauge - system.fts.disk.utilization: + mongodbatlas.system.fts.disk.utilization: description: Full text search disk usage unit: 1 data: type: gauge - system.fts.cpu.usage: + mongodbatlas.system.fts.cpu.usage: description: Full-text search unit: 1 data: type: gauge - system.fts.cpu.normalized.usage: + mongodbatlas.system.fts.cpu.normalized.usage: description: Full text search disk usage unit: 1 data: From 95bbcb3f80fb3b701c5dfe23c6a5a2844f72193f Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Tue, 2 Nov 2021 09:06:31 -0700 Subject: [PATCH 10/13] rework metric units and labels --- .../mongodbatlasreceiver/documentation.md | 130 +++++ .../internal/metadata/generated_metrics.go | 477 ++++++++++++++---- .../internal/metadata/metric_name_mapping.go | 404 +++++++-------- .../internal/mongodb_atlas_client.go | 6 +- receiver/mongodbatlasreceiver/metadata.yaml | 353 ++++++++++--- 5 files changed, 985 insertions(+), 385 deletions(-) create mode 100644 receiver/mongodbatlasreceiver/documentation.md diff --git a/receiver/mongodbatlasreceiver/documentation.md b/receiver/mongodbatlasreceiver/documentation.md new file mode 100644 index 000000000000..f4c0ff403db3 --- /dev/null +++ b/receiver/mongodbatlasreceiver/documentation.md @@ -0,0 +1,130 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# mongoatlasreceiver + +## Metrics + +These are the metrics available for this scraper. + +| Name | Description | Unit | Type | Attributes | +| ---- | ----------- | ---- | ---- | ---------- | +| mongodbatlas.db.counts | Database feature size Aggregates MongoDB Metrics DATABASE_EXTENT_COUNT, DATABASE_VIEW_COUNT, DATABASE_COLLECTION_COUNT, DATABASE_OBJECT_COUNT, DATABASE_INDEX_COUNT | {objects} | Gauge |
    +
  • object_type
| +| mongodbatlas.db.size | Database feature size Aggregates MongoDB Metrics DATABASE_DATA_SIZE, DATABASE_STORAGE_SIZE, DATABASE_INDEX_SIZE, DATABASE_AVERAGE_OBJECT_SIZE | By | Gauge |
    +
  • object_type
| +| mongodbatlas.disk.partition.iops | Disk partition iops Aggregates MongoDB Metrics DISK_PARTITION_IOPS_READ, MAX_DISK_PARTITION_IOPS_WRITE, MAX_DISK_PARTITION_IOPS_TOTAL, DISK_PARTITION_IOPS_WRITE, DISK_PARTITION_IOPS_TOTAL, MAX_DISK_PARTITION_IOPS_READ | {ops}/s | Gauge |
    +
  • disk_direction
  • aggregation
| +| mongodbatlas.disk.partition.latency | Disk partition latency Aggregates MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ, MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ | ms | Gauge |
    +
  • disk_direction
  • aggregation
| +| mongodbatlas.disk.partition.space | Disk partition space Aggregates MongoDB Metrics DISK_PARTITION_SPACE_FREE, MAX_DISK_PARTITION_SPACE_USED, DISK_PARTITION_SPACE_USED, MAX_DISK_PARTITION_SPACE_FREE | By | Gauge |
    +
| +| mongodbatlas.disk.partition.utilization | Disk partition utilization (%) Aggregates MongoDB Metrics MAX_DISK_PARTITION_SPACE_PERCENT_USED, DISK_PARTITION_SPACE_PERCENT_FREE, MAX_DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED, DISK_PARTITION_UTILIZATION, MAX_DISK_PARTITION_UTILIZATION | 1 | Gauge |
    +
  • aggregation
| +| mongodbatlas.process.asserts | Number of assertions Aggregates MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING | {assertions}/s | Gauge |
    +
  • assert_type
| +| mongodbatlas.process.background_flush | Amount of data flushed in the background MongoDB Metric BACKGROUND_FLUSH_AVG | 1 | Gauge |
    +
| +| mongodbatlas.process.cache.io | Cache throughput (per second) Aggregates MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM | By | Gauge |
    +
  • cache_direction
| +| mongodbatlas.process.cache.size | Cache sizes Aggregates MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES | By | Gauge |
    +
  • cache_status
| +| mongodbatlas.process.connections | Number of current connections MongoDB Metric CONNECTIONS | {connections} | Gauge |
    +
| +| mongodbatlas.process.cpu.children.normalized.usage | CPU Usage for child processes, normalized to pct Aggregates MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
    +
  • cpu_state
  • aggregation
| +| mongodbatlas.process.cpu.children.usage | CPU Usage for child processes (%) Aggregates MongoDB Metrics MAX_PROCESS_CPU_CHILDREN_USER, MAX_PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_USER | 1 | Gauge |
    +
  • cpu_state
  • aggregation
| +| mongodbatlas.process.cpu.normalized.usage | CPU Usage, normalized to pct Aggregates MongoDB Metrics PROCESS_NORMALIZED_CPU_KERNEL, MAX_PROCESS_NORMALIZED_CPU_USER, PROCESS_NORMALIZED_CPU_USER, MAX_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
    +
  • cpu_state
  • aggregation
| +| mongodbatlas.process.cpu.usage | CPU Usage (%) Aggregates MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER, MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER | 1 | Gauge |
    +
  • cpu_state
  • aggregation
| +| mongodbatlas.process.cursors | Number of cursors Aggregates MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT | {cursors} | Gauge |
    +
  • cursor_state
| +| mongodbatlas.process.db.document.rate | Document access rates Aggregates MongoDB Metrics DOCUMENT_METRICS_UPDATED, DOCUMENT_METRICS_DELETED, DOCUMENT_METRICS_RETURNED, DOCUMENT_METRICS_INSERTED | {documents}/s | Gauge |
    +
  • document_status
| +| mongodbatlas.process.db.operations.rate | DB Operation Rates Aggregates MongoDB Metrics OPCOUNTER_GETMORE, OPERATIONS_SCAN_AND_ORDER, OPCOUNTER_UPDATE, OPCOUNTER_REPL_UPDATE, OPCOUNTER_CMD, OPCOUNTER_DELETE, OPCOUNTER_REPL_DELETE, OPCOUNTER_REPL_CMD, OPCOUNTER_QUERY, OPCOUNTER_REPL_INSERT, OPCOUNTER_INSERT | {operations}/s | Gauge |
    +
  • operation
  • cluster_role
| +| mongodbatlas.process.db.operations.time | DB Operation Times Aggregates MongoDB Metrics OP_EXECUTION_TIME_WRITES, OP_EXECUTION_TIME_COMMANDS, OP_EXECUTION_TIME_READS | ms | Sum |
    +
  • execution_type
| +| mongodbatlas.process.db.query_executor.scanned | Scanned objects Aggregates MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED | {objects}/s | Gauge |
    +
  • scanned_type
| +| mongodbatlas.process.db.query_targeting.scanned_per_returned | Scanned objects per returned Aggregates MongoDB Metrics QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED, QUERY_TARGETING_SCANNED_PER_RETURNED | {scanned}/{returned} | Gauge |
    +
  • scanned_type
| +| mongodbatlas.process.db.storage | Storage used by the database Aggregates MongoDB Metrics DB_INDEX_SIZE_TOTAL, DB_DATA_SIZE_TOTAL_WO_SYSTEM, DB_STORAGE_TOTAL, DB_DATA_SIZE_TOTAL | By | Gauge |
    +
  • storage_status
| +| mongodbatlas.process.fts.cpu.usage | Full text search CPU (%) Aggregates MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL | 1 | Gauge |
    +
  • cpu_state
| +| mongodbatlas.process.global_lock | Number and status of locks Aggregates MongoDB Metrics GLOBAL_LOCK_CURRENT_QUEUE_WRITERS, GLOBAL_LOCK_CURRENT_QUEUE_READERS, GLOBAL_LOCK_CURRENT_QUEUE_TOTAL | {locks} | Gauge |
    +
  • global_lock_state
| +| mongodbatlas.process.index.btree_miss_ratio | Index miss ratio (%) MongoDB Metric INDEX_COUNTERS_BTREE_MISS_RATIO | 1 | Gauge |
    +
| +| mongodbatlas.process.index.counters | Indexes Aggregates MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS | {indexes} | Gauge |
    +
  • btree_counter_type
| +| mongodbatlas.process.journaling.commits | Journaling commits MongoDB Metric JOURNALING_COMMITS_IN_WRITE_LOCK | {commits} | Gauge |
    +
| +| mongodbatlas.process.journaling.data_files | Data file sizes MongoDB Metric JOURNALING_WRITE_DATA_FILES_MB | MiBy | Gauge |
    +
| +| mongodbatlas.process.journaling.written | Journals written MongoDB Metric JOURNALING_MB | MiBy | Gauge |
    +
| +| mongodbatlas.process.memory.usage | Memory Usage Aggregates MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT | By | Gauge |
    +
  • memory_state
| +| mongodbatlas.process.network.io | Network IO Aggregates MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN | By/s | Gauge |
    +
  • direction
| +| mongodbatlas.process.network.requests | Network requests MongoDB Metric NETWORK_NUM_REQUESTS | {requests} | Sum |
    +
| +| mongodbatlas.process.oplog.rate | Execution rate by operation MongoDB Metric OPLOG_RATE_GB_PER_HOUR | GiBy/h | Gauge |
    +
| +| mongodbatlas.process.oplog.time | Execution time by operation Aggregates MongoDB Metrics OPLOG_MASTER_TIME, OPLOG_SLAVE_LAG_MASTER_TIME, OPLOG_MASTER_LAG_TIME_DIFF | s | Gauge |
    +
  • oplog_type
| +| mongodbatlas.process.page_faults | Page faults Aggregates MongoDB Metrics GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN, EXTRA_INFO_PAGE_FAULTS, GLOBAL_ACCESSES_NOT_IN_MEMORY | {faults}/s | Gauge |
    +
  • memory_issue_type
| +| mongodbatlas.process.restarts | Restarts in last hour Aggregates MongoDB Metrics RESTARTS_IN_LAST_HOUR | {restarts}/h | Gauge |
    +
| +| mongodbatlas.process.tickets | Tickets Aggregates MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS | {tickets} | Gauge |
    +
  • ticket_type
| +| mongodbatlas.system.cpu.normalized.usage | System CPU Normalized to pct Aggregates MongoDB Metrics MAX_SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_IRQ, MAX_SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_KERNEL, SYSTEM_NORMALIZED_CPU_STEAL, MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_STEAL, SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_KERNEL, MAX_SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_IRQ | 1 | Gauge |
    +
  • cpu_state
  • aggregation
| +| mongodbatlas.system.cpu.usage | System CPU Usage (%) Aggregates MongoDB Metrics SYSTEM_CPU_USER, MAX_SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_IRQ, MAX_SYSTEM_CPU_GUEST, MAX_SYSTEM_CPU_IOWAIT, SYSTEM_CPU_GUEST, SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_NICE, SYSTEM_CPU_IRQ, SYSTEM_CPU_KERNEL, SYSTEM_CPU_IOWAIT, SYSTEM_CPU_NICE, SYSTEM_CPU_STEAL, MAX_SYSTEM_CPU_KERNEL, MAX_SYSTEM_CPU_USER, MAX_SYSTEM_CPU_STEAL | 1 | Gauge |
    +
  • cpu_state
  • aggregation
| +| mongodbatlas.system.fts.cpu.normalized.usage | Full text search disk usage (%) Aggregates MongoDB Metrics FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
    +
  • cpu_state
| +| mongodbatlas.system.fts.cpu.usage | Full-text search (%) | 1 | Gauge |
  • cpu_state
| +| mongodbatlas.system.fts.disk.used | Full text search disk usage MongoDB Metric FTS_DISK_USAGE | By | Gauge |
    +
| +| mongodbatlas.system.fts.memory.usage | Full-text search Aggregates MongoDB Metrics FTS_MEMORY_MAPPED, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY | MiBy | Sum |
    +
  • memory_state
| +| mongodbatlas.system.memory.usage | System Memory Usage Aggregates MongoDB Metrics SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_CACHED, MAX_SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_USED, SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_FREE, SYSTEM_MEMORY_USED, SYSTEM_MEMORY_CACHED, SYSTEM_MEMORY_SHARED, MAX_SYSTEM_MEMORY_SHARED, SYSTEM_MEMORY_FREE | KiBy | Gauge |
    +
  • memory_state
  • aggregation
| +| mongodbatlas.system.network.io | System Network IO Aggregates MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN | By/s | Gauge |
    +
  • direction
  • aggregation
| +| mongodbatlas.system.paging.io | Swap IO Aggregates MongoDB Metrics MAX_SWAP_IO_IN, SWAP_IO_IN, SWAP_IO_OUT, MAX_SWAP_IO_OUT | {pages}/s | Gauge |
    +
  • direction
  • aggregation
| +| mongodbatlas.system.paging.usage | Swap usage Aggregates MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED, SWAP_USAGE_FREE, SWAP_USAGE_USED | KiBy | Gauge |
    +
  • direction
  • aggregation
| + +## Attributes + +| Name | Description | +| ---- | ----------- | +| aggregation | Method used by MongoDB to pre-aggregate metrics | +| assert_type | MongoDB assertion type | +| btree_counter_type | Database index effectiveness | +| cache_direction | Whether read into or written from | +| cache_status | Cache status | +| cluster_role | Whether process is acting as replica or primary | +| cpu_state | CPU state | +| cursor_state | Whether cursor is open or timed out | +| direction | Network traffic direction | +| disk_direction | Measurement type for disk operation | +| disk_status | Disk measurement type | +| document_status | Status of documents in the database | +| execution_type | Type of command | +| global_lock_state | Which queue is locked | +| memory_issue_type | Type of memory issue encountered | +| memory_state | Memory usage type | +| object_type | MongoDB object type | +| operation | Type of database operation | +| oplog_type | Oplog type | +| scanned_type | Objects or indexes scanned during query | +| storage_status | Views on database size | +| ticket_type | Type of ticket available | \ No newline at end of file diff --git a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go index 2d4e5f4b47b1..b7f18dabb3d5 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go @@ -77,10 +77,7 @@ type metricStruct struct { MongodbatlasProcessDbQueryExecutorScanned MetricIntf MongodbatlasProcessDbQueryTargetingScannedPerReturned MetricIntf MongodbatlasProcessDbStorage MetricIntf - MongodbatlasProcessFtsCPUNormalizedUsage MetricIntf MongodbatlasProcessFtsCPUUsage MetricIntf - MongodbatlasProcessFtsDiskUsage MetricIntf - MongodbatlasProcessFtsMemoryUsage MetricIntf MongodbatlasProcessGlobalLock MetricIntf MongodbatlasProcessIndexBtreeMissRatio MetricIntf MongodbatlasProcessIndexCounters MetricIntf @@ -99,7 +96,7 @@ type metricStruct struct { MongodbatlasSystemCPUUsage MetricIntf MongodbatlasSystemFtsCPUNormalizedUsage MetricIntf MongodbatlasSystemFtsCPUUsage MetricIntf - MongodbatlasSystemFtsDiskUtilization MetricIntf + MongodbatlasSystemFtsDiskUsed MetricIntf MongodbatlasSystemFtsMemoryUsage MetricIntf MongodbatlasSystemMemoryUsage MetricIntf MongodbatlasSystemNetworkIo MetricIntf @@ -132,10 +129,7 @@ func (m *metricStruct) Names() []string { "mongodbatlas.process.db.query_executor.scanned", "mongodbatlas.process.db.query_targeting.scanned_per_returned", "mongodbatlas.process.db.storage", - "mongodbatlas.process.fts.cpu.normalized.usage", "mongodbatlas.process.fts.cpu.usage", - "mongodbatlas.process.fts.disk.usage", - "mongodbatlas.process.fts.memory.usage", "mongodbatlas.process.global_lock", "mongodbatlas.process.index.btree_miss_ratio", "mongodbatlas.process.index.counters", @@ -154,7 +148,7 @@ func (m *metricStruct) Names() []string { "mongodbatlas.system.cpu.usage", "mongodbatlas.system.fts.cpu.normalized.usage", "mongodbatlas.system.fts.cpu.usage", - "mongodbatlas.system.fts.disk.utilization", + "mongodbatlas.system.fts.disk.used", "mongodbatlas.system.fts.memory.usage", "mongodbatlas.system.memory.usage", "mongodbatlas.system.network.io", @@ -186,10 +180,7 @@ var metricsByName = map[string]MetricIntf{ "mongodbatlas.process.db.query_executor.scanned": Metrics.MongodbatlasProcessDbQueryExecutorScanned, "mongodbatlas.process.db.query_targeting.scanned_per_returned": Metrics.MongodbatlasProcessDbQueryTargetingScannedPerReturned, "mongodbatlas.process.db.storage": Metrics.MongodbatlasProcessDbStorage, - "mongodbatlas.process.fts.cpu.normalized.usage": Metrics.MongodbatlasProcessFtsCPUNormalizedUsage, "mongodbatlas.process.fts.cpu.usage": Metrics.MongodbatlasProcessFtsCPUUsage, - "mongodbatlas.process.fts.disk.usage": Metrics.MongodbatlasProcessFtsDiskUsage, - "mongodbatlas.process.fts.memory.usage": Metrics.MongodbatlasProcessFtsMemoryUsage, "mongodbatlas.process.global_lock": Metrics.MongodbatlasProcessGlobalLock, "mongodbatlas.process.index.btree_miss_ratio": Metrics.MongodbatlasProcessIndexBtreeMissRatio, "mongodbatlas.process.index.counters": Metrics.MongodbatlasProcessIndexCounters, @@ -208,7 +199,7 @@ var metricsByName = map[string]MetricIntf{ "mongodbatlas.system.cpu.usage": Metrics.MongodbatlasSystemCPUUsage, "mongodbatlas.system.fts.cpu.normalized.usage": Metrics.MongodbatlasSystemFtsCPUNormalizedUsage, "mongodbatlas.system.fts.cpu.usage": Metrics.MongodbatlasSystemFtsCPUUsage, - "mongodbatlas.system.fts.disk.utilization": Metrics.MongodbatlasSystemFtsDiskUtilization, + "mongodbatlas.system.fts.disk.used": Metrics.MongodbatlasSystemFtsDiskUsed, "mongodbatlas.system.fts.memory.usage": Metrics.MongodbatlasSystemFtsMemoryUsage, "mongodbatlas.system.memory.usage": Metrics.MongodbatlasSystemMemoryUsage, "mongodbatlas.system.network.io": Metrics.MongodbatlasSystemNetworkIo, @@ -228,7 +219,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.db.counts") metric.SetDescription("Database feature size") - metric.SetUnit("1") + metric.SetUnit("{objects}") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -237,7 +228,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.db.size") metric.SetDescription("Database feature size") - metric.SetUnit("1") + metric.SetUnit("By") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -246,7 +237,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.disk.partition.iops") metric.SetDescription("Disk partition iops") - metric.SetUnit("1") + metric.SetUnit("{ops}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -255,7 +246,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.disk.partition.latency") metric.SetDescription("Disk partition latency") - metric.SetUnit("1") + metric.SetUnit("ms") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -264,7 +255,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.disk.partition.space") metric.SetDescription("Disk partition space") - metric.SetUnit("1") + metric.SetUnit("By") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -272,7 +263,7 @@ var Metrics = &metricStruct{ "mongodbatlas.disk.partition.utilization", func(metric pdata.Metric) { metric.SetName("mongodbatlas.disk.partition.utilization") - metric.SetDescription("Disk partition utilization") + metric.SetDescription("Disk partition utilization (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, @@ -282,7 +273,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.asserts") metric.SetDescription("Number of assertions") - metric.SetUnit("1") + metric.SetUnit("{assertions}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -299,8 +290,8 @@ var Metrics = &metricStruct{ "mongodbatlas.process.cache.io", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.cache.io") - metric.SetDescription("Cache throughput") - metric.SetUnit("1") + metric.SetDescription("Cache throughput (per second)") + metric.SetUnit("By") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -309,7 +300,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.cache.size") metric.SetDescription("Cache sizes") - metric.SetUnit("1") + metric.SetUnit("By") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -318,7 +309,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.connections") metric.SetDescription("Number of current connections") - metric.SetUnit("1") + metric.SetUnit("{connections}") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -335,7 +326,7 @@ var Metrics = &metricStruct{ "mongodbatlas.process.cpu.children.usage", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.cpu.children.usage") - metric.SetDescription("CPU Usage for child processes") + metric.SetDescription("CPU Usage for child processes (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, @@ -353,7 +344,7 @@ var Metrics = &metricStruct{ "mongodbatlas.process.cpu.usage", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.cpu.usage") - metric.SetDescription("CPU Usage") + metric.SetDescription("CPU Usage (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, @@ -363,7 +354,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.cursors") metric.SetDescription("Number of cursors") - metric.SetUnit("1") + metric.SetUnit("{cursors}") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -372,7 +363,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.db.document.rate") metric.SetDescription("Document access rates") - metric.SetUnit("1") + metric.SetUnit("{documents}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -380,8 +371,8 @@ var Metrics = &metricStruct{ "mongodbatlas.process.db.operations.rate", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.db.operations.rate") - metric.SetDescription("FIXME") - metric.SetUnit("1") + metric.SetDescription("DB Operation Rates") + metric.SetUnit("{operations}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -389,9 +380,11 @@ var Metrics = &metricStruct{ "mongodbatlas.process.db.operations.time", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.db.operations.time") - metric.SetDescription("FIXME") - metric.SetUnit("1") - metric.SetDataType(pdata.MetricDataTypeGauge) + metric.SetDescription("DB Operation Times") + metric.SetUnit("ms") + metric.SetDataType(pdata.MetricDataTypeSum) + metric.Sum().SetIsMonotonic(true) + metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative) }, }, &metricImpl{ @@ -399,7 +392,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.db.query_executor.scanned") metric.SetDescription("Scanned objects") - metric.SetUnit("1") + metric.SetUnit("{objects}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -408,7 +401,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.db.query_targeting.scanned_per_returned") metric.SetDescription("Scanned objects per returned") - metric.SetUnit("1") + metric.SetUnit("{scanned}/{returned}") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -416,17 +409,8 @@ var Metrics = &metricStruct{ "mongodbatlas.process.db.storage", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.db.storage") - metric.SetDescription("FIXME") - metric.SetUnit("1") - metric.SetDataType(pdata.MetricDataTypeGauge) - }, - }, - &metricImpl{ - "mongodbatlas.process.fts.cpu.normalized.usage", - func(metric pdata.Metric) { - metric.SetName("mongodbatlas.process.fts.cpu.normalized.usage") - metric.SetDescription("Full text search CPU, normalized to pct") - metric.SetUnit("1") + metric.SetDescription("Storage used by the database") + metric.SetUnit("By") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -434,25 +418,7 @@ var Metrics = &metricStruct{ "mongodbatlas.process.fts.cpu.usage", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.fts.cpu.usage") - metric.SetDescription("Full text search CPU") - metric.SetUnit("1") - metric.SetDataType(pdata.MetricDataTypeGauge) - }, - }, - &metricImpl{ - "mongodbatlas.process.fts.disk.usage", - func(metric pdata.Metric) { - metric.SetName("mongodbatlas.process.fts.disk.usage") - metric.SetDescription("Full text search disk usage") - metric.SetUnit("1") - metric.SetDataType(pdata.MetricDataTypeGauge) - }, - }, - &metricImpl{ - "mongodbatlas.process.fts.memory.usage", - func(metric pdata.Metric) { - metric.SetName("mongodbatlas.process.fts.memory.usage") - metric.SetDescription("Full text search memory usage") + metric.SetDescription("Full text search CPU (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, @@ -462,7 +428,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.global_lock") metric.SetDescription("Number and status of locks") - metric.SetUnit("1") + metric.SetUnit("{locks}") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -470,7 +436,7 @@ var Metrics = &metricStruct{ "mongodbatlas.process.index.btree_miss_ratio", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.index.btree_miss_ratio") - metric.SetDescription("Index miss ratio") + metric.SetDescription("Index miss ratio (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, @@ -480,7 +446,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.index.counters") metric.SetDescription("Indexes") - metric.SetUnit("1") + metric.SetUnit("{indexes}") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -489,7 +455,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.journaling.commits") metric.SetDescription("Journaling commits") - metric.SetUnit("1") + metric.SetUnit("{commits}") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -498,7 +464,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.journaling.data_files") metric.SetDescription("Data file sizes") - metric.SetUnit("1") + metric.SetUnit("MiBy") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -507,7 +473,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.journaling.written") metric.SetDescription("Journals written") - metric.SetUnit("1") + metric.SetUnit("MiBy") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -516,7 +482,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.memory.usage") metric.SetDescription("Memory Usage") - metric.SetUnit("1") + metric.SetUnit("By") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -525,7 +491,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.network.io") metric.SetDescription("Network IO") - metric.SetUnit("1") + metric.SetUnit("By/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -534,8 +500,10 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.network.requests") metric.SetDescription("Network requests") - metric.SetUnit("1") - metric.SetDataType(pdata.MetricDataTypeGauge) + metric.SetUnit("{requests}") + metric.SetDataType(pdata.MetricDataTypeSum) + metric.Sum().SetIsMonotonic(true) + metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative) }, }, &metricImpl{ @@ -543,7 +511,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.oplog.rate") metric.SetDescription("Execution rate by operation") - metric.SetUnit("1") + metric.SetUnit("GiBy/h") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -552,7 +520,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.oplog.time") metric.SetDescription("Execution time by operation") - metric.SetUnit("1") + metric.SetUnit("s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -561,7 +529,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.page_faults") metric.SetDescription("Page faults") - metric.SetUnit("1") + metric.SetUnit("{faults}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -570,7 +538,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.restarts") metric.SetDescription("Restarts in last hour") - metric.SetUnit("1") + metric.SetUnit("{restarts}/h") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -579,7 +547,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.tickets") metric.SetDescription("Tickets") - metric.SetUnit("1") + metric.SetUnit("{tickets}") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -596,7 +564,7 @@ var Metrics = &metricStruct{ "mongodbatlas.system.cpu.usage", func(metric pdata.Metric) { metric.SetName("mongodbatlas.system.cpu.usage") - metric.SetDescription("System CPU Usage") + metric.SetDescription("System CPU Usage (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, @@ -605,7 +573,7 @@ var Metrics = &metricStruct{ "mongodbatlas.system.fts.cpu.normalized.usage", func(metric pdata.Metric) { metric.SetName("mongodbatlas.system.fts.cpu.normalized.usage") - metric.SetDescription("Full text search disk usage") + metric.SetDescription("Full text search disk usage (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, @@ -614,17 +582,17 @@ var Metrics = &metricStruct{ "mongodbatlas.system.fts.cpu.usage", func(metric pdata.Metric) { metric.SetName("mongodbatlas.system.fts.cpu.usage") - metric.SetDescription("Full-text search") + metric.SetDescription("Full-text search (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.system.fts.disk.utilization", + "mongodbatlas.system.fts.disk.used", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.system.fts.disk.utilization") + metric.SetName("mongodbatlas.system.fts.disk.used") metric.SetDescription("Full text search disk usage") - metric.SetUnit("1") + metric.SetUnit("By") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -633,8 +601,10 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.system.fts.memory.usage") metric.SetDescription("Full-text search") - metric.SetUnit("1") - metric.SetDataType(pdata.MetricDataTypeGauge) + metric.SetUnit("MiBy") + metric.SetDataType(pdata.MetricDataTypeSum) + metric.Sum().SetIsMonotonic(true) + metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative) }, }, &metricImpl{ @@ -642,7 +612,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.system.memory.usage") metric.SetDescription("System Memory Usage") - metric.SetUnit("1") + metric.SetUnit("KiBy") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -651,7 +621,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.system.network.io") metric.SetDescription("System Network IO") - metric.SetUnit("1") + metric.SetUnit("By/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -660,7 +630,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.system.paging.io") metric.SetDescription("Swap IO") - metric.SetUnit("1") + metric.SetUnit("{pages}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -669,7 +639,7 @@ var Metrics = &metricStruct{ func(metric pdata.Metric) { metric.SetName("mongodbatlas.system.paging.usage") metric.SetDescription("Swap usage") - metric.SetUnit("1") + metric.SetUnit("KiBy") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, @@ -681,8 +651,331 @@ var M = Metrics // Labels contains the possible metric labels that can be used. var Labels = struct { -}{} + // Aggregation (Method used by MongoDB to pre-aggregate metrics) + Aggregation string + // AssertType (MongoDB assertion type) + AssertType string + // BtreeCounterType (Database index effectiveness) + BtreeCounterType string + // CacheDirection (Whether read into or written from) + CacheDirection string + // CacheStatus (Cache status) + CacheStatus string + // ClusterRole (Whether process is acting as replica or primary) + ClusterRole string + // CPUState (CPU state) + CPUState string + // CursorState (Whether cursor is open or timed out) + CursorState string + // Direction (Network traffic direction) + Direction string + // DiskDirection (Measurement type for disk operation) + DiskDirection string + // DiskStatus (Disk measurement type) + DiskStatus string + // DocumentStatus (Status of documents in the database) + DocumentStatus string + // ExecutionType (Type of command) + ExecutionType string + // GlobalLockState (Which queue is locked) + GlobalLockState string + // MemoryIssueType (Type of memory issue encountered) + MemoryIssueType string + // MemoryState (Memory usage type) + MemoryState string + // ObjectType (MongoDB object type) + ObjectType string + // Operation (Type of database operation) + Operation string + // OplogType (Oplog type) + OplogType string + // ScannedType (Objects or indexes scanned during query) + ScannedType string + // StorageStatus (Views on database size) + StorageStatus string + // TicketType (Type of ticket available) + TicketType string +}{ + "aggregation", + "assert_type", + "btree_counter_type", + "cache_direction", + "cache_status", + "cluster_role", + "cpu_state", + "cursor_state", + "direction", + "disk_direction", + "disk_status", + "document_status", + "execution_type", + "global_lock_state", + "memory_issue_type", + "memory_state", + "object_type", + "operation", + "oplog_type", + "scanned_type", + "storage_status", + "ticket_type", +} // L contains the possible metric labels that can be used. L is an alias for // Labels. var L = Labels + +// LabelAggregation are the possible values that the label "aggregation" can have. +var LabelAggregation = struct { + Max string + Avg string +}{ + "max", + "avg", +} + +// LabelAssertType are the possible values that the label "assert_type" can have. +var LabelAssertType = struct { + Regular string + Warning string + Msg string + User string +}{ + "regular", + "warning", + "msg", + "user", +} + +// LabelBtreeCounterType are the possible values that the label "btree_counter_type" can have. +var LabelBtreeCounterType = struct { + Accesses string + Hits string + Misses string +}{ + "accesses", + "hits", + "misses", +} + +// LabelCacheDirection are the possible values that the label "cache_direction" can have. +var LabelCacheDirection = struct { + ReadInto string + WrittenFrom string +}{ + "read_into", + "written_from", +} + +// LabelCacheStatus are the possible values that the label "cache_status" can have. +var LabelCacheStatus = struct { + Dirty string + Used string +}{ + "dirty", + "used", +} + +// LabelClusterRole are the possible values that the label "cluster_role" can have. +var LabelClusterRole = struct { + Primary string + Replica string +}{ + "primary", + "replica", +} + +// LabelCPUState are the possible values that the label "cpu_state" can have. +var LabelCPUState = struct { + Kernel string + User string + Nice string + Iowait string + Irq string + Softirq string + Guest string + Steal string +}{ + "kernel", + "user", + "nice", + "iowait", + "irq", + "softirq", + "guest", + "steal", +} + +// LabelCursorState are the possible values that the label "cursor_state" can have. +var LabelCursorState = struct { + TimedOut string + Open string +}{ + "timed_out", + "open", +} + +// LabelDirection are the possible values that the label "direction" can have. +var LabelDirection = struct { + Receive string + Transmit string +}{ + "receive", + "transmit", +} + +// LabelDiskDirection are the possible values that the label "disk_direction" can have. +var LabelDiskDirection = struct { + Read string + Write string + Total string +}{ + "read", + "write", + "total", +} + +// LabelDiskStatus are the possible values that the label "disk_status" can have. +var LabelDiskStatus = struct { + Free string + Used string +}{ + "free", + "used", +} + +// LabelDocumentStatus are the possible values that the label "document_status" can have. +var LabelDocumentStatus = struct { + Returned string + Inserted string + Updated string + Deleted string +}{ + "returned", + "inserted", + "updated", + "deleted", +} + +// LabelExecutionType are the possible values that the label "execution_type" can have. +var LabelExecutionType = struct { + Reads string + Writes string + Commands string +}{ + "reads", + "writes", + "commands", +} + +// LabelGlobalLockState are the possible values that the label "global_lock_state" can have. +var LabelGlobalLockState = struct { + CurrentQueueTotal string + CurrentQueueReaders string + CurrentQueueWriters string +}{ + "current_queue_total", + "current_queue_readers", + "current_queue_writers", +} + +// LabelMemoryIssueType are the possible values that the label "memory_issue_type" can have. +var LabelMemoryIssueType = struct { + ExtraInfo string + GlobalAccessesNotInMemory string + ExceptionsThrown string +}{ + "extra_info", + "global_accesses_not_in_memory", + "exceptions_thrown", +} + +// LabelMemoryState are the possible values that the label "memory_state" can have. +var LabelMemoryState = struct { + Resident string + Virtual string + Mapped string + Computed string +}{ + "resident", + "virtual", + "mapped", + "computed", +} + +// LabelObjectType are the possible values that the label "object_type" can have. +var LabelObjectType = struct { + Collection string + Index string + Extent string + Object string + View string + Storage string + Data string +}{ + "collection", + "index", + "extent", + "object", + "view", + "storage", + "data", +} + +// LabelOperation are the possible values that the label "operation" can have. +var LabelOperation = struct { + Cmd string + Query string + Update string + Delete string + Getmore string + Insert string +}{ + "cmd", + "query", + "update", + "delete", + "getmore", + "insert", +} + +// LabelOplogType are the possible values that the label "oplog_type" can have. +var LabelOplogType = struct { + SlaveLagMasterTime string + MasterTime string + MasterLagTimeDiff string +}{ + "slave_lag_master_time", + "master_time", + "master_lag_time_diff", +} + +// LabelScannedType are the possible values that the label "scanned_type" can have. +var LabelScannedType = struct { + IndexItems string + Objects string +}{ + "index_items", + "objects", +} + +// LabelStorageStatus are the possible values that the label "storage_status" can have. +var LabelStorageStatus = struct { + Total string + DataSize string + IndexSize string + DataSizeWoSystem string +}{ + "total", + "data_size", + "index_size", + "data_size_wo_system", +} + +// LabelTicketType are the possible values that the label "ticket_type" can have. +var LabelTicketType = struct { + AvailableReads string + AvailableWrites string +}{ + "available_reads", + "available_writes", +} diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go index 3116636c0972..48a3909ad20d 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go @@ -16,7 +16,6 @@ package metadata import ( "fmt" - "strings" "time" "go.mongodb.org/atlas/mongodbatlas" @@ -32,104 +31,104 @@ var metricNameMapping = map[string]metricMappingData{ // MongoDB CPU usage. For hosts with more than one CPU core, these values can exceed 100%. "PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, "PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, "PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, "PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, // MongoDB CPU usage scaled to a range of 0% to 100%. Atlas computes this value by dividing by the number of CPU cores. "PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, "PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, // Context: Process "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, // Rate of asserts for a MongoDB process found in the asserts document that the serverStatus command generates. "ASSERT_REGULAR": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("regular"), + "assert_type": pdata.NewAttributeValueString("regular"), }}, "ASSERT_WARNING": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("warning"), + "assert_type": pdata.NewAttributeValueString("warning"), }}, "ASSERT_MSG": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("msg"), + "assert_type": pdata.NewAttributeValueString("msg"), }}, "ASSERT_USER": {"mongodbatlas.process.asserts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("user"), + "assert_type": pdata.NewAttributeValueString("user"), }}, // Amount of data flushed in the background. @@ -139,27 +138,27 @@ var metricNameMapping = map[string]metricMappingData{ // Amount of bytes in the WiredTiger storage engine cache and tickets found in the wiredTiger.cache and wiredTiger.concurrentTransactions documents that the serverStatus command generates. "CACHE_BYTES_READ_INTO": {"mongodbatlas.process.cache.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read_into"), + "cache_direction": pdata.NewAttributeValueString("read_into"), }}, "CACHE_BYTES_WRITTEN_FROM": {"mongodbatlas.process.cache.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("written_from"), + "cache_direction": pdata.NewAttributeValueString("written_from"), }}, "CACHE_DIRTY_BYTES": {"mongodbatlas.process.cache.size", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("dirty"), + "cache_status": pdata.NewAttributeValueString("dirty"), }}, "CACHE_USED_BYTES": {"mongodbatlas.process.cache.size", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), + "cache_status": pdata.NewAttributeValueString("used"), }}, "TICKETS_AVAILABLE_READS": {"mongodbatlas.process.tickets", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("available_reads"), + "ticket_type": pdata.NewAttributeValueString("available_reads"), }}, "TICKETS_AVAILABLE_WRITE": {"mongodbatlas.process.tickets", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("available_writes"), + "ticket_type": pdata.NewAttributeValueString("available_writes"), }}, // Number of connections to a MongoDB process found in the connections document that the serverStatus command generates. @@ -167,68 +166,66 @@ var metricNameMapping = map[string]metricMappingData{ // Number of cursors for a MongoDB process found in the metrics.cursor document that the serverStatus command generates. "CURSORS_TOTAL_OPEN": {"mongodbatlas.process.cursors", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("open"), + "cursor_state": pdata.NewAttributeValueString("open"), }}, "CURSORS_TOTAL_TIMED_OUT": {"mongodbatlas.process.cursors", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("timed_out"), + "cursor_state": pdata.NewAttributeValueString("timed_out"), }}, // Numbers of Memory Issues and Page Faults for a MongoDB process. "EXTRA_INFO_PAGE_FAULTS": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("extra_info"), + "memory_issue_type": pdata.NewAttributeValueString("extra_info"), }}, "GLOBAL_ACCESSES_NOT_IN_MEMORY": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("global_accesses_not_in_memory"), + "memory_issue_type": pdata.NewAttributeValueString("global_accesses_not_in_memory"), }}, "GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN": {"mongodbatlas.process.page_faults", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("exceptions_thrown"), + "memory_issue_type": pdata.NewAttributeValueString("exceptions_thrown"), }}, // Number of operations waiting on locks for the MongoDB process that the serverStatus command generates. Cloud Manager computes these values based on the type of storage engine. "GLOBAL_LOCK_CURRENT_QUEUE_TOTAL": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("current_queue_total"), + "global_lock_state": pdata.NewAttributeValueString("current_queue_total"), }}, "GLOBAL_LOCK_CURRENT_QUEUE_READERS": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("current_queue_readers"), + "global_lock_state": pdata.NewAttributeValueString("current_queue_readers"), }}, "GLOBAL_LOCK_CURRENT_QUEUE_WRITERS": {"mongodbatlas.process.global_lock", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("current_queue_writers"), + "global_lock_state": pdata.NewAttributeValueString("current_queue_writers"), }}, // Number of index btree operations. "INDEX_COUNTERS_BTREE_ACCESSES": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("btree_accesses"), + "btree_counter_type": pdata.NewAttributeValueString("accesses"), }}, "INDEX_COUNTERS_BTREE_HITS": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("btree_hits"), + "btree_counter_type": pdata.NewAttributeValueString("hits"), }}, "INDEX_COUNTERS_BTREE_MISSES": {"mongodbatlas.process.index.counters", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("btree_misses"), + "btree_counter_type": pdata.NewAttributeValueString("misses"), }}, "INDEX_COUNTERS_BTREE_MISS_RATIO": {"mongodbatlas.process.index.btree_miss_ratio", map[string]pdata.AttributeValue{}}, // Number of journaling operations. - "JOURNALING_COMMITS_IN_WRITE_LOCK": {"mongodbatlas.process.journaling.commits", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("in_write_lock"), - }}, - "JOURNALING_MB": {"mongodbatlas.process.journaling.written", map[string]pdata.AttributeValue{}}, - "JOURNALING_WRITE_DATA_FILES_MB": {"mongodbatlas.process.journaling.data_files", map[string]pdata.AttributeValue{}}, + "JOURNALING_COMMITS_IN_WRITE_LOCK": {"mongodbatlas.process.journaling.commits", map[string]pdata.AttributeValue{}}, + "JOURNALING_MB": {"mongodbatlas.process.journaling.written", map[string]pdata.AttributeValue{}}, + "JOURNALING_WRITE_DATA_FILES_MB": {"mongodbatlas.process.journaling.data_files", map[string]pdata.AttributeValue{}}, // Amount of memory for a MongoDB process found in the mem document that the serverStatus command collects. "MEMORY_RESIDENT": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("resident"), + "memory_state": pdata.NewAttributeValueString("resident"), }}, "MEMORY_VIRTUAL": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("virtual"), + "memory_state": pdata.NewAttributeValueString("virtual"), }}, "MEMORY_MAPPED": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("mapped"), + "memory_state": pdata.NewAttributeValueString("mapped"), }}, "COMPUTED_MEMORY": {"mongodbatlas.process.memory.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("computed"), + "memory_state": pdata.NewAttributeValueString("computed"), }}, // Amount of throughput for MongoDB process found in the network document that the serverStatus command collects. @@ -243,32 +240,30 @@ var metricNameMapping = map[string]metricMappingData{ // Durations and throughput of the MongoDB process' oplog. "OPLOG_SLAVE_LAG_MASTER_TIME": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("slave_lag_master_time"), + "oplog_type": pdata.NewAttributeValueString("slave_lag_master_time"), }}, "OPLOG_MASTER_TIME": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("master_time"), + "oplog_type": pdata.NewAttributeValueString("master_time"), }}, "OPLOG_MASTER_LAG_TIME_DIFF": {"mongodbatlas.process.oplog.time", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("master_lag_time_diff"), - }}, - "OPLOG_RATE_GB_PER_HOUR": {"mongodbatlas.process.oplog.rate", map[string]pdata.AttributeValue{ - "aggregation": pdata.NewAttributeValueString("hour"), + "oplog_type": pdata.NewAttributeValueString("master_lag_time_diff"), }}, + "OPLOG_RATE_GB_PER_HOUR": {"mongodbatlas.process.oplog.rate", map[string]pdata.AttributeValue{}}, // Number of database operations on a MongoDB process since the process last started. "DB_STORAGE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("total"), + "storage_status": pdata.NewAttributeValueString("total"), }}, "DB_DATA_SIZE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("data_size_total"), + "storage_status": pdata.NewAttributeValueString("data_size"), }}, "DB_INDEX_SIZE_TOTAL": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("index_size_total"), + "storage_status": pdata.NewAttributeValueString("index_size"), }}, "DB_DATA_SIZE_TOTAL_WO_SYSTEM": {"mongodbatlas.process.db.storage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("data_size_total_wo_system"), + "storage_status": pdata.NewAttributeValueString("data_size_wo_system"), }}, // Rate of database operations on a MongoDB process since the process last started found in the opcounters document that the serverStatus command collects. @@ -317,16 +312,16 @@ var metricNameMapping = map[string]metricMappingData{ // Average rate of documents returned, inserted, updated, or deleted per second during a selected time period. "DOCUMENT_METRICS_RETURNED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("returned"), + "document_status": pdata.NewAttributeValueString("returned"), }}, "DOCUMENT_METRICS_INSERTED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("inserted"), + "document_status": pdata.NewAttributeValueString("inserted"), }}, "DOCUMENT_METRICS_UPDATED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("updated"), + "document_status": pdata.NewAttributeValueString("updated"), }}, "DOCUMENT_METRICS_DELETED": {"mongodbatlas.process.db.document.rate", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("deleted"), + "document_status": pdata.NewAttributeValueString("deleted"), }}, // Average rate for operations per second during a selected time period that perform a sort but cannot perform the sort using an index. @@ -336,220 +331,217 @@ var metricNameMapping = map[string]metricMappingData{ // Average execution time in milliseconds per read, write, or command operation during a selected time period. "OP_EXECUTION_TIME_READS": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("reads"), + "execution_type": pdata.NewAttributeValueString("reads"), }}, "OP_EXECUTION_TIME_WRITES": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("writes"), + "execution_type": pdata.NewAttributeValueString("writes"), }}, "OP_EXECUTION_TIME_COMMANDS": {"mongodbatlas.process.db.operations.time", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("commands"), + "execution_type": pdata.NewAttributeValueString("commands"), }}, // Number of times the host restarted within the previous hour. - "RESTARTS_IN_LAST_HOUR": {"mongodbatlas.process.restarts", map[string]pdata.AttributeValue{ - "span": pdata.NewAttributeValueString("hour"), - }}, + "RESTARTS_IN_LAST_HOUR": {"mongodbatlas.process.restarts", map[string]pdata.AttributeValue{}}, // Average rate per second to scan index items during queries and query-plan evaluations found in the value of totalKeysExamined from the explain command. "QUERY_EXECUTOR_SCANNED": {"mongodbatlas.process.db.query_executor.scanned", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("index items"), + "scanned_type": pdata.NewAttributeValueString("index_items"), }}, // Average rate of documents scanned per second during queries and query-plan evaluations found in the value of totalDocsExamined from the explain command. "QUERY_EXECUTOR_SCANNED_OBJECTS": {"mongodbatlas.process.db.query_executor.scanned", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("objects"), + "scanned_type": pdata.NewAttributeValueString("objects"), }}, // Ratio of the number of index items scanned to the number of documents returned. "QUERY_TARGETING_SCANNED_PER_RETURNED": {"mongodbatlas.process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("index items"), + "scanned_type": pdata.NewAttributeValueString("index_items"), }}, // Ratio of the number of documents scanned to the number of documents returned. "QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED": {"mongodbatlas.process.db.query_targeting.scanned_per_returned", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("objects"), + "scanned_type": pdata.NewAttributeValueString("objects"), }}, // CPU usage of processes on the host. For hosts with more than one CPU core, this value can exceed 100%. "SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("nice"), + "cpu_state": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("nice"), + "cpu_state": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("iowait"), + "cpu_state": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("iowait"), + "cpu_state": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("irq"), + "cpu_state": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("irq"), + "cpu_state": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("softirq"), + "cpu_state": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("softirq"), + "cpu_state": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("guest"), + "cpu_state": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("guest"), + "cpu_state": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("steal"), + "cpu_state": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("steal"), + "cpu_state": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("max"), }}, // CPU usage of processes on the host scaled to a range of 0 to 100% by dividing by the number of CPU cores. "SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), "aggregation": pdata.NewAttributeValueString("max"), }}, "MAX_SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("nice"), + "cpu_state": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("nice"), + "cpu_state": pdata.NewAttributeValueString("nice"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("iowait"), + "cpu_state": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("iowait"), + "cpu_state": pdata.NewAttributeValueString("iowait"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("irq"), + "cpu_state": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("irq"), + "cpu_state": pdata.NewAttributeValueString("irq"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("softirq"), + "cpu_state": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("softirq"), + "cpu_state": pdata.NewAttributeValueString("softirq"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("guest"), + "cpu_state": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("guest"), + "cpu_state": pdata.NewAttributeValueString("guest"), "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("steal"), + "cpu_state": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("steal"), + "cpu_state": pdata.NewAttributeValueString("steal"), "aggregation": pdata.NewAttributeValueString("max"), }}, - // Physical memory usage, in bytes, that the host uses. "SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("available"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_status": pdata.NewAttributeValueString("available"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("available"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_status": pdata.NewAttributeValueString("available"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("buffers"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_status": pdata.NewAttributeValueString("buffers"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("buffers"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_status": pdata.NewAttributeValueString("buffers"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("cached"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_status": pdata.NewAttributeValueString("cached"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("cached"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_status": pdata.NewAttributeValueString("cached"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_status": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("shared"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_status": pdata.NewAttributeValueString("shared"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("shared"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_status": pdata.NewAttributeValueString("shared"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_status": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("max"), }}, // Average rate of physical bytes per second that the eth0 network interface received and transmitted. @@ -572,20 +564,20 @@ var metricNameMapping = map[string]metricMappingData{ // Total amount of memory that swap uses. "SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_state": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_state": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_state": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_state": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("max"), }}, // Total amount of memory written and read from swap. @@ -608,68 +600,66 @@ var metricNameMapping = map[string]metricMappingData{ // Memory usage, in bytes, that Atlas Search processes use. "FTS_PROCESS_RESIDENT_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("resident"), + "memory_state": pdata.NewAttributeValueString("resident"), }}, "FTS_PROCESS_VIRTUAL_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("virtual"), + "memory_state": pdata.NewAttributeValueString("virtual"), }}, "FTS_PROCESS_SHARED_MEMORY": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("shared"), + "memory_state": pdata.NewAttributeValueString("shared"), }}, "FTS_MEMORY_MAPPED": {"mongodbatlas.system.fts.memory.usage", map[string]pdata.AttributeValue{ - "state": pdata.NewAttributeValueString("mapped"), + "memory_state": pdata.NewAttributeValueString("mapped"), }}, // Disk space, in bytes, that Atlas Search indexes use. - "FTS_DISK_USAGE": {"mongodbatlas.system.fts.disk.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - }}, + "FTS_DISK_USAGE": {"mongodbatlas.system.fts.disk.used", map[string]pdata.AttributeValue{}}, // Percentage of CPU that Atlas Search processes use. "FTS_PROCESS_CPU_USER": {"mongodbatlas.system.fts.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), }}, "FTS_PROCESS_CPU_KERNEL": {"mongodbatlas.system.fts.cpu.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, "FTS_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("user"), + "cpu_state": pdata.NewAttributeValueString("user"), }}, "FTS_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.fts.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("kernel"), + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, // Process Disk Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) // Measures throughput of I/O operations for the disk partition used for MongoDB. "DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read"), - "aggregation": pdata.NewAttributeValueString("avg"), + "disk_direction": pdata.NewAttributeValueString("read"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read"), - "aggregation": pdata.NewAttributeValueString("max"), + "disk_direction": pdata.NewAttributeValueString("read"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("write"), - "aggregation": pdata.NewAttributeValueString("avg"), + "disk_direction": pdata.NewAttributeValueString("write"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("write"), - "aggregation": pdata.NewAttributeValueString("max"), + "disk_direction": pdata.NewAttributeValueString("write"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("total"), - "aggregation": pdata.NewAttributeValueString("avg"), + "disk_direction": pdata.NewAttributeValueString("total"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("total"), - "aggregation": pdata.NewAttributeValueString("max"), + "disk_direction": pdata.NewAttributeValueString("total"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ @@ -683,90 +673,90 @@ var metricNameMapping = map[string]metricMappingData{ // The percentage of time during which requests are being issued to and serviced by the partition. // This includes requests from any process, not just MongoDB processes. "DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read"), - "aggregation": pdata.NewAttributeValueString("avg"), + "disk_direction": pdata.NewAttributeValueString("read"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("read"), - "aggregation": pdata.NewAttributeValueString("max"), + "disk_direction": pdata.NewAttributeValueString("read"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("write"), - "aggregation": pdata.NewAttributeValueString("avg"), + "disk_direction": pdata.NewAttributeValueString("write"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("write"), - "aggregation": pdata.NewAttributeValueString("max"), + "disk_direction": pdata.NewAttributeValueString("write"), + "aggregation": pdata.NewAttributeValueString("max"), }}, // Measures latency per operation type of the disk partition used by MongoDB. "DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_state": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_state": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_state": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_state": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_state": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_state": pdata.NewAttributeValueString("free"), + "aggregation": pdata.NewAttributeValueString("max"), }}, "DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("avg"), + "memory_state": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("avg"), }}, "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("max"), + "memory_state": pdata.NewAttributeValueString("used"), + "aggregation": pdata.NewAttributeValueString("max"), }}, // Process Database Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) "DATABASE_COLLECTION_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("collection"), + "object_type": pdata.NewAttributeValueString("collection"), }}, "DATABASE_INDEX_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("index"), + "object_type": pdata.NewAttributeValueString("index"), }}, "DATABASE_EXTENT_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("extent"), + "object_type": pdata.NewAttributeValueString("extent"), }}, "DATABASE_OBJECT_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("object"), + "object_type": pdata.NewAttributeValueString("object"), }}, "DATABASE_VIEW_COUNT": {"mongodbatlas.db.counts", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("view"), + "object_type": pdata.NewAttributeValueString("view"), }}, "DATABASE_AVERAGE_OBJECT_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("object"), + "object_type": pdata.NewAttributeValueString("object"), }}, "DATABASE_STORAGE_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("storage"), + "object_type": pdata.NewAttributeValueString("storage"), }}, "DATABASE_INDEX_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("index"), + "object_type": pdata.NewAttributeValueString("index"), }}, "DATABASE_DATA_SIZE": {"mongodbatlas.db.size", map[string]pdata.AttributeValue{ - "type": pdata.NewAttributeValueString("data"), + "object_type": pdata.NewAttributeValueString("data"), }}, } @@ -780,38 +770,10 @@ func mappedMetricByName(name string) (MetricIntf, map[string]pdata.AttributeValu return metricinf, info.attributes } -func inferMetricType(mongoType string) (pdata.MetricDataType, string) { - var dataType pdata.MetricDataType - switch mongoType { - case "BYTES", "MEGABYTES", "SECONDS", "KILOBYTES": - dataType = pdata.MetricDataTypeSum - default: - dataType = pdata.MetricDataTypeGauge - } - - return dataType, strings.ToLower(mongoType) -} - -func buildMetricIntf(meas *mongodbatlas.Measurements) MetricIntf { - metricType, metricUnits := inferMetricType(meas.Units) - metricName := fmt.Sprintf("mongodb.atlas.%s", strings.ToLower(meas.Name)) - return &metricImpl{ - metricName, - func(m pdata.Metric) { - m.SetDataType(metricType) - m.SetUnit(metricUnits) - }, - } -} - func MeasurementsToMetric(meas *mongodbatlas.Measurements, buildUnrecognized bool) (*pdata.Metric, error) { intf, attrs := mappedMetricByName(meas.Name) if intf == nil { - if buildUnrecognized { - intf = buildMetricIntf(meas) - } else { - return nil, nil // Not an error- simply skipping undocumented metrics - } + return nil, nil // Not an error- simply skipping undocumented metrics } m := pdata.NewMetric() intf.Init(m) diff --git a/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go b/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go index e5aa2e7fc23c..93179e564f10 100644 --- a/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go +++ b/receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go @@ -311,8 +311,7 @@ func (s *MongoDBAtlasClient) ProcessDatabaseMetrics( resolution, ) if err != nil { - s.log.Debug("Error retrieving database metrics from MongoDB Atlas API", zap.Error(err)) - break // Return partial results + return pdata.Metrics{}, err } pageNum++ allMeasurements = append(allMeasurements, measurements...) @@ -426,8 +425,7 @@ func (s *MongoDBAtlasClient) ProcessDiskMetrics( resolution, ) if err != nil { - s.log.Debug("Error retrieving process disk metrics from MongoDB Atlas API", zap.Error(err)) - break // Return partial results + return pdata.Metrics{}, err } pageNum++ allMeasurements = append(allMeasurements, measurements...) diff --git a/receiver/mongodbatlasreceiver/metadata.yaml b/receiver/mongodbatlasreceiver/metadata.yaml index a25499cf3be8..ffb68eaa7110 100644 --- a/receiver/mongodbatlasreceiver/metadata.yaml +++ b/receiver/mongodbatlasreceiver/metadata.yaml @@ -1,253 +1,470 @@ name: mongoatlasreceiver +labels: + cpu_state: + description: CPU state + enum: + - kernel + - user + - nice + - iowait + - irq + - softirq + - guest + - steal + aggregation: + description: Method used by MongoDB to pre-aggregate metrics + enum: + - max + - avg + assert_type: + description: MongoDB assertion type + enum: + - regular + - warning + - msg + - user + cache_direction: + description: Whether read into or written from + enum: + - read_into + - written_from + cache_status: + description: Cache status + enum: + - dirty + - used + ticket_type: + description: Type of ticket available + enum: + - available_reads + - available_writes + cursor_state: + description: Whether cursor is open or timed out + enum: + - timed_out + - open + memory_issue_type: + description: Type of memory issue encountered + enum: + - extra_info + - global_accesses_not_in_memory + - exceptions_thrown + global_lock_state: + description: Which queue is locked + enum: + - current_queue_total + - current_queue_readers + - current_queue_writers + btree_counter_type: + description: Database index effectiveness + enum: + - accesses + - hits + - misses + memory_state: + description: Memory usage type + enum: + - resident + - virtual + - mapped + - computed + direction: + description: Network traffic direction + enum: + - receive + - transmit + storage_status: + description: Views on database size + enum: + - total + - data_size + - index_size + - data_size_wo_system + operation: + description: Type of database operation + enum: + - cmd + - query + - update + - delete + - getmore + - insert + cluster_role: + description: Whether process is acting as replica or primary + enum: + - primary + - replica + document_status: + description: Status of documents in the database + enum: + - returned + - inserted + - updated + - deleted + execution_type: + description: Type of command + enum: + - reads + - writes + - commands + scanned_type: + description: Objects or indexes scanned during query + enum: + - index_items + - objects + disk_direction: + description: Measurement type for disk operation + enum: + - read + - write + - total + disk_status: + description: Disk measurement type + enum: + - free + - used + object_type: + description: MongoDB object type + enum: + - collection + - index + - extent + - object + - view + - storage + - data + oplog_type: + description: Oplog type + enum: + - slave_lag_master_time + - master_time + - master_lag_time_diff + metrics: mongodbatlas.process.asserts: description: Number of assertions - unit: 1 + extended_documentation: Aggregates MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING + unit: "{assertions}/s" + labels: [assert_type] data: type: gauge mongodbatlas.process.background_flush: description: Amount of data flushed in the background + extended_documentation: MongoDB Metric BACKGROUND_FLUSH_AVG unit: 1 data: type: gauge mongodbatlas.process.cache.io: - description: Cache throughput - unit: 1 + description: Cache throughput (per second) + extended_documentation: Aggregates MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM + unit: By + labels: [cache_direction] data: type: gauge mongodbatlas.process.cache.size: description: Cache sizes - unit: 1 + extended_documentation: Aggregates MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES + unit: By + labels: [cache_status] data: type: gauge mongodbatlas.process.connections: description: Number of current connections - unit: 1 + extended_documentation: MongoDB Metric CONNECTIONS + unit: "{connections}" data: type: gauge mongodbatlas.process.cpu.usage: - description: CPU Usage + description: CPU Usage (%) + extended_documentation: Aggregates MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER, MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER unit: 1 + labels: [cpu_state, aggregation] data: type: gauge mongodbatlas.process.cpu.children.usage: - description: CPU Usage for child processes + description: CPU Usage for child processes (%) + extended_documentation: Aggregates MongoDB Metrics MAX_PROCESS_CPU_CHILDREN_USER, MAX_PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_USER unit: 1 + labels: [cpu_state, aggregation] data: type: gauge mongodbatlas.process.cpu.children.normalized.usage: description: CPU Usage for child processes, normalized to pct + extended_documentation: Aggregates MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER unit: 1 + labels: [cpu_state, aggregation] data: type: gauge mongodbatlas.process.cpu.normalized.usage: description: CPU Usage, normalized to pct + extended_documentation: Aggregates MongoDB Metrics PROCESS_NORMALIZED_CPU_KERNEL, MAX_PROCESS_NORMALIZED_CPU_USER, PROCESS_NORMALIZED_CPU_USER, MAX_PROCESS_NORMALIZED_CPU_KERNEL unit: 1 + labels: [cpu_state, aggregation] data: type: gauge mongodbatlas.process.cursors: description: Number of cursors - unit: 1 + extended_documentation: Aggregates MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT + unit: "{cursors}" + labels: [cursor_state] data: type: gauge mongodbatlas.process.db.storage: - description: FIXME - unit: 1 + description: Storage used by the database + extended_documentation: Aggregates MongoDB Metrics DB_INDEX_SIZE_TOTAL, DB_DATA_SIZE_TOTAL_WO_SYSTEM, DB_STORAGE_TOTAL, DB_DATA_SIZE_TOTAL + unit: By + labels: [storage_status] data: type: gauge mongodbatlas.process.db.document.rate: description: Document access rates - unit: 1 + extended_documentation: Aggregates MongoDB Metrics DOCUMENT_METRICS_UPDATED, DOCUMENT_METRICS_DELETED, DOCUMENT_METRICS_RETURNED, DOCUMENT_METRICS_INSERTED + unit: "{documents}/s" + labels: [document_status] data: type: gauge mongodbatlas.process.fts.cpu.usage: - description: Full text search CPU - unit: 1 - data: - type: gauge - mongodbatlas.process.fts.cpu.normalized.usage: - description: Full text search CPU, normalized to pct - unit: 1 - data: - type: gauge - mongodbatlas.process.fts.disk.usage: - description: Full text search disk usage - unit: 1 - data: - type: gauge - mongodbatlas.process.fts.memory.usage: - description: Full text search memory usage + description: Full text search CPU (%) + extended_documentation: Aggregates MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL unit: 1 + labels: [cpu_state] data: type: gauge mongodbatlas.process.global_lock: description: Number and status of locks - unit: 1 + extended_documentation: Aggregates MongoDB Metrics GLOBAL_LOCK_CURRENT_QUEUE_WRITERS, GLOBAL_LOCK_CURRENT_QUEUE_READERS, GLOBAL_LOCK_CURRENT_QUEUE_TOTAL + unit: "{locks}" + labels: [global_lock_state] data: type: gauge mongodbatlas.process.index.btree_miss_ratio: - description: Index miss ratio + description: Index miss ratio (%) + extended_documentation: MongoDB Metric INDEX_COUNTERS_BTREE_MISS_RATIO unit: 1 data: type: gauge mongodbatlas.process.index.counters: description: Indexes - unit: 1 + extended_documentation: Aggregates MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS + unit: "{indexes}" + labels: [btree_counter_type] data: type: gauge mongodbatlas.process.journaling.commits: description: Journaling commits - unit: 1 + extended_documentation: MongoDB Metric JOURNALING_COMMITS_IN_WRITE_LOCK + unit: "{commits}" data: type: gauge mongodbatlas.process.journaling.data_files: description: Data file sizes - unit: 1 + extended_documentation: MongoDB Metric JOURNALING_WRITE_DATA_FILES_MB + unit: MiBy data: type: gauge mongodbatlas.process.journaling.written: description: Journals written - unit: 1 + extended_documentation: MongoDB Metric JOURNALING_MB + unit: MiBy data: type: gauge mongodbatlas.process.memory.usage: description: Memory Usage - unit: 1 + extended_documentation: Aggregates MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT + unit: By + labels: [memory_state] data: type: gauge mongodbatlas.process.network.io: description: Network IO - unit: 1 + extended_documentation: Aggregates MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN + unit: By/s + labels: [direction] data: type: gauge mongodbatlas.process.network.requests: description: Network requests - unit: 1 + extended_documentation: MongoDB Metric NETWORK_NUM_REQUESTS + unit: "{requests}" data: - type: gauge + type: sum + monotonic: true + aggregation: cumulative mongodbatlas.process.oplog.time: description: Execution time by operation - unit: 1 + extended_documentation: Aggregates MongoDB Metrics OPLOG_MASTER_TIME, OPLOG_SLAVE_LAG_MASTER_TIME, OPLOG_MASTER_LAG_TIME_DIFF + unit: s + labels: [oplog_type] data: type: gauge + monotonic: true + aggregation: cumulative mongodbatlas.process.oplog.rate: description: Execution rate by operation - unit: 1 + extended_documentation: MongoDB Metric OPLOG_RATE_GB_PER_HOUR + unit: GiBy/h data: type: gauge mongodbatlas.process.db.operations.rate: - description: FIXME - unit: 1 + description: DB Operation Rates + extended_documentation: Aggregates MongoDB Metrics OPCOUNTER_GETMORE, OPERATIONS_SCAN_AND_ORDER, OPCOUNTER_UPDATE, OPCOUNTER_REPL_UPDATE, OPCOUNTER_CMD, OPCOUNTER_DELETE, OPCOUNTER_REPL_DELETE, OPCOUNTER_REPL_CMD, OPCOUNTER_QUERY, OPCOUNTER_REPL_INSERT, OPCOUNTER_INSERT + unit: "{operations}/s" + labels: [operation, cluster_role] data: type: gauge mongodbatlas.process.db.operations.time: - description: FIXME - unit: 1 - data: - type: gauge + description: DB Operation Times + extended_documentation: Aggregates MongoDB Metrics OP_EXECUTION_TIME_WRITES, OP_EXECUTION_TIME_COMMANDS, OP_EXECUTION_TIME_READS + unit: ms + labels: [execution_type] + data: + type: sum + monotonic: true + aggregation: cumulative mongodbatlas.process.page_faults: description: Page faults - unit: 1 + extended_documentation: Aggregates MongoDB Metrics GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN, EXTRA_INFO_PAGE_FAULTS, GLOBAL_ACCESSES_NOT_IN_MEMORY + unit: "{faults}/s" + labels: [memory_issue_type] data: type: gauge mongodbatlas.process.db.query_executor.scanned: description: Scanned objects - unit: 1 + extended_documentation: Aggregates MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED + labels: [scanned_type] + unit: "{objects}/s" data: type: gauge mongodbatlas.process.db.query_targeting.scanned_per_returned: description: Scanned objects per returned - unit: 1 + extended_documentation: Aggregates MongoDB Metrics QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED, QUERY_TARGETING_SCANNED_PER_RETURNED + unit: "{scanned}/{returned}" + labels: [scanned_type] data: type: gauge mongodbatlas.process.restarts: description: Restarts in last hour - unit: 1 + extended_documentation: Aggregates MongoDB Metrics RESTARTS_IN_LAST_HOUR + unit: "{restarts}/h" data: type: gauge mongodbatlas.system.paging.usage: description: Swap usage - unit: 1 + extended_documentation: Aggregates MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED, SWAP_USAGE_FREE, SWAP_USAGE_USED + unit: KiBy + labels: [direction, aggregation] data: type: gauge mongodbatlas.system.paging.io: description: Swap IO - unit: 1 + extended_documentation: Aggregates MongoDB Metrics MAX_SWAP_IO_IN, SWAP_IO_IN, SWAP_IO_OUT, MAX_SWAP_IO_OUT + unit: "{pages}/s" + labels: [direction, aggregation] data: type: gauge mongodbatlas.system.cpu.usage: - description: System CPU Usage + description: System CPU Usage (%) + extended_documentation: Aggregates MongoDB Metrics SYSTEM_CPU_USER, MAX_SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_IRQ, MAX_SYSTEM_CPU_GUEST, MAX_SYSTEM_CPU_IOWAIT, SYSTEM_CPU_GUEST, SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_NICE, SYSTEM_CPU_IRQ, SYSTEM_CPU_KERNEL, SYSTEM_CPU_IOWAIT, SYSTEM_CPU_NICE, SYSTEM_CPU_STEAL, MAX_SYSTEM_CPU_KERNEL, MAX_SYSTEM_CPU_USER, MAX_SYSTEM_CPU_STEAL + labels: [cpu_state, aggregation] unit: 1 data: type: gauge mongodbatlas.system.memory.usage: description: System Memory Usage - unit: 1 + extended_documentation: Aggregates MongoDB Metrics SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_CACHED, MAX_SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_USED, SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_FREE, SYSTEM_MEMORY_USED, SYSTEM_MEMORY_CACHED, SYSTEM_MEMORY_SHARED, MAX_SYSTEM_MEMORY_SHARED, SYSTEM_MEMORY_FREE + unit: KiBy + labels: [memory_state, aggregation] data: type: gauge mongodbatlas.system.network.io: description: System Network IO - unit: 1 + extended_documentation: Aggregates MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN + unit: By/s + labels: [direction, aggregation] data: type: gauge mongodbatlas.system.cpu.normalized.usage: description: System CPU Normalized to pct + extended_documentation: Aggregates MongoDB Metrics MAX_SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_IRQ, MAX_SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_KERNEL, SYSTEM_NORMALIZED_CPU_STEAL, MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_STEAL, SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_KERNEL, MAX_SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_IRQ + labels: [cpu_state, aggregation] unit: 1 data: type: gauge mongodbatlas.process.tickets: description: Tickets - unit: 1 + extended_documentation: Aggregates MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS + unit: "{tickets}" + labels: [ticket_type] data: type: gauge mongodbatlas.disk.partition.iops: description: Disk partition iops - unit: 1 + extended_documentation: Aggregates MongoDB Metrics DISK_PARTITION_IOPS_READ, MAX_DISK_PARTITION_IOPS_WRITE, MAX_DISK_PARTITION_IOPS_TOTAL, DISK_PARTITION_IOPS_WRITE, DISK_PARTITION_IOPS_TOTAL, MAX_DISK_PARTITION_IOPS_READ + unit: "{ops}/s" + labels: [disk_direction, aggregation] data: type: gauge mongodbatlas.disk.partition.utilization: - description: Disk partition utilization + description: Disk partition utilization (%) + extended_documentation: Aggregates MongoDB Metrics MAX_DISK_PARTITION_SPACE_PERCENT_USED, DISK_PARTITION_SPACE_PERCENT_FREE, MAX_DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED, DISK_PARTITION_UTILIZATION, MAX_DISK_PARTITION_UTILIZATION unit: 1 + labels: [aggregation] data: type: gauge mongodbatlas.disk.partition.latency: description: Disk partition latency - unit: 1 + extended_documentation: Aggregates MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ, MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ + unit: ms + labels: [disk_direction, aggregation] data: type: gauge mongodbatlas.disk.partition.space: description: Disk partition space - unit: 1 + extended_documentation: Aggregates MongoDB Metrics DISK_PARTITION_SPACE_FREE, MAX_DISK_PARTITION_SPACE_USED, DISK_PARTITION_SPACE_USED, MAX_DISK_PARTITION_SPACE_FREE + unit: By + lables: [memory_state, aggregation] data: type: gauge mongodbatlas.db.size: description: Database feature size - unit: 1 + extended_documentation: Aggregates MongoDB Metrics DATABASE_DATA_SIZE, DATABASE_STORAGE_SIZE, DATABASE_INDEX_SIZE, DATABASE_AVERAGE_OBJECT_SIZE + unit: By + labels: [object_type] data: type: gauge mongodbatlas.db.counts: description: Database feature size - unit: 1 + extended_documentation: Aggregates MongoDB Metrics DATABASE_EXTENT_COUNT, DATABASE_VIEW_COUNT, DATABASE_COLLECTION_COUNT, DATABASE_OBJECT_COUNT, DATABASE_INDEX_COUNT + unit: "{objects}" + labels: [object_type] data: type: gauge mongodbatlas.system.fts.memory.usage: description: Full-text search - unit: 1 - data: - type: gauge - mongodbatlas.system.fts.disk.utilization: + extended_documentation: Aggregates MongoDB Metrics FTS_MEMORY_MAPPED, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY + unit: MiBy + labels: [memory_state] + data: + type: sum + monotonic: true + aggregation: cumulative + mongodbatlas.system.fts.disk.used: description: Full text search disk usage - unit: 1 + extended_documentation: MongoDB Metric FTS_DISK_USAGE + unit: By data: type: gauge mongodbatlas.system.fts.cpu.usage: - description: Full-text search + description: Full-text search (%) unit: 1 + labels: [cpu_state] data: type: gauge mongodbatlas.system.fts.cpu.normalized.usage: - description: Full text search disk usage + description: Full text search disk usage (%) + extended_documentation: Aggregates MongoDB Metrics FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL unit: 1 + labels: [cpu_state] data: type: gauge From e6a7ffe1daf24e1efc8bc59e66fa7dec942cb6d6 Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Thu, 4 Nov 2021 12:10:38 -0700 Subject: [PATCH 11/13] split avg and max metrics Also reworded extended_documentation field to clarify intent --- .../mongodbatlasreceiver/documentation.md | 133 +++--- .../internal/metadata/generated_metrics.go | 344 +++++++++++---- .../internal/metadata/metric_name_mapping.go | 398 +++++++----------- receiver/mongodbatlasreceiver/metadata.yaml | 245 ++++++++--- 4 files changed, 671 insertions(+), 449 deletions(-) diff --git a/receiver/mongodbatlasreceiver/documentation.md b/receiver/mongodbatlasreceiver/documentation.md index f4c0ff403db3..b2666f3174d7 100644 --- a/receiver/mongodbatlasreceiver/documentation.md +++ b/receiver/mongodbatlasreceiver/documentation.md @@ -8,57 +8,77 @@ These are the metrics available for this scraper. | Name | Description | Unit | Type | Attributes | | ---- | ----------- | ---- | ---- | ---------- | -| mongodbatlas.db.counts | Database feature size Aggregates MongoDB Metrics DATABASE_EXTENT_COUNT, DATABASE_VIEW_COUNT, DATABASE_COLLECTION_COUNT, DATABASE_OBJECT_COUNT, DATABASE_INDEX_COUNT | {objects} | Gauge |
    +| mongodbatlas.db.counts | Database feature size Aggregate of MongoDB Metrics DATABASE_EXTENT_COUNT, DATABASE_VIEW_COUNT, DATABASE_COLLECTION_COUNT, DATABASE_OBJECT_COUNT, DATABASE_INDEX_COUNT | {objects} | Gauge |
    • object_type
    | -| mongodbatlas.db.size | Database feature size Aggregates MongoDB Metrics DATABASE_DATA_SIZE, DATABASE_STORAGE_SIZE, DATABASE_INDEX_SIZE, DATABASE_AVERAGE_OBJECT_SIZE | By | Gauge |
      +| mongodbatlas.db.size | Database feature size Aggregate of MongoDB Metrics DATABASE_DATA_SIZE, DATABASE_STORAGE_SIZE, DATABASE_INDEX_SIZE, DATABASE_AVERAGE_OBJECT_SIZE | By | Gauge |
      • object_type
      | -| mongodbatlas.disk.partition.iops | Disk partition iops Aggregates MongoDB Metrics DISK_PARTITION_IOPS_READ, MAX_DISK_PARTITION_IOPS_WRITE, MAX_DISK_PARTITION_IOPS_TOTAL, DISK_PARTITION_IOPS_WRITE, DISK_PARTITION_IOPS_TOTAL, MAX_DISK_PARTITION_IOPS_READ | {ops}/s | Gauge |
        -
      • disk_direction
      • aggregation
      | -| mongodbatlas.disk.partition.latency | Disk partition latency Aggregates MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ, MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ | ms | Gauge |
        -
      • disk_direction
      • aggregation
      | -| mongodbatlas.disk.partition.space | Disk partition space Aggregates MongoDB Metrics DISK_PARTITION_SPACE_FREE, MAX_DISK_PARTITION_SPACE_USED, DISK_PARTITION_SPACE_USED, MAX_DISK_PARTITION_SPACE_FREE | By | Gauge |
        +| mongodbatlas.disk.partition.iops.average | Disk partition iops Aggregate of MongoDB Metrics DISK_PARTITION_IOPS_READ, DISK_PARTITION_IOPS_WRITE, DISK_PARTITION_IOPS_TOTAL | {ops}/s | Gauge |
          +
        • disk_direction
        | +| mongodbatlas.disk.partition.iops.max | Disk partition iops Aggregate of MongoDB Metrics MAX_DISK_PARTITION_IOPS_WRITE, MAX_DISK_PARTITION_IOPS_TOTAL, MAX_DISK_PARTITION_IOPS_READ | {ops}/s | Gauge |
          +
        • disk_direction
        | +| mongodbatlas.disk.partition.latency.average | Disk partition latency Aggregate of MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ | ms | Gauge |
          +
        • disk_direction
        | +| mongodbatlas.disk.partition.latency.max | Disk partition latency Aggregate of MongoDB Metrics MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ | ms | Gauge |
          +
        • disk_direction
        | +| mongodbatlas.disk.partition.space.average | Disk partition space Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED | By | Gauge |
        | -| mongodbatlas.disk.partition.utilization | Disk partition utilization (%) Aggregates MongoDB Metrics MAX_DISK_PARTITION_SPACE_PERCENT_USED, DISK_PARTITION_SPACE_PERCENT_FREE, MAX_DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED, DISK_PARTITION_UTILIZATION, MAX_DISK_PARTITION_UTILIZATION | 1 | Gauge |
          -
        • aggregation
        | -| mongodbatlas.process.asserts | Number of assertions Aggregates MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING | {assertions}/s | Gauge |
          +| mongodbatlas.disk.partition.space.max | Disk partition space Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED | By | Gauge |
            +
          | +| mongodbatlas.disk.partition.usage.average | Disk partition usage (%) Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED | 1 | Gauge |
            +
          • disk_status
          | +| mongodbatlas.disk.partition.usage.max | Disk partition usage (%) Aggregate of MongoDB Metrics MAX_DISK_PARTITION_SPACE_PERCENT_USED, MAX_DISK_PARTITION_SPACE_PERCENT_FREE | 1 | Gauge |
            +
          • disk_status
          | +| mongodbatlas.disk.partition.utilization.average | Disk partition utilization (%) MongoDB Metrics DISK_PARTITION_UTILIZATION | 1 | Gauge |
            +
          | +| mongodbatlas.disk.partition.utilization.max | Disk partition utilization (%) MongoDB Metrics MAX_DISK_PARTITION_UTILIZATION | 1 | Gauge |
            +
          | +| mongodbatlas.process.asserts | Number of assertions Aggregate of MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING | {assertions}/s | Gauge |
          • assert_type
          | | mongodbatlas.process.background_flush | Amount of data flushed in the background MongoDB Metric BACKGROUND_FLUSH_AVG | 1 | Gauge |
          | -| mongodbatlas.process.cache.io | Cache throughput (per second) Aggregates MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM | By | Gauge |
            +| mongodbatlas.process.cache.io | Cache throughput (per second) Aggregate of MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM | By | Gauge |
            • cache_direction
            | -| mongodbatlas.process.cache.size | Cache sizes Aggregates MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES | By | Gauge |
              +| mongodbatlas.process.cache.size | Cache sizes Aggregate of MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES | By | Gauge |
              • cache_status
              | | mongodbatlas.process.connections | Number of current connections MongoDB Metric CONNECTIONS | {connections} | Gauge |
              | -| mongodbatlas.process.cpu.children.normalized.usage | CPU Usage for child processes, normalized to pct Aggregates MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
                -
              • cpu_state
              • aggregation
              | -| mongodbatlas.process.cpu.children.usage | CPU Usage for child processes (%) Aggregates MongoDB Metrics MAX_PROCESS_CPU_CHILDREN_USER, MAX_PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_USER | 1 | Gauge |
                -
              • cpu_state
              • aggregation
              | -| mongodbatlas.process.cpu.normalized.usage | CPU Usage, normalized to pct Aggregates MongoDB Metrics PROCESS_NORMALIZED_CPU_KERNEL, MAX_PROCESS_NORMALIZED_CPU_USER, PROCESS_NORMALIZED_CPU_USER, MAX_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
                -
              • cpu_state
              • aggregation
              | -| mongodbatlas.process.cpu.usage | CPU Usage (%) Aggregates MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER, MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER | 1 | Gauge |
                -
              • cpu_state
              • aggregation
              | -| mongodbatlas.process.cursors | Number of cursors Aggregates MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT | {cursors} | Gauge |
                +| mongodbatlas.process.cpu.children.normalized.usage.average | CPU Usage for child processes, normalized to pct Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
                  +
                • cpu_state
                | +| mongodbatlas.process.cpu.children.normalized.usage.max | CPU Usage for child processes, normalized to pct Aggregate of MongoDB Metrics MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
                  +
                • cpu_state
                | +| mongodbatlas.process.cpu.children.usage.average | CPU Usage for child processes (%) Aggregate of MongoDB Metrics PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_USER | 1 | Gauge |
                  +
                • cpu_state
                | +| mongodbatlas.process.cpu.children.usage.max | CPU Usage for child processes (%) Aggregate of MongoDB Metrics MAX_PROCESS_CPU_CHILDREN_USER, MAX_PROCESS_CPU_CHILDREN_KERNEL | 1 | Gauge |
                  +
                • cpu_state
                | +| mongodbatlas.process.cpu.normalized.usage.average | CPU Usage, normalized to pct Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_KERNEL, PROCESS_NORMALIZED_CPU_USER | 1 | Gauge |
                  +
                • cpu_state
                | +| mongodbatlas.process.cpu.normalized.usage.max | CPU Usage, normalized to pct Aggregate of MongoDB Metrics MAX_PROCESS_NORMALIZED_CPU_USER, MAX_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
                  +
                • cpu_state
                | +| mongodbatlas.process.cpu.usage.average | CPU Usage (%) Aggregate of MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER | 1 | Gauge |
                  +
                • cpu_state
                | +| mongodbatlas.process.cpu.usage.max | CPU Usage (%) Aggregate of MongoDB Metrics MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER | 1 | Gauge |
                  +
                • cpu_state
                | +| mongodbatlas.process.cursors | Number of cursors Aggregate of MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT | {cursors} | Gauge |
                • cursor_state
                | -| mongodbatlas.process.db.document.rate | Document access rates Aggregates MongoDB Metrics DOCUMENT_METRICS_UPDATED, DOCUMENT_METRICS_DELETED, DOCUMENT_METRICS_RETURNED, DOCUMENT_METRICS_INSERTED | {documents}/s | Gauge |
                  +| mongodbatlas.process.db.document.rate | Document access rates Aggregate of MongoDB Metrics DOCUMENT_METRICS_UPDATED, DOCUMENT_METRICS_DELETED, DOCUMENT_METRICS_RETURNED, DOCUMENT_METRICS_INSERTED | {documents}/s | Gauge |
                  • document_status
                  | -| mongodbatlas.process.db.operations.rate | DB Operation Rates Aggregates MongoDB Metrics OPCOUNTER_GETMORE, OPERATIONS_SCAN_AND_ORDER, OPCOUNTER_UPDATE, OPCOUNTER_REPL_UPDATE, OPCOUNTER_CMD, OPCOUNTER_DELETE, OPCOUNTER_REPL_DELETE, OPCOUNTER_REPL_CMD, OPCOUNTER_QUERY, OPCOUNTER_REPL_INSERT, OPCOUNTER_INSERT | {operations}/s | Gauge |
                    +| mongodbatlas.process.db.operations.rate | DB Operation Rates Aggregate of MongoDB Metrics OPCOUNTER_GETMORE, OPERATIONS_SCAN_AND_ORDER, OPCOUNTER_UPDATE, OPCOUNTER_REPL_UPDATE, OPCOUNTER_CMD, OPCOUNTER_DELETE, OPCOUNTER_REPL_DELETE, OPCOUNTER_REPL_CMD, OPCOUNTER_QUERY, OPCOUNTER_REPL_INSERT, OPCOUNTER_INSERT | {operations}/s | Gauge |
                    • operation
                    • cluster_role
                    | -| mongodbatlas.process.db.operations.time | DB Operation Times Aggregates MongoDB Metrics OP_EXECUTION_TIME_WRITES, OP_EXECUTION_TIME_COMMANDS, OP_EXECUTION_TIME_READS | ms | Sum |
                      +| mongodbatlas.process.db.operations.time | DB Operation Times Aggregate of MongoDB Metrics OP_EXECUTION_TIME_WRITES, OP_EXECUTION_TIME_COMMANDS, OP_EXECUTION_TIME_READS | ms | Sum |
                      • execution_type
                      | -| mongodbatlas.process.db.query_executor.scanned | Scanned objects Aggregates MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED | {objects}/s | Gauge |
                        +| mongodbatlas.process.db.query_executor.scanned | Scanned objects Aggregate of MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED | {objects}/s | Gauge |
                        • scanned_type
                        | -| mongodbatlas.process.db.query_targeting.scanned_per_returned | Scanned objects per returned Aggregates MongoDB Metrics QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED, QUERY_TARGETING_SCANNED_PER_RETURNED | {scanned}/{returned} | Gauge |
                          +| mongodbatlas.process.db.query_targeting.scanned_per_returned | Scanned objects per returned Aggregate of MongoDB Metrics QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED, QUERY_TARGETING_SCANNED_PER_RETURNED | {scanned}/{returned} | Gauge |
                          • scanned_type
                          | -| mongodbatlas.process.db.storage | Storage used by the database Aggregates MongoDB Metrics DB_INDEX_SIZE_TOTAL, DB_DATA_SIZE_TOTAL_WO_SYSTEM, DB_STORAGE_TOTAL, DB_DATA_SIZE_TOTAL | By | Gauge |
                            +| mongodbatlas.process.db.storage | Storage used by the database Aggregate of MongoDB Metrics DB_INDEX_SIZE_TOTAL, DB_DATA_SIZE_TOTAL_WO_SYSTEM, DB_STORAGE_TOTAL, DB_DATA_SIZE_TOTAL | By | Gauge |
                            • storage_status
                            | -| mongodbatlas.process.fts.cpu.usage | Full text search CPU (%) Aggregates MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL | 1 | Gauge |
                              +| mongodbatlas.process.fts.cpu.usage | Full text search CPU (%) Aggregate of MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL | 1 | Gauge |
                              • cpu_state
                              | -| mongodbatlas.process.global_lock | Number and status of locks Aggregates MongoDB Metrics GLOBAL_LOCK_CURRENT_QUEUE_WRITERS, GLOBAL_LOCK_CURRENT_QUEUE_READERS, GLOBAL_LOCK_CURRENT_QUEUE_TOTAL | {locks} | Gauge |
                                +| mongodbatlas.process.global_lock | Number and status of locks Aggregate of MongoDB Metrics GLOBAL_LOCK_CURRENT_QUEUE_WRITERS, GLOBAL_LOCK_CURRENT_QUEUE_READERS, GLOBAL_LOCK_CURRENT_QUEUE_TOTAL | {locks} | Gauge |
                                • global_lock_state
                                | | mongodbatlas.process.index.btree_miss_ratio | Index miss ratio (%) MongoDB Metric INDEX_COUNTERS_BTREE_MISS_RATIO | 1 | Gauge |
                                | -| mongodbatlas.process.index.counters | Indexes Aggregates MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS | {indexes} | Gauge |
                                  +| mongodbatlas.process.index.counters | Indexes Aggregate of MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS | {indexes} | Gauge |
                                  • btree_counter_type
                                  | | mongodbatlas.process.journaling.commits | Journaling commits MongoDB Metric JOURNALING_COMMITS_IN_WRITE_LOCK | {commits} | Gauge |
                                  | @@ -66,47 +86,58 @@ These are the metrics available for this scraper.
                                | | mongodbatlas.process.journaling.written | Journals written MongoDB Metric JOURNALING_MB | MiBy | Gauge |
                                | -| mongodbatlas.process.memory.usage | Memory Usage Aggregates MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT | By | Gauge |
                                  +| mongodbatlas.process.memory.usage | Memory Usage Aggregate of MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT | By | Gauge |
                                  • memory_state
                                  | -| mongodbatlas.process.network.io | Network IO Aggregates MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN | By/s | Gauge |
                                    +| mongodbatlas.process.network.io | Network IO Aggregate of MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN | By/s | Gauge |
                                    • direction
                                    | | mongodbatlas.process.network.requests | Network requests MongoDB Metric NETWORK_NUM_REQUESTS | {requests} | Sum |
                                    | | mongodbatlas.process.oplog.rate | Execution rate by operation MongoDB Metric OPLOG_RATE_GB_PER_HOUR | GiBy/h | Gauge |
                                    | -| mongodbatlas.process.oplog.time | Execution time by operation Aggregates MongoDB Metrics OPLOG_MASTER_TIME, OPLOG_SLAVE_LAG_MASTER_TIME, OPLOG_MASTER_LAG_TIME_DIFF | s | Gauge |
                                      +| mongodbatlas.process.oplog.time | Execution time by operation Aggregate of MongoDB Metrics OPLOG_MASTER_TIME, OPLOG_SLAVE_LAG_MASTER_TIME, OPLOG_MASTER_LAG_TIME_DIFF | s | Gauge |
                                      • oplog_type
                                      | -| mongodbatlas.process.page_faults | Page faults Aggregates MongoDB Metrics GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN, EXTRA_INFO_PAGE_FAULTS, GLOBAL_ACCESSES_NOT_IN_MEMORY | {faults}/s | Gauge |
                                        +| mongodbatlas.process.page_faults | Page faults Aggregate of MongoDB Metrics GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN, EXTRA_INFO_PAGE_FAULTS, GLOBAL_ACCESSES_NOT_IN_MEMORY | {faults}/s | Gauge |
                                        • memory_issue_type
                                        | -| mongodbatlas.process.restarts | Restarts in last hour Aggregates MongoDB Metrics RESTARTS_IN_LAST_HOUR | {restarts}/h | Gauge |
                                          +| mongodbatlas.process.restarts | Restarts in last hour Aggregate of MongoDB Metrics RESTARTS_IN_LAST_HOUR | {restarts}/h | Gauge |
                                          | -| mongodbatlas.process.tickets | Tickets Aggregates MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS | {tickets} | Gauge |
                                            +| mongodbatlas.process.tickets | Tickets Aggregate of MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS | {tickets} | Gauge |
                                            • ticket_type
                                            | -| mongodbatlas.system.cpu.normalized.usage | System CPU Normalized to pct Aggregates MongoDB Metrics MAX_SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_IRQ, MAX_SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_KERNEL, SYSTEM_NORMALIZED_CPU_STEAL, MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_STEAL, SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_KERNEL, MAX_SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_IRQ | 1 | Gauge |
                                              -
                                            • cpu_state
                                            • aggregation
                                            | -| mongodbatlas.system.cpu.usage | System CPU Usage (%) Aggregates MongoDB Metrics SYSTEM_CPU_USER, MAX_SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_IRQ, MAX_SYSTEM_CPU_GUEST, MAX_SYSTEM_CPU_IOWAIT, SYSTEM_CPU_GUEST, SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_NICE, SYSTEM_CPU_IRQ, SYSTEM_CPU_KERNEL, SYSTEM_CPU_IOWAIT, SYSTEM_CPU_NICE, SYSTEM_CPU_STEAL, MAX_SYSTEM_CPU_KERNEL, MAX_SYSTEM_CPU_USER, MAX_SYSTEM_CPU_STEAL | 1 | Gauge |
                                              -
                                            • cpu_state
                                            • aggregation
                                            | -| mongodbatlas.system.fts.cpu.normalized.usage | Full text search disk usage (%) Aggregates MongoDB Metrics FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
                                              +| mongodbatlas.system.cpu.normalized.usage.average | System CPU Normalized to pct Aggregate of MongoDB Metrics SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_IRQ, SYSTEM_NORMALIZED_CPU_KERNEL, SYSTEM_NORMALIZED_CPU_STEAL, SYSTEM_NORMALIZED_CPU_SOFTIRQ, SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_USER | 1 | Gauge |
                                                +
                                              • cpu_state
                                              | +| mongodbatlas.system.cpu.normalized.usage.max | System CPU Normalized to pct Aggregate of MongoDB Metrics MAX_SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_NICE, MAX_SYSTEM_NORMALIZED_CPU_IOWAIT, MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_STEAL, MAX_SYSTEM_NORMALIZED_CPU_KERNEL, MAX_SYSTEM_NORMALIZED_CPU_GUEST, MAX_SYSTEM_NORMALIZED_CPU_IRQ | 1 | Gauge |
                                                +
                                              • cpu_state
                                              | +| mongodbatlas.system.cpu.usage.average | System CPU Usage (%) Aggregate of MongoDB Metrics SYSTEM_CPU_USER, SYSTEM_CPU_GUEST, SYSTEM_CPU_SOFTIRQ, SYSTEM_CPU_IRQ, SYSTEM_CPU_KERNEL, SYSTEM_CPU_IOWAIT, SYSTEM_CPU_NICE, SYSTEM_CPU_STEAL | 1 | Gauge |
                                                +
                                              • cpu_state
                                              | +| mongodbatlas.system.cpu.usage.max | System CPU Usage (%) Aggregate of MongoDB Metrics MAX_SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_IRQ, MAX_SYSTEM_CPU_GUEST, MAX_SYSTEM_CPU_IOWAIT, MAX_SYSTEM_CPU_NICE, MAX_SYSTEM_CPU_KERNEL, MAX_SYSTEM_CPU_USER, MAX_SYSTEM_CPU_STEAL | 1 | Gauge |
                                                +
                                              • cpu_state
                                              | +| mongodbatlas.system.fts.cpu.normalized.usage | Full text search disk usage (%) Aggregate of MongoDB Metrics FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
                                              • cpu_state
                                              | | mongodbatlas.system.fts.cpu.usage | Full-text search (%) | 1 | Gauge |
                                              • cpu_state
                                              | | mongodbatlas.system.fts.disk.used | Full text search disk usage MongoDB Metric FTS_DISK_USAGE | By | Gauge |
                                              | -| mongodbatlas.system.fts.memory.usage | Full-text search Aggregates MongoDB Metrics FTS_MEMORY_MAPPED, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY | MiBy | Sum |
                                                +| mongodbatlas.system.fts.memory.usage | Full-text search Aggregate of MongoDB Metrics FTS_MEMORY_MAPPED, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY | MiBy | Sum |
                                                • memory_state
                                                | -| mongodbatlas.system.memory.usage | System Memory Usage Aggregates MongoDB Metrics SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_CACHED, MAX_SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_USED, SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_FREE, SYSTEM_MEMORY_USED, SYSTEM_MEMORY_CACHED, SYSTEM_MEMORY_SHARED, MAX_SYSTEM_MEMORY_SHARED, SYSTEM_MEMORY_FREE | KiBy | Gauge |
                                                  -
                                                • memory_state
                                                • aggregation
                                                | -| mongodbatlas.system.network.io | System Network IO Aggregates MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN | By/s | Gauge |
                                                  -
                                                • direction
                                                • aggregation
                                                | -| mongodbatlas.system.paging.io | Swap IO Aggregates MongoDB Metrics MAX_SWAP_IO_IN, SWAP_IO_IN, SWAP_IO_OUT, MAX_SWAP_IO_OUT | {pages}/s | Gauge |
                                                  -
                                                • direction
                                                • aggregation
                                                | -| mongodbatlas.system.paging.usage | Swap usage Aggregates MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED, SWAP_USAGE_FREE, SWAP_USAGE_USED | KiBy | Gauge |
                                                  -
                                                • direction
                                                • aggregation
                                                | +| mongodbatlas.system.memory.usage.average | System Memory Usage Aggregate of MongoDB Metrics SYSTEM_MEMORY_AVAILABLE, SYSTEM_MEMORY_BUFFERS, SYSTEM_MEMORY_USED, SYSTEM_MEMORY_CACHED, SYSTEM_MEMORY_SHARED, SYSTEM_MEMORY_FREE | KiBy | Gauge |
                                                  +
                                                • memory_state
                                                | +| mongodbatlas.system.memory.usage.max | System Memory Usage Aggregate of MongoDB Metrics MAX_SYSTEM_MEMORY_CACHED, MAX_SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_USED, MAX_SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_FREE, MAX_SYSTEM_MEMORY_SHARED | KiBy | Gauge |
                                                  +
                                                • memory_state
                                                | +| mongodbatlas.system.network.io.average | System Network IO Aggregate of MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT | By/s | Gauge |
                                                  +
                                                • direction
                                                | +| mongodbatlas.system.network.io.max | System Network IO Aggregate of MongoDB Metrics MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN | By/s | Gauge |
                                                  +
                                                • direction
                                                | +| mongodbatlas.system.paging.io.average | Swap IO Aggregate of MongoDB Metrics SWAP_IO_IN, SWAP_IO_OUT | {pages}/s | Gauge |
                                                  +
                                                • direction
                                                | +| mongodbatlas.system.paging.io.max | Swap IO Aggregate of MongoDB Metrics MAX_SWAP_IO_IN, MAX_SWAP_IO_OUT | {pages}/s | Gauge |
                                                  +
                                                • direction
                                                | +| mongodbatlas.system.paging.usage.average | Swap usage Aggregate of MongoDB Metrics SWAP_USAGE_FREE, SWAP_USAGE_USED | KiBy | Gauge |
                                                  +
                                                • direction
                                                | +| mongodbatlas.system.paging.usage.max | Swap usage Aggregate of MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED | KiBy | Gauge |
                                                  +
                                                • direction
                                                | ## Attributes | Name | Description | | ---- | ----------- | -| aggregation | Method used by MongoDB to pre-aggregate metrics | | assert_type | MongoDB assertion type | | btree_counter_type | Database index effectiveness | | cache_direction | Whether read into or written from | diff --git a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go index b7f18dabb3d5..aef9ab2bd324 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go @@ -57,19 +57,29 @@ func (m *metricImpl) Init(metric pdata.Metric) { type metricStruct struct { MongodbatlasDbCounts MetricIntf MongodbatlasDbSize MetricIntf - MongodbatlasDiskPartitionIops MetricIntf - MongodbatlasDiskPartitionLatency MetricIntf - MongodbatlasDiskPartitionSpace MetricIntf - MongodbatlasDiskPartitionUtilization MetricIntf + MongodbatlasDiskPartitionIopsAverage MetricIntf + MongodbatlasDiskPartitionIopsMax MetricIntf + MongodbatlasDiskPartitionLatencyAverage MetricIntf + MongodbatlasDiskPartitionLatencyMax MetricIntf + MongodbatlasDiskPartitionSpaceAverage MetricIntf + MongodbatlasDiskPartitionSpaceMax MetricIntf + MongodbatlasDiskPartitionUsageAverage MetricIntf + MongodbatlasDiskPartitionUsageMax MetricIntf + MongodbatlasDiskPartitionUtilizationAverage MetricIntf + MongodbatlasDiskPartitionUtilizationMax MetricIntf MongodbatlasProcessAsserts MetricIntf MongodbatlasProcessBackgroundFlush MetricIntf MongodbatlasProcessCacheIo MetricIntf MongodbatlasProcessCacheSize MetricIntf MongodbatlasProcessConnections MetricIntf - MongodbatlasProcessCPUChildrenNormalizedUsage MetricIntf - MongodbatlasProcessCPUChildrenUsage MetricIntf - MongodbatlasProcessCPUNormalizedUsage MetricIntf - MongodbatlasProcessCPUUsage MetricIntf + MongodbatlasProcessCPUChildrenNormalizedUsageAverage MetricIntf + MongodbatlasProcessCPUChildrenNormalizedUsageMax MetricIntf + MongodbatlasProcessCPUChildrenUsageAverage MetricIntf + MongodbatlasProcessCPUChildrenUsageMax MetricIntf + MongodbatlasProcessCPUNormalizedUsageAverage MetricIntf + MongodbatlasProcessCPUNormalizedUsageMax MetricIntf + MongodbatlasProcessCPUUsageAverage MetricIntf + MongodbatlasProcessCPUUsageMax MetricIntf MongodbatlasProcessCursors MetricIntf MongodbatlasProcessDbDocumentRate MetricIntf MongodbatlasProcessDbOperationsRate MetricIntf @@ -92,16 +102,22 @@ type metricStruct struct { MongodbatlasProcessPageFaults MetricIntf MongodbatlasProcessRestarts MetricIntf MongodbatlasProcessTickets MetricIntf - MongodbatlasSystemCPUNormalizedUsage MetricIntf - MongodbatlasSystemCPUUsage MetricIntf + MongodbatlasSystemCPUNormalizedUsageAverage MetricIntf + MongodbatlasSystemCPUNormalizedUsageMax MetricIntf + MongodbatlasSystemCPUUsageAverage MetricIntf + MongodbatlasSystemCPUUsageMax MetricIntf MongodbatlasSystemFtsCPUNormalizedUsage MetricIntf MongodbatlasSystemFtsCPUUsage MetricIntf MongodbatlasSystemFtsDiskUsed MetricIntf MongodbatlasSystemFtsMemoryUsage MetricIntf - MongodbatlasSystemMemoryUsage MetricIntf - MongodbatlasSystemNetworkIo MetricIntf - MongodbatlasSystemPagingIo MetricIntf - MongodbatlasSystemPagingUsage MetricIntf + MongodbatlasSystemMemoryUsageAverage MetricIntf + MongodbatlasSystemMemoryUsageMax MetricIntf + MongodbatlasSystemNetworkIoAverage MetricIntf + MongodbatlasSystemNetworkIoMax MetricIntf + MongodbatlasSystemPagingIoAverage MetricIntf + MongodbatlasSystemPagingIoMax MetricIntf + MongodbatlasSystemPagingUsageAverage MetricIntf + MongodbatlasSystemPagingUsageMax MetricIntf } // Names returns a list of all the metric name strings. @@ -109,19 +125,29 @@ func (m *metricStruct) Names() []string { return []string{ "mongodbatlas.db.counts", "mongodbatlas.db.size", - "mongodbatlas.disk.partition.iops", - "mongodbatlas.disk.partition.latency", - "mongodbatlas.disk.partition.space", - "mongodbatlas.disk.partition.utilization", + "mongodbatlas.disk.partition.iops.average", + "mongodbatlas.disk.partition.iops.max", + "mongodbatlas.disk.partition.latency.average", + "mongodbatlas.disk.partition.latency.max", + "mongodbatlas.disk.partition.space.average", + "mongodbatlas.disk.partition.space.max", + "mongodbatlas.disk.partition.usage.average", + "mongodbatlas.disk.partition.usage.max", + "mongodbatlas.disk.partition.utilization.average", + "mongodbatlas.disk.partition.utilization.max", "mongodbatlas.process.asserts", "mongodbatlas.process.background_flush", "mongodbatlas.process.cache.io", "mongodbatlas.process.cache.size", "mongodbatlas.process.connections", - "mongodbatlas.process.cpu.children.normalized.usage", - "mongodbatlas.process.cpu.children.usage", - "mongodbatlas.process.cpu.normalized.usage", - "mongodbatlas.process.cpu.usage", + "mongodbatlas.process.cpu.children.normalized.usage.average", + "mongodbatlas.process.cpu.children.normalized.usage.max", + "mongodbatlas.process.cpu.children.usage.average", + "mongodbatlas.process.cpu.children.usage.max", + "mongodbatlas.process.cpu.normalized.usage.average", + "mongodbatlas.process.cpu.normalized.usage.max", + "mongodbatlas.process.cpu.usage.average", + "mongodbatlas.process.cpu.usage.max", "mongodbatlas.process.cursors", "mongodbatlas.process.db.document.rate", "mongodbatlas.process.db.operations.rate", @@ -144,35 +170,51 @@ func (m *metricStruct) Names() []string { "mongodbatlas.process.page_faults", "mongodbatlas.process.restarts", "mongodbatlas.process.tickets", - "mongodbatlas.system.cpu.normalized.usage", - "mongodbatlas.system.cpu.usage", + "mongodbatlas.system.cpu.normalized.usage.average", + "mongodbatlas.system.cpu.normalized.usage.max", + "mongodbatlas.system.cpu.usage.average", + "mongodbatlas.system.cpu.usage.max", "mongodbatlas.system.fts.cpu.normalized.usage", "mongodbatlas.system.fts.cpu.usage", "mongodbatlas.system.fts.disk.used", "mongodbatlas.system.fts.memory.usage", - "mongodbatlas.system.memory.usage", - "mongodbatlas.system.network.io", - "mongodbatlas.system.paging.io", - "mongodbatlas.system.paging.usage", + "mongodbatlas.system.memory.usage.average", + "mongodbatlas.system.memory.usage.max", + "mongodbatlas.system.network.io.average", + "mongodbatlas.system.network.io.max", + "mongodbatlas.system.paging.io.average", + "mongodbatlas.system.paging.io.max", + "mongodbatlas.system.paging.usage.average", + "mongodbatlas.system.paging.usage.max", } } var metricsByName = map[string]MetricIntf{ "mongodbatlas.db.counts": Metrics.MongodbatlasDbCounts, "mongodbatlas.db.size": Metrics.MongodbatlasDbSize, - "mongodbatlas.disk.partition.iops": Metrics.MongodbatlasDiskPartitionIops, - "mongodbatlas.disk.partition.latency": Metrics.MongodbatlasDiskPartitionLatency, - "mongodbatlas.disk.partition.space": Metrics.MongodbatlasDiskPartitionSpace, - "mongodbatlas.disk.partition.utilization": Metrics.MongodbatlasDiskPartitionUtilization, + "mongodbatlas.disk.partition.iops.average": Metrics.MongodbatlasDiskPartitionIopsAverage, + "mongodbatlas.disk.partition.iops.max": Metrics.MongodbatlasDiskPartitionIopsMax, + "mongodbatlas.disk.partition.latency.average": Metrics.MongodbatlasDiskPartitionLatencyAverage, + "mongodbatlas.disk.partition.latency.max": Metrics.MongodbatlasDiskPartitionLatencyMax, + "mongodbatlas.disk.partition.space.average": Metrics.MongodbatlasDiskPartitionSpaceAverage, + "mongodbatlas.disk.partition.space.max": Metrics.MongodbatlasDiskPartitionSpaceMax, + "mongodbatlas.disk.partition.usage.average": Metrics.MongodbatlasDiskPartitionUsageAverage, + "mongodbatlas.disk.partition.usage.max": Metrics.MongodbatlasDiskPartitionUsageMax, + "mongodbatlas.disk.partition.utilization.average": Metrics.MongodbatlasDiskPartitionUtilizationAverage, + "mongodbatlas.disk.partition.utilization.max": Metrics.MongodbatlasDiskPartitionUtilizationMax, "mongodbatlas.process.asserts": Metrics.MongodbatlasProcessAsserts, "mongodbatlas.process.background_flush": Metrics.MongodbatlasProcessBackgroundFlush, "mongodbatlas.process.cache.io": Metrics.MongodbatlasProcessCacheIo, "mongodbatlas.process.cache.size": Metrics.MongodbatlasProcessCacheSize, "mongodbatlas.process.connections": Metrics.MongodbatlasProcessConnections, - "mongodbatlas.process.cpu.children.normalized.usage": Metrics.MongodbatlasProcessCPUChildrenNormalizedUsage, - "mongodbatlas.process.cpu.children.usage": Metrics.MongodbatlasProcessCPUChildrenUsage, - "mongodbatlas.process.cpu.normalized.usage": Metrics.MongodbatlasProcessCPUNormalizedUsage, - "mongodbatlas.process.cpu.usage": Metrics.MongodbatlasProcessCPUUsage, + "mongodbatlas.process.cpu.children.normalized.usage.average": Metrics.MongodbatlasProcessCPUChildrenNormalizedUsageAverage, + "mongodbatlas.process.cpu.children.normalized.usage.max": Metrics.MongodbatlasProcessCPUChildrenNormalizedUsageMax, + "mongodbatlas.process.cpu.children.usage.average": Metrics.MongodbatlasProcessCPUChildrenUsageAverage, + "mongodbatlas.process.cpu.children.usage.max": Metrics.MongodbatlasProcessCPUChildrenUsageMax, + "mongodbatlas.process.cpu.normalized.usage.average": Metrics.MongodbatlasProcessCPUNormalizedUsageAverage, + "mongodbatlas.process.cpu.normalized.usage.max": Metrics.MongodbatlasProcessCPUNormalizedUsageMax, + "mongodbatlas.process.cpu.usage.average": Metrics.MongodbatlasProcessCPUUsageAverage, + "mongodbatlas.process.cpu.usage.max": Metrics.MongodbatlasProcessCPUUsageMax, "mongodbatlas.process.cursors": Metrics.MongodbatlasProcessCursors, "mongodbatlas.process.db.document.rate": Metrics.MongodbatlasProcessDbDocumentRate, "mongodbatlas.process.db.operations.rate": Metrics.MongodbatlasProcessDbOperationsRate, @@ -195,16 +237,22 @@ var metricsByName = map[string]MetricIntf{ "mongodbatlas.process.page_faults": Metrics.MongodbatlasProcessPageFaults, "mongodbatlas.process.restarts": Metrics.MongodbatlasProcessRestarts, "mongodbatlas.process.tickets": Metrics.MongodbatlasProcessTickets, - "mongodbatlas.system.cpu.normalized.usage": Metrics.MongodbatlasSystemCPUNormalizedUsage, - "mongodbatlas.system.cpu.usage": Metrics.MongodbatlasSystemCPUUsage, + "mongodbatlas.system.cpu.normalized.usage.average": Metrics.MongodbatlasSystemCPUNormalizedUsageAverage, + "mongodbatlas.system.cpu.normalized.usage.max": Metrics.MongodbatlasSystemCPUNormalizedUsageMax, + "mongodbatlas.system.cpu.usage.average": Metrics.MongodbatlasSystemCPUUsageAverage, + "mongodbatlas.system.cpu.usage.max": Metrics.MongodbatlasSystemCPUUsageMax, "mongodbatlas.system.fts.cpu.normalized.usage": Metrics.MongodbatlasSystemFtsCPUNormalizedUsage, "mongodbatlas.system.fts.cpu.usage": Metrics.MongodbatlasSystemFtsCPUUsage, "mongodbatlas.system.fts.disk.used": Metrics.MongodbatlasSystemFtsDiskUsed, "mongodbatlas.system.fts.memory.usage": Metrics.MongodbatlasSystemFtsMemoryUsage, - "mongodbatlas.system.memory.usage": Metrics.MongodbatlasSystemMemoryUsage, - "mongodbatlas.system.network.io": Metrics.MongodbatlasSystemNetworkIo, - "mongodbatlas.system.paging.io": Metrics.MongodbatlasSystemPagingIo, - "mongodbatlas.system.paging.usage": Metrics.MongodbatlasSystemPagingUsage, + "mongodbatlas.system.memory.usage.average": Metrics.MongodbatlasSystemMemoryUsageAverage, + "mongodbatlas.system.memory.usage.max": Metrics.MongodbatlasSystemMemoryUsageMax, + "mongodbatlas.system.network.io.average": Metrics.MongodbatlasSystemNetworkIoAverage, + "mongodbatlas.system.network.io.max": Metrics.MongodbatlasSystemNetworkIoMax, + "mongodbatlas.system.paging.io.average": Metrics.MongodbatlasSystemPagingIoAverage, + "mongodbatlas.system.paging.io.max": Metrics.MongodbatlasSystemPagingIoMax, + "mongodbatlas.system.paging.usage.average": Metrics.MongodbatlasSystemPagingUsageAverage, + "mongodbatlas.system.paging.usage.max": Metrics.MongodbatlasSystemPagingUsageMax, } func (m *metricStruct) ByName(n string) MetricIntf { @@ -233,36 +281,90 @@ var Metrics = &metricStruct{ }, }, &metricImpl{ - "mongodbatlas.disk.partition.iops", + "mongodbatlas.disk.partition.iops.average", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.disk.partition.iops") + metric.SetName("mongodbatlas.disk.partition.iops.average") metric.SetDescription("Disk partition iops") metric.SetUnit("{ops}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.disk.partition.latency", + "mongodbatlas.disk.partition.iops.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.disk.partition.latency") + metric.SetName("mongodbatlas.disk.partition.iops.max") + metric.SetDescription("Disk partition iops") + metric.SetUnit("{ops}/s") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.disk.partition.latency.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.disk.partition.latency.average") metric.SetDescription("Disk partition latency") metric.SetUnit("ms") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.disk.partition.space", + "mongodbatlas.disk.partition.latency.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.disk.partition.space") + metric.SetName("mongodbatlas.disk.partition.latency.max") + metric.SetDescription("Disk partition latency") + metric.SetUnit("ms") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.disk.partition.space.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.disk.partition.space.average") metric.SetDescription("Disk partition space") metric.SetUnit("By") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.disk.partition.utilization", + "mongodbatlas.disk.partition.space.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.disk.partition.utilization") + metric.SetName("mongodbatlas.disk.partition.space.max") + metric.SetDescription("Disk partition space") + metric.SetUnit("By") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.disk.partition.usage.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.disk.partition.usage.average") + metric.SetDescription("Disk partition usage (%)") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.disk.partition.usage.max", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.disk.partition.usage.max") + metric.SetDescription("Disk partition usage (%)") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.disk.partition.utilization.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.disk.partition.utilization.average") + metric.SetDescription("Disk partition utilization (%)") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.disk.partition.utilization.max", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.disk.partition.utilization.max") metric.SetDescription("Disk partition utilization (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) @@ -314,36 +416,72 @@ var Metrics = &metricStruct{ }, }, &metricImpl{ - "mongodbatlas.process.cpu.children.normalized.usage", + "mongodbatlas.process.cpu.children.normalized.usage.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.process.cpu.children.normalized.usage.average") + metric.SetDescription("CPU Usage for child processes, normalized to pct") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.process.cpu.children.normalized.usage.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.process.cpu.children.normalized.usage") + metric.SetName("mongodbatlas.process.cpu.children.normalized.usage.max") metric.SetDescription("CPU Usage for child processes, normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.process.cpu.children.usage", + "mongodbatlas.process.cpu.children.usage.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.process.cpu.children.usage.average") + metric.SetDescription("CPU Usage for child processes (%)") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.process.cpu.children.usage.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.process.cpu.children.usage") + metric.SetName("mongodbatlas.process.cpu.children.usage.max") metric.SetDescription("CPU Usage for child processes (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.process.cpu.normalized.usage", + "mongodbatlas.process.cpu.normalized.usage.average", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.process.cpu.normalized.usage") + metric.SetName("mongodbatlas.process.cpu.normalized.usage.average") metric.SetDescription("CPU Usage, normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.process.cpu.usage", + "mongodbatlas.process.cpu.normalized.usage.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.process.cpu.usage") + metric.SetName("mongodbatlas.process.cpu.normalized.usage.max") + metric.SetDescription("CPU Usage, normalized to pct") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.process.cpu.usage.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.process.cpu.usage.average") + metric.SetDescription("CPU Usage (%)") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.process.cpu.usage.max", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.process.cpu.usage.max") metric.SetDescription("CPU Usage (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) @@ -552,18 +690,36 @@ var Metrics = &metricStruct{ }, }, &metricImpl{ - "mongodbatlas.system.cpu.normalized.usage", + "mongodbatlas.system.cpu.normalized.usage.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.system.cpu.normalized.usage.average") + metric.SetDescription("System CPU Normalized to pct") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.system.cpu.normalized.usage.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.system.cpu.normalized.usage") + metric.SetName("mongodbatlas.system.cpu.normalized.usage.max") metric.SetDescription("System CPU Normalized to pct") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.system.cpu.usage", + "mongodbatlas.system.cpu.usage.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.system.cpu.usage.average") + metric.SetDescription("System CPU Usage (%)") + metric.SetUnit("1") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.system.cpu.usage.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.system.cpu.usage") + metric.SetName("mongodbatlas.system.cpu.usage.max") metric.SetDescription("System CPU Usage (%)") metric.SetUnit("1") metric.SetDataType(pdata.MetricDataTypeGauge) @@ -608,36 +764,72 @@ var Metrics = &metricStruct{ }, }, &metricImpl{ - "mongodbatlas.system.memory.usage", + "mongodbatlas.system.memory.usage.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.system.memory.usage.average") + metric.SetDescription("System Memory Usage") + metric.SetUnit("KiBy") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.system.memory.usage.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.system.memory.usage") + metric.SetName("mongodbatlas.system.memory.usage.max") metric.SetDescription("System Memory Usage") metric.SetUnit("KiBy") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.system.network.io", + "mongodbatlas.system.network.io.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.system.network.io.average") + metric.SetDescription("System Network IO") + metric.SetUnit("By/s") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.system.network.io.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.system.network.io") + metric.SetName("mongodbatlas.system.network.io.max") metric.SetDescription("System Network IO") metric.SetUnit("By/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.system.paging.io", + "mongodbatlas.system.paging.io.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.system.paging.io.average") + metric.SetDescription("Swap IO") + metric.SetUnit("{pages}/s") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.system.paging.io.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.system.paging.io") + metric.SetName("mongodbatlas.system.paging.io.max") metric.SetDescription("Swap IO") metric.SetUnit("{pages}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, }, &metricImpl{ - "mongodbatlas.system.paging.usage", + "mongodbatlas.system.paging.usage.average", + func(metric pdata.Metric) { + metric.SetName("mongodbatlas.system.paging.usage.average") + metric.SetDescription("Swap usage") + metric.SetUnit("KiBy") + metric.SetDataType(pdata.MetricDataTypeGauge) + }, + }, + &metricImpl{ + "mongodbatlas.system.paging.usage.max", func(metric pdata.Metric) { - metric.SetName("mongodbatlas.system.paging.usage") + metric.SetName("mongodbatlas.system.paging.usage.max") metric.SetDescription("Swap usage") metric.SetUnit("KiBy") metric.SetDataType(pdata.MetricDataTypeGauge) @@ -651,8 +843,6 @@ var M = Metrics // Labels contains the possible metric labels that can be used. var Labels = struct { - // Aggregation (Method used by MongoDB to pre-aggregate metrics) - Aggregation string // AssertType (MongoDB assertion type) AssertType string // BtreeCounterType (Database index effectiveness) @@ -696,7 +886,6 @@ var Labels = struct { // TicketType (Type of ticket available) TicketType string }{ - "aggregation", "assert_type", "btree_counter_type", "cache_direction", @@ -724,15 +913,6 @@ var Labels = struct { // Labels. var L = Labels -// LabelAggregation are the possible values that the label "aggregation" can have. -var LabelAggregation = struct { - Max string - Avg string -}{ - "max", - "avg", -} - // LabelAssertType are the possible values that the label "assert_type" can have. var LabelAssertType = struct { Regular string diff --git a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go index 48a3909ad20d..f5a92d81e738 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/metric_name_mapping.go @@ -30,87 +30,71 @@ type metricMappingData struct { var metricNameMapping = map[string]metricMappingData{ // MongoDB CPU usage. For hosts with more than one CPU core, these values can exceed 100%. - "PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("avg"), + "PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "MAX_PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_PROCESS_CPU_USER": {"mongodbatlas.process.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("avg"), + "PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "MAX_PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_PROCESS_CPU_KERNEL": {"mongodbatlas.process.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("avg"), + "PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "MAX_PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_PROCESS_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("avg"), + "PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_PROCESS_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, // MongoDB CPU usage scaled to a range of 0% to 100%. Atlas computes this value by dividing by the number of CPU cores. - "PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("avg"), + "PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "MAX_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_PROCESS_NORMALIZED_CPU_USER": {"mongodbatlas.process.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("avg"), + "PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_PROCESS_NORMALIZED_CPU_KERNEL": {"mongodbatlas.process.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("avg"), + "PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, // Context: Process - "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER": {"mongodbatlas.process.cpu.children.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("avg"), + "PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL": {"mongodbatlas.process.cpu.children.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, // Rate of asserts for a MongoDB process found in the asserts document that the serverStatus command generates. @@ -364,238 +348,182 @@ var metricNameMapping = map[string]metricMappingData{ }}, // CPU usage of processes on the host. For hosts with more than one CPU core, this value can exceed 100%. - "SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "MAX_SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_CPU_USER": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "MAX_SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_CPU_KERNEL": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("nice"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("nice"), }}, - "MAX_SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("nice"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_CPU_NICE": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("nice"), }}, - "SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("iowait"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("iowait"), }}, - "MAX_SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("iowait"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_CPU_IOWAIT": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("iowait"), }}, - "SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("irq"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("irq"), }}, - "MAX_SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("irq"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_CPU_IRQ": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("irq"), }}, - "SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("softirq"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("softirq"), }}, - "MAX_SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("softirq"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("softirq"), }}, - "SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("guest"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("guest"), }}, - "MAX_SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("guest"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_CPU_GUEST": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("guest"), }}, - "SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("steal"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("steal"), }}, - "MAX_SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("steal"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_CPU_STEAL": {"mongodbatlas.system.cpu.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("steal"), }}, // CPU usage of processes on the host scaled to a range of 0 to 100% by dividing by the number of CPU cores. - "SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("user"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NORMALIZED_CPU_USER": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("user"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("nice"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("nice"), }}, - "SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("kernel"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NORMALIZED_CPU_KERNEL": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("kernel"), }}, - "SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("nice"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NORMALIZED_CPU_NICE": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("nice"), }}, - "SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("iowait"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("iowait"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("iowait"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NORMALIZED_CPU_IOWAIT": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("iowait"), }}, - "SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("irq"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("irq"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("irq"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NORMALIZED_CPU_IRQ": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("irq"), }}, - "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("softirq"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("softirq"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("softirq"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("softirq"), }}, - "SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("guest"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("guest"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("guest"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NORMALIZED_CPU_GUEST": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("guest"), }}, - "SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("steal"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage.average", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("steal"), }}, - "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage", map[string]pdata.AttributeValue{ - "cpu_state": pdata.NewAttributeValueString("steal"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NORMALIZED_CPU_STEAL": {"mongodbatlas.system.cpu.normalized.usage.max", map[string]pdata.AttributeValue{ + "cpu_state": pdata.NewAttributeValueString("steal"), }}, // Physical memory usage, in bytes, that the host uses. - "SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("available"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_AVAILABLE": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("available"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("buffers"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_BUFFERS": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("buffers"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("cached"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_CACHED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("cached"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_FREE": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("shared"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_SHARED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("shared"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage.average", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage", map[string]pdata.AttributeValue{ + "MAX_SYSTEM_MEMORY_USED": {"mongodbatlas.system.memory.usage.max", map[string]pdata.AttributeValue{ "memory_status": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("max"), }}, // Average rate of physical bytes per second that the eth0 network interface received and transmitted. - "SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("receive"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io.average", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("receive"), }}, - "MAX_SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("receive"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NETWORK_IN": {"mongodbatlas.system.network.io.max", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("receive"), }}, - "SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("transmit"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io.average", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("transmit"), }}, - "MAX_SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("transmit"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SYSTEM_NETWORK_OUT": {"mongodbatlas.system.network.io.max", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("transmit"), }}, // Total amount of memory that swap uses. - "SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ + "SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage.average", map[string]pdata.AttributeValue{ "memory_state": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ + "MAX_SWAP_USAGE_USED": {"mongodbatlas.system.paging.usage.max", map[string]pdata.AttributeValue{ "memory_state": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ + "SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage.average", map[string]pdata.AttributeValue{ "memory_state": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage", map[string]pdata.AttributeValue{ + "MAX_SWAP_USAGE_FREE": {"mongodbatlas.system.paging.usage.max", map[string]pdata.AttributeValue{ "memory_state": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("max"), }}, // Total amount of memory written and read from swap. - "SWAP_IO_IN": {"mongodbatlas.system.paging.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("in"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SWAP_IO_IN": {"mongodbatlas.system.paging.io.average", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("in"), }}, - "MAX_SWAP_IO_IN": {"mongodbatlas.system.paging.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("in"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SWAP_IO_IN": {"mongodbatlas.system.paging.io.max", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("in"), }}, - "SWAP_IO_OUT": {"mongodbatlas.system.paging.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("out"), - "aggregation": pdata.NewAttributeValueString("avg"), + "SWAP_IO_OUT": {"mongodbatlas.system.paging.io.average", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("out"), }}, - "MAX_SWAP_IO_OUT": {"mongodbatlas.system.paging.io", map[string]pdata.AttributeValue{ - "direction": pdata.NewAttributeValueString("out"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_SWAP_IO_OUT": {"mongodbatlas.system.paging.io.max", map[string]pdata.AttributeValue{ + "direction": pdata.NewAttributeValueString("out"), }}, // Memory usage, in bytes, that Atlas Search processes use. @@ -632,102 +560,80 @@ var metricNameMapping = map[string]metricMappingData{ // Process Disk Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) // Measures throughput of I/O operations for the disk partition used for MongoDB. - "DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ + "DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("read"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_IOPS_READ": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("read"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ + "DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("write"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_IOPS_WRITE": {"mongodbatlas.disk.partition.iops.max", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("write"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ + "DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops.average", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("total"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_IOPS_TOTAL": {"mongodbatlas.disk.partition.iops.max", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("total"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "aggregation": pdata.NewAttributeValueString("avg"), - }}, + "DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.AttributeValue{}}, - "MAX_DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "aggregation": pdata.NewAttributeValueString("max"), - }}, + "MAX_DISK_PARTITION_UTILIZATION": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.AttributeValue{}}, // The percentage of time during which requests are being issued to and serviced by the partition. // This includes requests from any process, not just MongoDB processes. - "DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ + "DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency.average", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("read"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_LATENCY_READ": {"mongodbatlas.disk.partition.latency.max", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("read"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ + "DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency.average", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("write"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_LATENCY_WRITE": {"mongodbatlas.disk.partition.latency.max", map[string]pdata.AttributeValue{ "disk_direction": pdata.NewAttributeValueString("write"), - "aggregation": pdata.NewAttributeValueString("max"), }}, // Measures latency per operation type of the disk partition used by MongoDB. - "DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ + "DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space.average", map[string]pdata.AttributeValue{ "memory_state": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_SPACE_FREE": {"mongodbatlas.disk.partition.space.max", map[string]pdata.AttributeValue{ "memory_state": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ + "DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space.average", map[string]pdata.AttributeValue{ "memory_state": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("avg"), }}, - "MAX_DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space", map[string]pdata.AttributeValue{ + "MAX_DISK_PARTITION_SPACE_USED": {"mongodbatlas.disk.partition.space.max", map[string]pdata.AttributeValue{ "memory_state": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("max"), }}, - "DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("avg"), + "DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.AttributeValue{ + "disk_status": pdata.NewAttributeValueString("free"), }}, - "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("free"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_DISK_PARTITION_SPACE_PERCENT_FREE": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.AttributeValue{ + "disk_status": pdata.NewAttributeValueString("free"), }}, - "DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("avg"), + "DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization.average", map[string]pdata.AttributeValue{ + "disk_status": pdata.NewAttributeValueString("used"), }}, - "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization", map[string]pdata.AttributeValue{ - "memory_state": pdata.NewAttributeValueString("used"), - "aggregation": pdata.NewAttributeValueString("max"), + "MAX_DISK_PARTITION_SPACE_PERCENT_USED": {"mongodbatlas.disk.partition.utilization.max", map[string]pdata.AttributeValue{ + "disk_status": pdata.NewAttributeValueString("used"), }}, // Process Database Measurements (https://docs.atlas.mongodb.com/reference/api/process-disks-measurements/) diff --git a/receiver/mongodbatlasreceiver/metadata.yaml b/receiver/mongodbatlasreceiver/metadata.yaml index ffb68eaa7110..2070feaa7e38 100644 --- a/receiver/mongodbatlasreceiver/metadata.yaml +++ b/receiver/mongodbatlasreceiver/metadata.yaml @@ -12,11 +12,6 @@ labels: - softirq - guest - steal - aggregation: - description: Method used by MongoDB to pre-aggregate metrics - enum: - - max - - avg assert_type: description: MongoDB assertion type enum: @@ -144,7 +139,7 @@ labels: metrics: mongodbatlas.process.asserts: description: Number of assertions - extended_documentation: Aggregates MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING + extended_documentation: Aggregate of MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING unit: "{assertions}/s" labels: [assert_type] data: @@ -157,14 +152,14 @@ metrics: type: gauge mongodbatlas.process.cache.io: description: Cache throughput (per second) - extended_documentation: Aggregates MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM + extended_documentation: Aggregate of MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM unit: By labels: [cache_direction] data: type: gauge mongodbatlas.process.cache.size: description: Cache sizes - extended_documentation: Aggregates MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES + extended_documentation: Aggregate of MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES unit: By labels: [cache_status] data: @@ -175,65 +170,93 @@ metrics: unit: "{connections}" data: type: gauge - mongodbatlas.process.cpu.usage: + mongodbatlas.process.cpu.usage.max: description: CPU Usage (%) - extended_documentation: Aggregates MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER, MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER + extended_documentation: Aggregate of MongoDB Metrics MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER unit: 1 - labels: [cpu_state, aggregation] + labels: [cpu_state] data: type: gauge - mongodbatlas.process.cpu.children.usage: + mongodbatlas.process.cpu.usage.average: + description: CPU Usage (%) + extended_documentation: Aggregate of MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER + unit: 1 + labels: [cpu_state] + data: + type: gauge + mongodbatlas.process.cpu.children.usage.max: description: CPU Usage for child processes (%) - extended_documentation: Aggregates MongoDB Metrics MAX_PROCESS_CPU_CHILDREN_USER, MAX_PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_USER + extended_documentation: Aggregate of MongoDB Metrics MAX_PROCESS_CPU_CHILDREN_USER, MAX_PROCESS_CPU_CHILDREN_KERNEL unit: 1 - labels: [cpu_state, aggregation] + labels: [cpu_state] data: type: gauge - mongodbatlas.process.cpu.children.normalized.usage: + mongodbatlas.process.cpu.children.usage.average: + description: CPU Usage for child processes (%) + extended_documentation: Aggregate of MongoDB Metrics PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_USER + unit: 1 + labels: [cpu_state] + data: + type: gauge + mongodbatlas.process.cpu.children.normalized.usage.max: + description: CPU Usage for child processes, normalized to pct + extended_documentation: Aggregate of MongoDB Metrics MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER + unit: 1 + labels: [cpu_state] + data: + type: gauge + mongodbatlas.process.cpu.children.normalized.usage.average: description: CPU Usage for child processes, normalized to pct - extended_documentation: Aggregates MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER + extended_documentation: Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER + unit: 1 + labels: [cpu_state] + data: + type: gauge + mongodbatlas.process.cpu.normalized.usage.max: + description: CPU Usage, normalized to pct + extended_documentation: Aggregate of MongoDB Metrics MAX_PROCESS_NORMALIZED_CPU_USER, MAX_PROCESS_NORMALIZED_CPU_KERNEL unit: 1 - labels: [cpu_state, aggregation] + labels: [cpu_state] data: type: gauge - mongodbatlas.process.cpu.normalized.usage: + mongodbatlas.process.cpu.normalized.usage.average: description: CPU Usage, normalized to pct - extended_documentation: Aggregates MongoDB Metrics PROCESS_NORMALIZED_CPU_KERNEL, MAX_PROCESS_NORMALIZED_CPU_USER, PROCESS_NORMALIZED_CPU_USER, MAX_PROCESS_NORMALIZED_CPU_KERNEL + extended_documentation: Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_KERNEL, PROCESS_NORMALIZED_CPU_USER unit: 1 - labels: [cpu_state, aggregation] + labels: [cpu_state] data: type: gauge mongodbatlas.process.cursors: description: Number of cursors - extended_documentation: Aggregates MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT + extended_documentation: Aggregate of MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT unit: "{cursors}" labels: [cursor_state] data: type: gauge mongodbatlas.process.db.storage: description: Storage used by the database - extended_documentation: Aggregates MongoDB Metrics DB_INDEX_SIZE_TOTAL, DB_DATA_SIZE_TOTAL_WO_SYSTEM, DB_STORAGE_TOTAL, DB_DATA_SIZE_TOTAL + extended_documentation: Aggregate of MongoDB Metrics DB_INDEX_SIZE_TOTAL, DB_DATA_SIZE_TOTAL_WO_SYSTEM, DB_STORAGE_TOTAL, DB_DATA_SIZE_TOTAL unit: By labels: [storage_status] data: type: gauge mongodbatlas.process.db.document.rate: description: Document access rates - extended_documentation: Aggregates MongoDB Metrics DOCUMENT_METRICS_UPDATED, DOCUMENT_METRICS_DELETED, DOCUMENT_METRICS_RETURNED, DOCUMENT_METRICS_INSERTED + extended_documentation: Aggregate of MongoDB Metrics DOCUMENT_METRICS_UPDATED, DOCUMENT_METRICS_DELETED, DOCUMENT_METRICS_RETURNED, DOCUMENT_METRICS_INSERTED unit: "{documents}/s" labels: [document_status] data: type: gauge mongodbatlas.process.fts.cpu.usage: description: Full text search CPU (%) - extended_documentation: Aggregates MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL + extended_documentation: Aggregate of MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL unit: 1 labels: [cpu_state] data: type: gauge mongodbatlas.process.global_lock: description: Number and status of locks - extended_documentation: Aggregates MongoDB Metrics GLOBAL_LOCK_CURRENT_QUEUE_WRITERS, GLOBAL_LOCK_CURRENT_QUEUE_READERS, GLOBAL_LOCK_CURRENT_QUEUE_TOTAL + extended_documentation: Aggregate of MongoDB Metrics GLOBAL_LOCK_CURRENT_QUEUE_WRITERS, GLOBAL_LOCK_CURRENT_QUEUE_READERS, GLOBAL_LOCK_CURRENT_QUEUE_TOTAL unit: "{locks}" labels: [global_lock_state] data: @@ -246,7 +269,7 @@ metrics: type: gauge mongodbatlas.process.index.counters: description: Indexes - extended_documentation: Aggregates MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS + extended_documentation: Aggregate of MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS unit: "{indexes}" labels: [btree_counter_type] data: @@ -271,14 +294,14 @@ metrics: type: gauge mongodbatlas.process.memory.usage: description: Memory Usage - extended_documentation: Aggregates MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT + extended_documentation: Aggregate of MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT unit: By labels: [memory_state] data: type: gauge mongodbatlas.process.network.io: description: Network IO - extended_documentation: Aggregates MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN + extended_documentation: Aggregate of MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN unit: By/s labels: [direction] data: @@ -293,7 +316,7 @@ metrics: aggregation: cumulative mongodbatlas.process.oplog.time: description: Execution time by operation - extended_documentation: Aggregates MongoDB Metrics OPLOG_MASTER_TIME, OPLOG_SLAVE_LAG_MASTER_TIME, OPLOG_MASTER_LAG_TIME_DIFF + extended_documentation: Aggregate of MongoDB Metrics OPLOG_MASTER_TIME, OPLOG_SLAVE_LAG_MASTER_TIME, OPLOG_MASTER_LAG_TIME_DIFF unit: s labels: [oplog_type] data: @@ -308,14 +331,14 @@ metrics: type: gauge mongodbatlas.process.db.operations.rate: description: DB Operation Rates - extended_documentation: Aggregates MongoDB Metrics OPCOUNTER_GETMORE, OPERATIONS_SCAN_AND_ORDER, OPCOUNTER_UPDATE, OPCOUNTER_REPL_UPDATE, OPCOUNTER_CMD, OPCOUNTER_DELETE, OPCOUNTER_REPL_DELETE, OPCOUNTER_REPL_CMD, OPCOUNTER_QUERY, OPCOUNTER_REPL_INSERT, OPCOUNTER_INSERT + extended_documentation: Aggregate of MongoDB Metrics OPCOUNTER_GETMORE, OPERATIONS_SCAN_AND_ORDER, OPCOUNTER_UPDATE, OPCOUNTER_REPL_UPDATE, OPCOUNTER_CMD, OPCOUNTER_DELETE, OPCOUNTER_REPL_DELETE, OPCOUNTER_REPL_CMD, OPCOUNTER_QUERY, OPCOUNTER_REPL_INSERT, OPCOUNTER_INSERT unit: "{operations}/s" labels: [operation, cluster_role] data: type: gauge mongodbatlas.process.db.operations.time: description: DB Operation Times - extended_documentation: Aggregates MongoDB Metrics OP_EXECUTION_TIME_WRITES, OP_EXECUTION_TIME_COMMANDS, OP_EXECUTION_TIME_READS + extended_documentation: Aggregate of MongoDB Metrics OP_EXECUTION_TIME_WRITES, OP_EXECUTION_TIME_COMMANDS, OP_EXECUTION_TIME_READS unit: ms labels: [execution_type] data: @@ -324,125 +347,207 @@ metrics: aggregation: cumulative mongodbatlas.process.page_faults: description: Page faults - extended_documentation: Aggregates MongoDB Metrics GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN, EXTRA_INFO_PAGE_FAULTS, GLOBAL_ACCESSES_NOT_IN_MEMORY + extended_documentation: Aggregate of MongoDB Metrics GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN, EXTRA_INFO_PAGE_FAULTS, GLOBAL_ACCESSES_NOT_IN_MEMORY unit: "{faults}/s" labels: [memory_issue_type] data: type: gauge mongodbatlas.process.db.query_executor.scanned: description: Scanned objects - extended_documentation: Aggregates MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED + extended_documentation: Aggregate of MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED labels: [scanned_type] unit: "{objects}/s" data: type: gauge mongodbatlas.process.db.query_targeting.scanned_per_returned: description: Scanned objects per returned - extended_documentation: Aggregates MongoDB Metrics QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED, QUERY_TARGETING_SCANNED_PER_RETURNED + extended_documentation: Aggregate of MongoDB Metrics QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED, QUERY_TARGETING_SCANNED_PER_RETURNED unit: "{scanned}/{returned}" labels: [scanned_type] data: type: gauge mongodbatlas.process.restarts: description: Restarts in last hour - extended_documentation: Aggregates MongoDB Metrics RESTARTS_IN_LAST_HOUR + extended_documentation: Aggregate of MongoDB Metrics RESTARTS_IN_LAST_HOUR unit: "{restarts}/h" data: type: gauge - mongodbatlas.system.paging.usage: + mongodbatlas.system.paging.usage.max: description: Swap usage - extended_documentation: Aggregates MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED, SWAP_USAGE_FREE, SWAP_USAGE_USED + extended_documentation: Aggregate of MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED unit: KiBy - labels: [direction, aggregation] + labels: [direction] data: type: gauge - mongodbatlas.system.paging.io: + mongodbatlas.system.paging.usage.average: + description: Swap usage + extended_documentation: Aggregate of MongoDB Metrics SWAP_USAGE_FREE, SWAP_USAGE_USED + unit: KiBy + labels: [direction] + data: + type: gauge + mongodbatlas.system.paging.io.max: description: Swap IO - extended_documentation: Aggregates MongoDB Metrics MAX_SWAP_IO_IN, SWAP_IO_IN, SWAP_IO_OUT, MAX_SWAP_IO_OUT + extended_documentation: Aggregate of MongoDB Metrics MAX_SWAP_IO_IN, MAX_SWAP_IO_OUT unit: "{pages}/s" - labels: [direction, aggregation] + labels: [direction] data: type: gauge - mongodbatlas.system.cpu.usage: + mongodbatlas.system.paging.io.average: + description: Swap IO + extended_documentation: Aggregate of MongoDB Metrics SWAP_IO_IN, SWAP_IO_OUT + unit: "{pages}/s" + labels: [direction] + data: + type: gauge + mongodbatlas.system.cpu.usage.max: description: System CPU Usage (%) - extended_documentation: Aggregates MongoDB Metrics SYSTEM_CPU_USER, MAX_SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_IRQ, MAX_SYSTEM_CPU_GUEST, MAX_SYSTEM_CPU_IOWAIT, SYSTEM_CPU_GUEST, SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_NICE, SYSTEM_CPU_IRQ, SYSTEM_CPU_KERNEL, SYSTEM_CPU_IOWAIT, SYSTEM_CPU_NICE, SYSTEM_CPU_STEAL, MAX_SYSTEM_CPU_KERNEL, MAX_SYSTEM_CPU_USER, MAX_SYSTEM_CPU_STEAL - labels: [cpu_state, aggregation] + extended_documentation: Aggregate of MongoDB Metrics MAX_SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_IRQ, MAX_SYSTEM_CPU_GUEST, MAX_SYSTEM_CPU_IOWAIT, MAX_SYSTEM_CPU_NICE, MAX_SYSTEM_CPU_KERNEL, MAX_SYSTEM_CPU_USER, MAX_SYSTEM_CPU_STEAL + labels: [cpu_state] unit: 1 data: type: gauge - mongodbatlas.system.memory.usage: + mongodbatlas.system.cpu.usage.average: + description: System CPU Usage (%) + extended_documentation: Aggregate of MongoDB Metrics SYSTEM_CPU_USER, SYSTEM_CPU_GUEST, SYSTEM_CPU_SOFTIRQ, SYSTEM_CPU_IRQ, SYSTEM_CPU_KERNEL, SYSTEM_CPU_IOWAIT, SYSTEM_CPU_NICE, SYSTEM_CPU_STEAL + labels: [cpu_state] + unit: 1 + data: + type: gauge + mongodbatlas.system.memory.usage.max: description: System Memory Usage - extended_documentation: Aggregates MongoDB Metrics SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_CACHED, MAX_SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_USED, SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_FREE, SYSTEM_MEMORY_USED, SYSTEM_MEMORY_CACHED, SYSTEM_MEMORY_SHARED, MAX_SYSTEM_MEMORY_SHARED, SYSTEM_MEMORY_FREE + extended_documentation: Aggregate of MongoDB Metrics MAX_SYSTEM_MEMORY_CACHED, MAX_SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_USED, MAX_SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_FREE, MAX_SYSTEM_MEMORY_SHARED unit: KiBy - labels: [memory_state, aggregation] + labels: [memory_state] data: type: gauge - mongodbatlas.system.network.io: + mongodbatlas.system.memory.usage.average: + description: System Memory Usage + extended_documentation: Aggregate of MongoDB Metrics SYSTEM_MEMORY_AVAILABLE, SYSTEM_MEMORY_BUFFERS, SYSTEM_MEMORY_USED, SYSTEM_MEMORY_CACHED, SYSTEM_MEMORY_SHARED, SYSTEM_MEMORY_FREE + unit: KiBy + labels: [memory_state] + data: + type: gauge + mongodbatlas.system.network.io.max: description: System Network IO - extended_documentation: Aggregates MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN + extended_documentation: Aggregate of MongoDB Metrics MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN unit: By/s - labels: [direction, aggregation] + labels: [direction] data: type: gauge - mongodbatlas.system.cpu.normalized.usage: + mongodbatlas.system.network.io.average: + description: System Network IO + extended_documentation: Aggregate of MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT + unit: By/s + labels: [direction] + data: + type: gauge + mongodbatlas.system.cpu.normalized.usage.max: + description: System CPU Normalized to pct + extended_documentation: Aggregate of MongoDB Metrics MAX_SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_NICE, MAX_SYSTEM_NORMALIZED_CPU_IOWAIT, MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_STEAL, MAX_SYSTEM_NORMALIZED_CPU_KERNEL, MAX_SYSTEM_NORMALIZED_CPU_GUEST, MAX_SYSTEM_NORMALIZED_CPU_IRQ + labels: [cpu_state] + unit: 1 + data: + type: gauge + mongodbatlas.system.cpu.normalized.usage.average: description: System CPU Normalized to pct - extended_documentation: Aggregates MongoDB Metrics MAX_SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_IRQ, MAX_SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_KERNEL, SYSTEM_NORMALIZED_CPU_STEAL, MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_STEAL, SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_KERNEL, MAX_SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_IRQ - labels: [cpu_state, aggregation] + extended_documentation: Aggregate of MongoDB Metrics SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_IRQ, SYSTEM_NORMALIZED_CPU_KERNEL, SYSTEM_NORMALIZED_CPU_STEAL, SYSTEM_NORMALIZED_CPU_SOFTIRQ, SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_USER + labels: [cpu_state] unit: 1 data: type: gauge mongodbatlas.process.tickets: description: Tickets - extended_documentation: Aggregates MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS + extended_documentation: Aggregate of MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS unit: "{tickets}" labels: [ticket_type] data: type: gauge - mongodbatlas.disk.partition.iops: + mongodbatlas.disk.partition.iops.max: description: Disk partition iops - extended_documentation: Aggregates MongoDB Metrics DISK_PARTITION_IOPS_READ, MAX_DISK_PARTITION_IOPS_WRITE, MAX_DISK_PARTITION_IOPS_TOTAL, DISK_PARTITION_IOPS_WRITE, DISK_PARTITION_IOPS_TOTAL, MAX_DISK_PARTITION_IOPS_READ + extended_documentation: Aggregate of MongoDB Metrics MAX_DISK_PARTITION_IOPS_WRITE, MAX_DISK_PARTITION_IOPS_TOTAL, MAX_DISK_PARTITION_IOPS_READ unit: "{ops}/s" - labels: [disk_direction, aggregation] + labels: [disk_direction] data: type: gauge - mongodbatlas.disk.partition.utilization: + mongodbatlas.disk.partition.iops.average: + description: Disk partition iops + extended_documentation: Aggregate of MongoDB Metrics DISK_PARTITION_IOPS_READ, DISK_PARTITION_IOPS_WRITE, DISK_PARTITION_IOPS_TOTAL + unit: "{ops}/s" + labels: [disk_direction] + data: + type: gauge + mongodbatlas.disk.partition.usage.max: + description: Disk partition usage (%) + extended_documentation: Aggregate of MongoDB Metrics MAX_DISK_PARTITION_SPACE_PERCENT_USED, MAX_DISK_PARTITION_SPACE_PERCENT_FREE + unit: 1 + labels: [disk_status] + data: + type: gauge + mongodbatlas.disk.partition.usage.average: + description: Disk partition usage (%) + extended_documentation: Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED + unit: 1 + labels: [disk_status] + data: + type: gauge + mongodbatlas.disk.partition.utilization.max: + description: Disk partition utilization (%) + extended_documentation: MongoDB Metrics MAX_DISK_PARTITION_UTILIZATION + unit: 1 + data: + type: gauge + mongodbatlas.disk.partition.utilization.average: description: Disk partition utilization (%) - extended_documentation: Aggregates MongoDB Metrics MAX_DISK_PARTITION_SPACE_PERCENT_USED, DISK_PARTITION_SPACE_PERCENT_FREE, MAX_DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED, DISK_PARTITION_UTILIZATION, MAX_DISK_PARTITION_UTILIZATION + extended_documentation: MongoDB Metrics DISK_PARTITION_UTILIZATION unit: 1 - labels: [aggregation] data: type: gauge - mongodbatlas.disk.partition.latency: + mongodbatlas.disk.partition.latency.max: + description: Disk partition latency + extended_documentation: Aggregate of MongoDB Metrics MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ + unit: ms + labels: [disk_direction] + data: + type: gauge + mongodbatlas.disk.partition.latency.average: description: Disk partition latency - extended_documentation: Aggregates MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ, MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ + extended_documentation: Aggregate of MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ unit: ms - labels: [disk_direction, aggregation] + labels: [disk_direction] + data: + type: gauge + mongodbatlas.disk.partition.space.max: + description: Disk partition space + extended_documentation: Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED + unit: By + lables: [memory_state] data: type: gauge - mongodbatlas.disk.partition.space: + mongodbatlas.disk.partition.space.average: description: Disk partition space - extended_documentation: Aggregates MongoDB Metrics DISK_PARTITION_SPACE_FREE, MAX_DISK_PARTITION_SPACE_USED, DISK_PARTITION_SPACE_USED, MAX_DISK_PARTITION_SPACE_FREE + extended_documentation: Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED unit: By - lables: [memory_state, aggregation] + lables: [memory_state] data: type: gauge mongodbatlas.db.size: description: Database feature size - extended_documentation: Aggregates MongoDB Metrics DATABASE_DATA_SIZE, DATABASE_STORAGE_SIZE, DATABASE_INDEX_SIZE, DATABASE_AVERAGE_OBJECT_SIZE + extended_documentation: Aggregate of MongoDB Metrics DATABASE_DATA_SIZE, DATABASE_STORAGE_SIZE, DATABASE_INDEX_SIZE, DATABASE_AVERAGE_OBJECT_SIZE unit: By labels: [object_type] data: type: gauge mongodbatlas.db.counts: description: Database feature size - extended_documentation: Aggregates MongoDB Metrics DATABASE_EXTENT_COUNT, DATABASE_VIEW_COUNT, DATABASE_COLLECTION_COUNT, DATABASE_OBJECT_COUNT, DATABASE_INDEX_COUNT + extended_documentation: Aggregate of MongoDB Metrics DATABASE_EXTENT_COUNT, DATABASE_VIEW_COUNT, DATABASE_COLLECTION_COUNT, DATABASE_OBJECT_COUNT, DATABASE_INDEX_COUNT unit: "{objects}" labels: [object_type] data: type: gauge mongodbatlas.system.fts.memory.usage: description: Full-text search - extended_documentation: Aggregates MongoDB Metrics FTS_MEMORY_MAPPED, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY + extended_documentation: Aggregate of MongoDB Metrics FTS_MEMORY_MAPPED, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY unit: MiBy labels: [memory_state] data: @@ -463,7 +568,7 @@ metrics: type: gauge mongodbatlas.system.fts.cpu.normalized.usage: description: Full text search disk usage (%) - extended_documentation: Aggregates MongoDB Metrics FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL + extended_documentation: Aggregate of MongoDB Metrics FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL unit: 1 labels: [cpu_state] data: From d1687024eaf2799e5482d0ddfe03fb7009e8213c Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Tue, 9 Nov 2021 09:33:30 -0800 Subject: [PATCH 12/13] change two metrics to sum from gauge --- receiver/mongodbatlasreceiver/documentation.md | 6 +++--- .../internal/metadata/generated_metrics.go | 10 +++++++--- receiver/mongodbatlasreceiver/metadata.yaml | 10 +++++++--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/receiver/mongodbatlasreceiver/documentation.md b/receiver/mongodbatlasreceiver/documentation.md index b2666f3174d7..808a37c67fb7 100644 --- a/receiver/mongodbatlasreceiver/documentation.md +++ b/receiver/mongodbatlasreceiver/documentation.md @@ -32,15 +32,15 @@ These are the metrics available for this scraper.
                                              | | mongodbatlas.disk.partition.utilization.max | Disk partition utilization (%) MongoDB Metrics MAX_DISK_PARTITION_UTILIZATION | 1 | Gauge |
                                              | -| mongodbatlas.process.asserts | Number of assertions Aggregate of MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING | {assertions}/s | Gauge |
                                                +| mongodbatlas.process.asserts | Number of assertions per second Aggregate of MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING | {assertions}/s | Gauge |
                                                • assert_type
                                                | | mongodbatlas.process.background_flush | Amount of data flushed in the background MongoDB Metric BACKGROUND_FLUSH_AVG | 1 | Gauge |
                                                | | mongodbatlas.process.cache.io | Cache throughput (per second) Aggregate of MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM | By | Gauge |
                                                • cache_direction
                                                | -| mongodbatlas.process.cache.size | Cache sizes Aggregate of MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES | By | Gauge |
                                                  +| mongodbatlas.process.cache.size | Cache sizes Aggregate of MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES | By | Sum |
                                                  • cache_status
                                                  | -| mongodbatlas.process.connections | Number of current connections MongoDB Metric CONNECTIONS | {connections} | Gauge |
                                                    +| mongodbatlas.process.connections | Number of current connections MongoDB Metric CONNECTIONS | {connections} | Sum |
                                                    | | mongodbatlas.process.cpu.children.normalized.usage.average | CPU Usage for child processes, normalized to pct Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
                                                    • cpu_state
                                                    | diff --git a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go index aef9ab2bd324..68102079b8af 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go @@ -374,7 +374,7 @@ var Metrics = &metricStruct{ "mongodbatlas.process.asserts", func(metric pdata.Metric) { metric.SetName("mongodbatlas.process.asserts") - metric.SetDescription("Number of assertions") + metric.SetDescription("Number of assertions per second") metric.SetUnit("{assertions}/s") metric.SetDataType(pdata.MetricDataTypeGauge) }, @@ -403,7 +403,9 @@ var Metrics = &metricStruct{ metric.SetName("mongodbatlas.process.cache.size") metric.SetDescription("Cache sizes") metric.SetUnit("By") - metric.SetDataType(pdata.MetricDataTypeGauge) + metric.SetDataType(pdata.MetricDataTypeSum) + metric.Sum().SetIsMonotonic(false) + metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative) }, }, &metricImpl{ @@ -412,7 +414,9 @@ var Metrics = &metricStruct{ metric.SetName("mongodbatlas.process.connections") metric.SetDescription("Number of current connections") metric.SetUnit("{connections}") - metric.SetDataType(pdata.MetricDataTypeGauge) + metric.SetDataType(pdata.MetricDataTypeSum) + metric.Sum().SetIsMonotonic(false) + metric.Sum().SetAggregationTemporality(pdata.MetricAggregationTemporalityCumulative) }, }, &metricImpl{ diff --git a/receiver/mongodbatlasreceiver/metadata.yaml b/receiver/mongodbatlasreceiver/metadata.yaml index 2070feaa7e38..2551a2286dd1 100644 --- a/receiver/mongodbatlasreceiver/metadata.yaml +++ b/receiver/mongodbatlasreceiver/metadata.yaml @@ -138,7 +138,7 @@ labels: metrics: mongodbatlas.process.asserts: - description: Number of assertions + description: Number of assertions per second extended_documentation: Aggregate of MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING unit: "{assertions}/s" labels: [assert_type] @@ -163,13 +163,17 @@ metrics: unit: By labels: [cache_status] data: - type: gauge + type: sum + monotonic: false + aggregation: cumulative mongodbatlas.process.connections: description: Number of current connections extended_documentation: MongoDB Metric CONNECTIONS unit: "{connections}" data: - type: gauge + type: sum + monotonic: false + aggregation: cumulative mongodbatlas.process.cpu.usage.max: description: CPU Usage (%) extended_documentation: Aggregate of MongoDB Metrics MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER From 4ce96377a05e70a03ec5a4e2bf466494f10f5073 Mon Sep 17 00:00:00 2001 From: David Poncelow Date: Fri, 12 Nov 2021 14:50:10 -0800 Subject: [PATCH 13/13] rerun go generate --- .../mongodbatlasreceiver/documentation.md | 209 ++++-------- .../internal/metadata/generated_metrics.go | 322 +----------------- 2 files changed, 68 insertions(+), 463 deletions(-) diff --git a/receiver/mongodbatlasreceiver/documentation.md b/receiver/mongodbatlasreceiver/documentation.md index 808a37c67fb7..b070b42bfcd8 100644 --- a/receiver/mongodbatlasreceiver/documentation.md +++ b/receiver/mongodbatlasreceiver/documentation.md @@ -8,154 +8,71 @@ These are the metrics available for this scraper. | Name | Description | Unit | Type | Attributes | | ---- | ----------- | ---- | ---- | ---------- | -| mongodbatlas.db.counts | Database feature size Aggregate of MongoDB Metrics DATABASE_EXTENT_COUNT, DATABASE_VIEW_COUNT, DATABASE_COLLECTION_COUNT, DATABASE_OBJECT_COUNT, DATABASE_INDEX_COUNT | {objects} | Gauge |
                                                      -
                                                    • object_type
                                                    | -| mongodbatlas.db.size | Database feature size Aggregate of MongoDB Metrics DATABASE_DATA_SIZE, DATABASE_STORAGE_SIZE, DATABASE_INDEX_SIZE, DATABASE_AVERAGE_OBJECT_SIZE | By | Gauge |
                                                      -
                                                    • object_type
                                                    | -| mongodbatlas.disk.partition.iops.average | Disk partition iops Aggregate of MongoDB Metrics DISK_PARTITION_IOPS_READ, DISK_PARTITION_IOPS_WRITE, DISK_PARTITION_IOPS_TOTAL | {ops}/s | Gauge |
                                                      -
                                                    • disk_direction
                                                    | -| mongodbatlas.disk.partition.iops.max | Disk partition iops Aggregate of MongoDB Metrics MAX_DISK_PARTITION_IOPS_WRITE, MAX_DISK_PARTITION_IOPS_TOTAL, MAX_DISK_PARTITION_IOPS_READ | {ops}/s | Gauge |
                                                      -
                                                    • disk_direction
                                                    | -| mongodbatlas.disk.partition.latency.average | Disk partition latency Aggregate of MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ | ms | Gauge |
                                                      -
                                                    • disk_direction
                                                    | -| mongodbatlas.disk.partition.latency.max | Disk partition latency Aggregate of MongoDB Metrics MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ | ms | Gauge |
                                                      -
                                                    • disk_direction
                                                    | -| mongodbatlas.disk.partition.space.average | Disk partition space Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED | By | Gauge |
                                                      -
                                                    | -| mongodbatlas.disk.partition.space.max | Disk partition space Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED | By | Gauge |
                                                      -
                                                    | -| mongodbatlas.disk.partition.usage.average | Disk partition usage (%) Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED | 1 | Gauge |
                                                      -
                                                    • disk_status
                                                    | -| mongodbatlas.disk.partition.usage.max | Disk partition usage (%) Aggregate of MongoDB Metrics MAX_DISK_PARTITION_SPACE_PERCENT_USED, MAX_DISK_PARTITION_SPACE_PERCENT_FREE | 1 | Gauge |
                                                      -
                                                    • disk_status
                                                    | -| mongodbatlas.disk.partition.utilization.average | Disk partition utilization (%) MongoDB Metrics DISK_PARTITION_UTILIZATION | 1 | Gauge |
                                                      -
                                                    | -| mongodbatlas.disk.partition.utilization.max | Disk partition utilization (%) MongoDB Metrics MAX_DISK_PARTITION_UTILIZATION | 1 | Gauge |
                                                      -
                                                    | -| mongodbatlas.process.asserts | Number of assertions per second Aggregate of MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING | {assertions}/s | Gauge |
                                                      -
                                                    • assert_type
                                                    | -| mongodbatlas.process.background_flush | Amount of data flushed in the background MongoDB Metric BACKGROUND_FLUSH_AVG | 1 | Gauge |
                                                      -
                                                    | -| mongodbatlas.process.cache.io | Cache throughput (per second) Aggregate of MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM | By | Gauge |
                                                      -
                                                    • cache_direction
                                                    | -| mongodbatlas.process.cache.size | Cache sizes Aggregate of MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES | By | Sum |
                                                      -
                                                    • cache_status
                                                    | -| mongodbatlas.process.connections | Number of current connections MongoDB Metric CONNECTIONS | {connections} | Sum |
                                                      -
                                                    | -| mongodbatlas.process.cpu.children.normalized.usage.average | CPU Usage for child processes, normalized to pct Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.cpu.children.normalized.usage.max | CPU Usage for child processes, normalized to pct Aggregate of MongoDB Metrics MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.cpu.children.usage.average | CPU Usage for child processes (%) Aggregate of MongoDB Metrics PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_USER | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.cpu.children.usage.max | CPU Usage for child processes (%) Aggregate of MongoDB Metrics MAX_PROCESS_CPU_CHILDREN_USER, MAX_PROCESS_CPU_CHILDREN_KERNEL | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.cpu.normalized.usage.average | CPU Usage, normalized to pct Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_KERNEL, PROCESS_NORMALIZED_CPU_USER | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.cpu.normalized.usage.max | CPU Usage, normalized to pct Aggregate of MongoDB Metrics MAX_PROCESS_NORMALIZED_CPU_USER, MAX_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.cpu.usage.average | CPU Usage (%) Aggregate of MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.cpu.usage.max | CPU Usage (%) Aggregate of MongoDB Metrics MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.cursors | Number of cursors Aggregate of MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT | {cursors} | Gauge |
                                                      -
                                                    • cursor_state
                                                    | -| mongodbatlas.process.db.document.rate | Document access rates Aggregate of MongoDB Metrics DOCUMENT_METRICS_UPDATED, DOCUMENT_METRICS_DELETED, DOCUMENT_METRICS_RETURNED, DOCUMENT_METRICS_INSERTED | {documents}/s | Gauge |
                                                      -
                                                    • document_status
                                                    | -| mongodbatlas.process.db.operations.rate | DB Operation Rates Aggregate of MongoDB Metrics OPCOUNTER_GETMORE, OPERATIONS_SCAN_AND_ORDER, OPCOUNTER_UPDATE, OPCOUNTER_REPL_UPDATE, OPCOUNTER_CMD, OPCOUNTER_DELETE, OPCOUNTER_REPL_DELETE, OPCOUNTER_REPL_CMD, OPCOUNTER_QUERY, OPCOUNTER_REPL_INSERT, OPCOUNTER_INSERT | {operations}/s | Gauge |
                                                      -
                                                    • operation
                                                    • cluster_role
                                                    | -| mongodbatlas.process.db.operations.time | DB Operation Times Aggregate of MongoDB Metrics OP_EXECUTION_TIME_WRITES, OP_EXECUTION_TIME_COMMANDS, OP_EXECUTION_TIME_READS | ms | Sum |
                                                      -
                                                    • execution_type
                                                    | -| mongodbatlas.process.db.query_executor.scanned | Scanned objects Aggregate of MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED | {objects}/s | Gauge |
                                                      -
                                                    • scanned_type
                                                    | -| mongodbatlas.process.db.query_targeting.scanned_per_returned | Scanned objects per returned Aggregate of MongoDB Metrics QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED, QUERY_TARGETING_SCANNED_PER_RETURNED | {scanned}/{returned} | Gauge |
                                                      -
                                                    • scanned_type
                                                    | -| mongodbatlas.process.db.storage | Storage used by the database Aggregate of MongoDB Metrics DB_INDEX_SIZE_TOTAL, DB_DATA_SIZE_TOTAL_WO_SYSTEM, DB_STORAGE_TOTAL, DB_DATA_SIZE_TOTAL | By | Gauge |
                                                      -
                                                    • storage_status
                                                    | -| mongodbatlas.process.fts.cpu.usage | Full text search CPU (%) Aggregate of MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.process.global_lock | Number and status of locks Aggregate of MongoDB Metrics GLOBAL_LOCK_CURRENT_QUEUE_WRITERS, GLOBAL_LOCK_CURRENT_QUEUE_READERS, GLOBAL_LOCK_CURRENT_QUEUE_TOTAL | {locks} | Gauge |
                                                      -
                                                    • global_lock_state
                                                    | -| mongodbatlas.process.index.btree_miss_ratio | Index miss ratio (%) MongoDB Metric INDEX_COUNTERS_BTREE_MISS_RATIO | 1 | Gauge |
                                                      -
                                                    | -| mongodbatlas.process.index.counters | Indexes Aggregate of MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS | {indexes} | Gauge |
                                                      -
                                                    • btree_counter_type
                                                    | -| mongodbatlas.process.journaling.commits | Journaling commits MongoDB Metric JOURNALING_COMMITS_IN_WRITE_LOCK | {commits} | Gauge |
                                                      -
                                                    | -| mongodbatlas.process.journaling.data_files | Data file sizes MongoDB Metric JOURNALING_WRITE_DATA_FILES_MB | MiBy | Gauge |
                                                      -
                                                    | -| mongodbatlas.process.journaling.written | Journals written MongoDB Metric JOURNALING_MB | MiBy | Gauge |
                                                      -
                                                    | -| mongodbatlas.process.memory.usage | Memory Usage Aggregate of MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT | By | Gauge |
                                                      -
                                                    • memory_state
                                                    | -| mongodbatlas.process.network.io | Network IO Aggregate of MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN | By/s | Gauge |
                                                      -
                                                    • direction
                                                    | -| mongodbatlas.process.network.requests | Network requests MongoDB Metric NETWORK_NUM_REQUESTS | {requests} | Sum |
                                                      -
                                                    | -| mongodbatlas.process.oplog.rate | Execution rate by operation MongoDB Metric OPLOG_RATE_GB_PER_HOUR | GiBy/h | Gauge |
                                                      -
                                                    | -| mongodbatlas.process.oplog.time | Execution time by operation Aggregate of MongoDB Metrics OPLOG_MASTER_TIME, OPLOG_SLAVE_LAG_MASTER_TIME, OPLOG_MASTER_LAG_TIME_DIFF | s | Gauge |
                                                      -
                                                    • oplog_type
                                                    | -| mongodbatlas.process.page_faults | Page faults Aggregate of MongoDB Metrics GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN, EXTRA_INFO_PAGE_FAULTS, GLOBAL_ACCESSES_NOT_IN_MEMORY | {faults}/s | Gauge |
                                                      -
                                                    • memory_issue_type
                                                    | -| mongodbatlas.process.restarts | Restarts in last hour Aggregate of MongoDB Metrics RESTARTS_IN_LAST_HOUR | {restarts}/h | Gauge |
                                                      -
                                                    | -| mongodbatlas.process.tickets | Tickets Aggregate of MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS | {tickets} | Gauge |
                                                      -
                                                    • ticket_type
                                                    | -| mongodbatlas.system.cpu.normalized.usage.average | System CPU Normalized to pct Aggregate of MongoDB Metrics SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_IRQ, SYSTEM_NORMALIZED_CPU_KERNEL, SYSTEM_NORMALIZED_CPU_STEAL, SYSTEM_NORMALIZED_CPU_SOFTIRQ, SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_USER | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.system.cpu.normalized.usage.max | System CPU Normalized to pct Aggregate of MongoDB Metrics MAX_SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_NICE, MAX_SYSTEM_NORMALIZED_CPU_IOWAIT, MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_STEAL, MAX_SYSTEM_NORMALIZED_CPU_KERNEL, MAX_SYSTEM_NORMALIZED_CPU_GUEST, MAX_SYSTEM_NORMALIZED_CPU_IRQ | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.system.cpu.usage.average | System CPU Usage (%) Aggregate of MongoDB Metrics SYSTEM_CPU_USER, SYSTEM_CPU_GUEST, SYSTEM_CPU_SOFTIRQ, SYSTEM_CPU_IRQ, SYSTEM_CPU_KERNEL, SYSTEM_CPU_IOWAIT, SYSTEM_CPU_NICE, SYSTEM_CPU_STEAL | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.system.cpu.usage.max | System CPU Usage (%) Aggregate of MongoDB Metrics MAX_SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_IRQ, MAX_SYSTEM_CPU_GUEST, MAX_SYSTEM_CPU_IOWAIT, MAX_SYSTEM_CPU_NICE, MAX_SYSTEM_CPU_KERNEL, MAX_SYSTEM_CPU_USER, MAX_SYSTEM_CPU_STEAL | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.system.fts.cpu.normalized.usage | Full text search disk usage (%) Aggregate of MongoDB Metrics FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
                                                      -
                                                    • cpu_state
                                                    | -| mongodbatlas.system.fts.cpu.usage | Full-text search (%) | 1 | Gauge |
                                                    • cpu_state
                                                    | -| mongodbatlas.system.fts.disk.used | Full text search disk usage MongoDB Metric FTS_DISK_USAGE | By | Gauge |
                                                      -
                                                    | -| mongodbatlas.system.fts.memory.usage | Full-text search Aggregate of MongoDB Metrics FTS_MEMORY_MAPPED, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY | MiBy | Sum |
                                                      -
                                                    • memory_state
                                                    | -| mongodbatlas.system.memory.usage.average | System Memory Usage Aggregate of MongoDB Metrics SYSTEM_MEMORY_AVAILABLE, SYSTEM_MEMORY_BUFFERS, SYSTEM_MEMORY_USED, SYSTEM_MEMORY_CACHED, SYSTEM_MEMORY_SHARED, SYSTEM_MEMORY_FREE | KiBy | Gauge |
                                                      -
                                                    • memory_state
                                                    | -| mongodbatlas.system.memory.usage.max | System Memory Usage Aggregate of MongoDB Metrics MAX_SYSTEM_MEMORY_CACHED, MAX_SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_USED, MAX_SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_FREE, MAX_SYSTEM_MEMORY_SHARED | KiBy | Gauge |
                                                      -
                                                    • memory_state
                                                    | -| mongodbatlas.system.network.io.average | System Network IO Aggregate of MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT | By/s | Gauge |
                                                      -
                                                    • direction
                                                    | -| mongodbatlas.system.network.io.max | System Network IO Aggregate of MongoDB Metrics MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN | By/s | Gauge |
                                                      -
                                                    • direction
                                                    | -| mongodbatlas.system.paging.io.average | Swap IO Aggregate of MongoDB Metrics SWAP_IO_IN, SWAP_IO_OUT | {pages}/s | Gauge |
                                                      -
                                                    • direction
                                                    | -| mongodbatlas.system.paging.io.max | Swap IO Aggregate of MongoDB Metrics MAX_SWAP_IO_IN, MAX_SWAP_IO_OUT | {pages}/s | Gauge |
                                                      -
                                                    • direction
                                                    | -| mongodbatlas.system.paging.usage.average | Swap usage Aggregate of MongoDB Metrics SWAP_USAGE_FREE, SWAP_USAGE_USED | KiBy | Gauge |
                                                      -
                                                    • direction
                                                    | -| mongodbatlas.system.paging.usage.max | Swap usage Aggregate of MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED | KiBy | Gauge |
                                                      -
                                                    • direction
                                                    | +| mongodbatlas.db.counts | Database feature size Aggregate of MongoDB Metrics DATABASE_EXTENT_COUNT, DATABASE_VIEW_COUNT, DATABASE_COLLECTION_COUNT, DATABASE_OBJECT_COUNT, DATABASE_INDEX_COUNT | {objects} | Gauge |
                                                    | +| mongodbatlas.db.size | Database feature size Aggregate of MongoDB Metrics DATABASE_DATA_SIZE, DATABASE_STORAGE_SIZE, DATABASE_INDEX_SIZE, DATABASE_AVERAGE_OBJECT_SIZE | By | Gauge |
                                                    | +| mongodbatlas.disk.partition.iops.average | Disk partition iops Aggregate of MongoDB Metrics DISK_PARTITION_IOPS_READ, DISK_PARTITION_IOPS_WRITE, DISK_PARTITION_IOPS_TOTAL | {ops}/s | Gauge |
                                                    | +| mongodbatlas.disk.partition.iops.max | Disk partition iops Aggregate of MongoDB Metrics MAX_DISK_PARTITION_IOPS_WRITE, MAX_DISK_PARTITION_IOPS_TOTAL, MAX_DISK_PARTITION_IOPS_READ | {ops}/s | Gauge |
                                                    | +| mongodbatlas.disk.partition.latency.average | Disk partition latency Aggregate of MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ | ms | Gauge |
                                                    | +| mongodbatlas.disk.partition.latency.max | Disk partition latency Aggregate of MongoDB Metrics MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ | ms | Gauge |
                                                    | +| mongodbatlas.disk.partition.space.average | Disk partition space Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED | By | Gauge |
                                                    | +| mongodbatlas.disk.partition.space.max | Disk partition space Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED | By | Gauge |
                                                    | +| mongodbatlas.disk.partition.usage.average | Disk partition usage (%) Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED | 1 | Gauge |
                                                    | +| mongodbatlas.disk.partition.usage.max | Disk partition usage (%) Aggregate of MongoDB Metrics MAX_DISK_PARTITION_SPACE_PERCENT_USED, MAX_DISK_PARTITION_SPACE_PERCENT_FREE | 1 | Gauge |
                                                    | +| mongodbatlas.disk.partition.utilization.average | Disk partition utilization (%) MongoDB Metrics DISK_PARTITION_UTILIZATION | 1 | Gauge |
                                                    | +| mongodbatlas.disk.partition.utilization.max | Disk partition utilization (%) MongoDB Metrics MAX_DISK_PARTITION_UTILIZATION | 1 | Gauge |
                                                    | +| mongodbatlas.process.asserts | Number of assertions per second Aggregate of MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING | {assertions}/s | Gauge |
                                                    | +| mongodbatlas.process.background_flush | Amount of data flushed in the background MongoDB Metric BACKGROUND_FLUSH_AVG | 1 | Gauge |
                                                    | +| mongodbatlas.process.cache.io | Cache throughput (per second) Aggregate of MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM | By | Gauge |
                                                    | +| mongodbatlas.process.cache.size | Cache sizes Aggregate of MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES | By | Sum |
                                                    | +| mongodbatlas.process.connections | Number of current connections MongoDB Metric CONNECTIONS | {connections} | Sum |
                                                    | +| mongodbatlas.process.cpu.children.normalized.usage.average | CPU Usage for child processes, normalized to pct Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
                                                    | +| mongodbatlas.process.cpu.children.normalized.usage.max | CPU Usage for child processes, normalized to pct Aggregate of MongoDB Metrics MAX_PROCESS_NORMALIZED_CPU_CHILDREN_KERNEL, MAX_PROCESS_NORMALIZED_CPU_CHILDREN_USER | 1 | Gauge |
                                                    | +| mongodbatlas.process.cpu.children.usage.average | CPU Usage for child processes (%) Aggregate of MongoDB Metrics PROCESS_CPU_CHILDREN_KERNEL, PROCESS_CPU_CHILDREN_USER | 1 | Gauge |
                                                    | +| mongodbatlas.process.cpu.children.usage.max | CPU Usage for child processes (%) Aggregate of MongoDB Metrics MAX_PROCESS_CPU_CHILDREN_USER, MAX_PROCESS_CPU_CHILDREN_KERNEL | 1 | Gauge |
                                                    | +| mongodbatlas.process.cpu.normalized.usage.average | CPU Usage, normalized to pct Aggregate of MongoDB Metrics PROCESS_NORMALIZED_CPU_KERNEL, PROCESS_NORMALIZED_CPU_USER | 1 | Gauge |
                                                    | +| mongodbatlas.process.cpu.normalized.usage.max | CPU Usage, normalized to pct Aggregate of MongoDB Metrics MAX_PROCESS_NORMALIZED_CPU_USER, MAX_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
                                                    | +| mongodbatlas.process.cpu.usage.average | CPU Usage (%) Aggregate of MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER | 1 | Gauge |
                                                    | +| mongodbatlas.process.cpu.usage.max | CPU Usage (%) Aggregate of MongoDB Metrics MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER | 1 | Gauge |
                                                    | +| mongodbatlas.process.cursors | Number of cursors Aggregate of MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT | {cursors} | Gauge |
                                                    | +| mongodbatlas.process.db.document.rate | Document access rates Aggregate of MongoDB Metrics DOCUMENT_METRICS_UPDATED, DOCUMENT_METRICS_DELETED, DOCUMENT_METRICS_RETURNED, DOCUMENT_METRICS_INSERTED | {documents}/s | Gauge |
                                                    | +| mongodbatlas.process.db.operations.rate | DB Operation Rates Aggregate of MongoDB Metrics OPCOUNTER_GETMORE, OPERATIONS_SCAN_AND_ORDER, OPCOUNTER_UPDATE, OPCOUNTER_REPL_UPDATE, OPCOUNTER_CMD, OPCOUNTER_DELETE, OPCOUNTER_REPL_DELETE, OPCOUNTER_REPL_CMD, OPCOUNTER_QUERY, OPCOUNTER_REPL_INSERT, OPCOUNTER_INSERT | {operations}/s | Gauge |
                                                    | +| mongodbatlas.process.db.operations.time | DB Operation Times Aggregate of MongoDB Metrics OP_EXECUTION_TIME_WRITES, OP_EXECUTION_TIME_COMMANDS, OP_EXECUTION_TIME_READS | ms | Sum |
                                                    | +| mongodbatlas.process.db.query_executor.scanned | Scanned objects Aggregate of MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED | {objects}/s | Gauge |
                                                    | +| mongodbatlas.process.db.query_targeting.scanned_per_returned | Scanned objects per returned Aggregate of MongoDB Metrics QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED, QUERY_TARGETING_SCANNED_PER_RETURNED | {scanned}/{returned} | Gauge |
                                                    | +| mongodbatlas.process.db.storage | Storage used by the database Aggregate of MongoDB Metrics DB_INDEX_SIZE_TOTAL, DB_DATA_SIZE_TOTAL_WO_SYSTEM, DB_STORAGE_TOTAL, DB_DATA_SIZE_TOTAL | By | Gauge |
                                                    | +| mongodbatlas.process.fts.cpu.usage | Full text search CPU (%) Aggregate of MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL | 1 | Gauge |
                                                    | +| mongodbatlas.process.global_lock | Number and status of locks Aggregate of MongoDB Metrics GLOBAL_LOCK_CURRENT_QUEUE_WRITERS, GLOBAL_LOCK_CURRENT_QUEUE_READERS, GLOBAL_LOCK_CURRENT_QUEUE_TOTAL | {locks} | Gauge |
                                                    | +| mongodbatlas.process.index.btree_miss_ratio | Index miss ratio (%) MongoDB Metric INDEX_COUNTERS_BTREE_MISS_RATIO | 1 | Gauge |
                                                    | +| mongodbatlas.process.index.counters | Indexes Aggregate of MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS | {indexes} | Gauge |
                                                    | +| mongodbatlas.process.journaling.commits | Journaling commits MongoDB Metric JOURNALING_COMMITS_IN_WRITE_LOCK | {commits} | Gauge |
                                                    | +| mongodbatlas.process.journaling.data_files | Data file sizes MongoDB Metric JOURNALING_WRITE_DATA_FILES_MB | MiBy | Gauge |
                                                    | +| mongodbatlas.process.journaling.written | Journals written MongoDB Metric JOURNALING_MB | MiBy | Gauge |
                                                    | +| mongodbatlas.process.memory.usage | Memory Usage Aggregate of MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT | By | Gauge |
                                                    | +| mongodbatlas.process.network.io | Network IO Aggregate of MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN | By/s | Gauge |
                                                    | +| mongodbatlas.process.network.requests | Network requests MongoDB Metric NETWORK_NUM_REQUESTS | {requests} | Sum |
                                                    | +| mongodbatlas.process.oplog.rate | Execution rate by operation MongoDB Metric OPLOG_RATE_GB_PER_HOUR | GiBy/h | Gauge |
                                                    | +| mongodbatlas.process.oplog.time | Execution time by operation Aggregate of MongoDB Metrics OPLOG_MASTER_TIME, OPLOG_SLAVE_LAG_MASTER_TIME, OPLOG_MASTER_LAG_TIME_DIFF | s | Gauge |
                                                    | +| mongodbatlas.process.page_faults | Page faults Aggregate of MongoDB Metrics GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN, EXTRA_INFO_PAGE_FAULTS, GLOBAL_ACCESSES_NOT_IN_MEMORY | {faults}/s | Gauge |
                                                    | +| mongodbatlas.process.restarts | Restarts in last hour Aggregate of MongoDB Metrics RESTARTS_IN_LAST_HOUR | {restarts}/h | Gauge |
                                                    | +| mongodbatlas.process.tickets | Tickets Aggregate of MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS | {tickets} | Gauge |
                                                    | +| mongodbatlas.system.cpu.normalized.usage.average | System CPU Normalized to pct Aggregate of MongoDB Metrics SYSTEM_NORMALIZED_CPU_IOWAIT, SYSTEM_NORMALIZED_CPU_GUEST, SYSTEM_NORMALIZED_CPU_IRQ, SYSTEM_NORMALIZED_CPU_KERNEL, SYSTEM_NORMALIZED_CPU_STEAL, SYSTEM_NORMALIZED_CPU_SOFTIRQ, SYSTEM_NORMALIZED_CPU_NICE, SYSTEM_NORMALIZED_CPU_USER | 1 | Gauge |
                                                    | +| mongodbatlas.system.cpu.normalized.usage.max | System CPU Normalized to pct Aggregate of MongoDB Metrics MAX_SYSTEM_NORMALIZED_CPU_USER, MAX_SYSTEM_NORMALIZED_CPU_NICE, MAX_SYSTEM_NORMALIZED_CPU_IOWAIT, MAX_SYSTEM_NORMALIZED_CPU_SOFTIRQ, MAX_SYSTEM_NORMALIZED_CPU_STEAL, MAX_SYSTEM_NORMALIZED_CPU_KERNEL, MAX_SYSTEM_NORMALIZED_CPU_GUEST, MAX_SYSTEM_NORMALIZED_CPU_IRQ | 1 | Gauge |
                                                    | +| mongodbatlas.system.cpu.usage.average | System CPU Usage (%) Aggregate of MongoDB Metrics SYSTEM_CPU_USER, SYSTEM_CPU_GUEST, SYSTEM_CPU_SOFTIRQ, SYSTEM_CPU_IRQ, SYSTEM_CPU_KERNEL, SYSTEM_CPU_IOWAIT, SYSTEM_CPU_NICE, SYSTEM_CPU_STEAL | 1 | Gauge |
                                                    | +| mongodbatlas.system.cpu.usage.max | System CPU Usage (%) Aggregate of MongoDB Metrics MAX_SYSTEM_CPU_SOFTIRQ, MAX_SYSTEM_CPU_IRQ, MAX_SYSTEM_CPU_GUEST, MAX_SYSTEM_CPU_IOWAIT, MAX_SYSTEM_CPU_NICE, MAX_SYSTEM_CPU_KERNEL, MAX_SYSTEM_CPU_USER, MAX_SYSTEM_CPU_STEAL | 1 | Gauge |
                                                    | +| mongodbatlas.system.fts.cpu.normalized.usage | Full text search disk usage (%) Aggregate of MongoDB Metrics FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL | 1 | Gauge |
                                                    | +| mongodbatlas.system.fts.cpu.usage | Full-text search (%) | 1 | Gauge |
                                                    | +| mongodbatlas.system.fts.disk.used | Full text search disk usage MongoDB Metric FTS_DISK_USAGE | By | Gauge |
                                                    | +| mongodbatlas.system.fts.memory.usage | Full-text search Aggregate of MongoDB Metrics FTS_MEMORY_MAPPED, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY | MiBy | Sum |
                                                    | +| mongodbatlas.system.memory.usage.average | System Memory Usage Aggregate of MongoDB Metrics SYSTEM_MEMORY_AVAILABLE, SYSTEM_MEMORY_BUFFERS, SYSTEM_MEMORY_USED, SYSTEM_MEMORY_CACHED, SYSTEM_MEMORY_SHARED, SYSTEM_MEMORY_FREE | KiBy | Gauge |
                                                    | +| mongodbatlas.system.memory.usage.max | System Memory Usage Aggregate of MongoDB Metrics MAX_SYSTEM_MEMORY_CACHED, MAX_SYSTEM_MEMORY_AVAILABLE, MAX_SYSTEM_MEMORY_USED, MAX_SYSTEM_MEMORY_BUFFERS, MAX_SYSTEM_MEMORY_FREE, MAX_SYSTEM_MEMORY_SHARED | KiBy | Gauge |
                                                    | +| mongodbatlas.system.network.io.average | System Network IO Aggregate of MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT | By/s | Gauge |
                                                    | +| mongodbatlas.system.network.io.max | System Network IO Aggregate of MongoDB Metrics MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN | By/s | Gauge |
                                                    | +| mongodbatlas.system.paging.io.average | Swap IO Aggregate of MongoDB Metrics SWAP_IO_IN, SWAP_IO_OUT | {pages}/s | Gauge |
                                                    | +| mongodbatlas.system.paging.io.max | Swap IO Aggregate of MongoDB Metrics MAX_SWAP_IO_IN, MAX_SWAP_IO_OUT | {pages}/s | Gauge |
                                                    | +| mongodbatlas.system.paging.usage.average | Swap usage Aggregate of MongoDB Metrics SWAP_USAGE_FREE, SWAP_USAGE_USED | KiBy | Gauge |
                                                    | +| mongodbatlas.system.paging.usage.max | Swap usage Aggregate of MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED | KiBy | Gauge |
                                                    | ## Attributes | Name | Description | | ---- | ----------- | -| assert_type | MongoDB assertion type | -| btree_counter_type | Database index effectiveness | -| cache_direction | Whether read into or written from | -| cache_status | Cache status | -| cluster_role | Whether process is acting as replica or primary | -| cpu_state | CPU state | -| cursor_state | Whether cursor is open or timed out | -| direction | Network traffic direction | -| disk_direction | Measurement type for disk operation | -| disk_status | Disk measurement type | -| document_status | Status of documents in the database | -| execution_type | Type of command | -| global_lock_state | Which queue is locked | -| memory_issue_type | Type of memory issue encountered | -| memory_state | Memory usage type | -| object_type | MongoDB object type | -| operation | Type of database operation | -| oplog_type | Oplog type | -| scanned_type | Objects or indexes scanned during query | -| storage_status | Views on database size | -| ticket_type | Type of ticket available | \ No newline at end of file diff --git a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go index 68102079b8af..6b4bdd1e440b 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/generated_metrics.go @@ -845,321 +845,9 @@ var Metrics = &metricStruct{ // manipulating those metrics. M is an alias for Metrics var M = Metrics -// Labels contains the possible metric labels that can be used. -var Labels = struct { - // AssertType (MongoDB assertion type) - AssertType string - // BtreeCounterType (Database index effectiveness) - BtreeCounterType string - // CacheDirection (Whether read into or written from) - CacheDirection string - // CacheStatus (Cache status) - CacheStatus string - // ClusterRole (Whether process is acting as replica or primary) - ClusterRole string - // CPUState (CPU state) - CPUState string - // CursorState (Whether cursor is open or timed out) - CursorState string - // Direction (Network traffic direction) - Direction string - // DiskDirection (Measurement type for disk operation) - DiskDirection string - // DiskStatus (Disk measurement type) - DiskStatus string - // DocumentStatus (Status of documents in the database) - DocumentStatus string - // ExecutionType (Type of command) - ExecutionType string - // GlobalLockState (Which queue is locked) - GlobalLockState string - // MemoryIssueType (Type of memory issue encountered) - MemoryIssueType string - // MemoryState (Memory usage type) - MemoryState string - // ObjectType (MongoDB object type) - ObjectType string - // Operation (Type of database operation) - Operation string - // OplogType (Oplog type) - OplogType string - // ScannedType (Objects or indexes scanned during query) - ScannedType string - // StorageStatus (Views on database size) - StorageStatus string - // TicketType (Type of ticket available) - TicketType string -}{ - "assert_type", - "btree_counter_type", - "cache_direction", - "cache_status", - "cluster_role", - "cpu_state", - "cursor_state", - "direction", - "disk_direction", - "disk_status", - "document_status", - "execution_type", - "global_lock_state", - "memory_issue_type", - "memory_state", - "object_type", - "operation", - "oplog_type", - "scanned_type", - "storage_status", - "ticket_type", -} - -// L contains the possible metric labels that can be used. L is an alias for -// Labels. -var L = Labels - -// LabelAssertType are the possible values that the label "assert_type" can have. -var LabelAssertType = struct { - Regular string - Warning string - Msg string - User string -}{ - "regular", - "warning", - "msg", - "user", -} - -// LabelBtreeCounterType are the possible values that the label "btree_counter_type" can have. -var LabelBtreeCounterType = struct { - Accesses string - Hits string - Misses string -}{ - "accesses", - "hits", - "misses", -} - -// LabelCacheDirection are the possible values that the label "cache_direction" can have. -var LabelCacheDirection = struct { - ReadInto string - WrittenFrom string -}{ - "read_into", - "written_from", -} - -// LabelCacheStatus are the possible values that the label "cache_status" can have. -var LabelCacheStatus = struct { - Dirty string - Used string -}{ - "dirty", - "used", -} - -// LabelClusterRole are the possible values that the label "cluster_role" can have. -var LabelClusterRole = struct { - Primary string - Replica string -}{ - "primary", - "replica", -} - -// LabelCPUState are the possible values that the label "cpu_state" can have. -var LabelCPUState = struct { - Kernel string - User string - Nice string - Iowait string - Irq string - Softirq string - Guest string - Steal string -}{ - "kernel", - "user", - "nice", - "iowait", - "irq", - "softirq", - "guest", - "steal", -} - -// LabelCursorState are the possible values that the label "cursor_state" can have. -var LabelCursorState = struct { - TimedOut string - Open string -}{ - "timed_out", - "open", -} - -// LabelDirection are the possible values that the label "direction" can have. -var LabelDirection = struct { - Receive string - Transmit string -}{ - "receive", - "transmit", -} - -// LabelDiskDirection are the possible values that the label "disk_direction" can have. -var LabelDiskDirection = struct { - Read string - Write string - Total string -}{ - "read", - "write", - "total", -} - -// LabelDiskStatus are the possible values that the label "disk_status" can have. -var LabelDiskStatus = struct { - Free string - Used string -}{ - "free", - "used", -} +// Attributes contains the possible metric attributes that can be used. +var Attributes = struct { +}{} -// LabelDocumentStatus are the possible values that the label "document_status" can have. -var LabelDocumentStatus = struct { - Returned string - Inserted string - Updated string - Deleted string -}{ - "returned", - "inserted", - "updated", - "deleted", -} - -// LabelExecutionType are the possible values that the label "execution_type" can have. -var LabelExecutionType = struct { - Reads string - Writes string - Commands string -}{ - "reads", - "writes", - "commands", -} - -// LabelGlobalLockState are the possible values that the label "global_lock_state" can have. -var LabelGlobalLockState = struct { - CurrentQueueTotal string - CurrentQueueReaders string - CurrentQueueWriters string -}{ - "current_queue_total", - "current_queue_readers", - "current_queue_writers", -} - -// LabelMemoryIssueType are the possible values that the label "memory_issue_type" can have. -var LabelMemoryIssueType = struct { - ExtraInfo string - GlobalAccessesNotInMemory string - ExceptionsThrown string -}{ - "extra_info", - "global_accesses_not_in_memory", - "exceptions_thrown", -} - -// LabelMemoryState are the possible values that the label "memory_state" can have. -var LabelMemoryState = struct { - Resident string - Virtual string - Mapped string - Computed string -}{ - "resident", - "virtual", - "mapped", - "computed", -} - -// LabelObjectType are the possible values that the label "object_type" can have. -var LabelObjectType = struct { - Collection string - Index string - Extent string - Object string - View string - Storage string - Data string -}{ - "collection", - "index", - "extent", - "object", - "view", - "storage", - "data", -} - -// LabelOperation are the possible values that the label "operation" can have. -var LabelOperation = struct { - Cmd string - Query string - Update string - Delete string - Getmore string - Insert string -}{ - "cmd", - "query", - "update", - "delete", - "getmore", - "insert", -} - -// LabelOplogType are the possible values that the label "oplog_type" can have. -var LabelOplogType = struct { - SlaveLagMasterTime string - MasterTime string - MasterLagTimeDiff string -}{ - "slave_lag_master_time", - "master_time", - "master_lag_time_diff", -} - -// LabelScannedType are the possible values that the label "scanned_type" can have. -var LabelScannedType = struct { - IndexItems string - Objects string -}{ - "index_items", - "objects", -} - -// LabelStorageStatus are the possible values that the label "storage_status" can have. -var LabelStorageStatus = struct { - Total string - DataSize string - IndexSize string - DataSizeWoSystem string -}{ - "total", - "data_size", - "index_size", - "data_size_wo_system", -} - -// LabelTicketType are the possible values that the label "ticket_type" can have. -var LabelTicketType = struct { - AvailableReads string - AvailableWrites string -}{ - "available_reads", - "available_writes", -} +// A is an alias for Attributes. +var A = Attributes