Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongodbatlas add metrics #5921

Merged
merged 13 commits into from
Nov 16, 2021
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions receiver/mongodbatlasreceiver/codegen.go
Original file line number Diff line number Diff line change
@@ -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
78 changes: 78 additions & 0 deletions receiver/mongodbatlasreceiver/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[comment]: <> (Code generated by mdatagen. DO NOT EDIT.)

# mongoatlasreceiver

## Metrics

These are the metrics available for this scraper.

| Name | Description | Unit | Type | Attributes |
zenmoto marked this conversation as resolved.
Show resolved Hide resolved
| ---- | ----------- | ---- | ---- | ---------- |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.disk.partition.latency.average | Disk partition latency Aggregate of MongoDB Metrics DISK_PARTITION_LATENCY_WRITE, DISK_PARTITION_LATENCY_READ | ms | Gauge | <ul> </ul> |
| mongodbatlas.disk.partition.latency.max | Disk partition latency Aggregate of MongoDB Metrics MAX_DISK_PARTITION_LATENCY_WRITE, MAX_DISK_PARTITION_LATENCY_READ | ms | Gauge | <ul> </ul> |
| mongodbatlas.disk.partition.space.average | Disk partition space Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED | By | Gauge | <ul> </ul> |
| mongodbatlas.disk.partition.space.max | Disk partition space Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_FREE, DISK_PARTITION_SPACE_USED | By | Gauge | <ul> </ul> |
| mongodbatlas.disk.partition.usage.average | Disk partition usage (%) Aggregate of MongoDB Metrics DISK_PARTITION_SPACE_PERCENT_FREE, DISK_PARTITION_SPACE_PERCENT_USED | 1 | Gauge | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.disk.partition.utilization.average | Disk partition utilization (%) MongoDB Metrics DISK_PARTITION_UTILIZATION | 1 | Gauge | <ul> </ul> |
| mongodbatlas.disk.partition.utilization.max | Disk partition utilization (%) MongoDB Metrics MAX_DISK_PARTITION_UTILIZATION | 1 | Gauge | <ul> </ul> |
| mongodbatlas.process.asserts | Number of assertions per second Aggregate of MongoDB Metrics ASSERT_REGULAR, ASSERT_USER, ASSERT_MSG, ASSERT_WARNING | {assertions}/s | Gauge | <ul> </ul> |
| mongodbatlas.process.background_flush | Amount of data flushed in the background MongoDB Metric BACKGROUND_FLUSH_AVG | 1 | Gauge | <ul> </ul> |
| mongodbatlas.process.cache.io | Cache throughput (per second) Aggregate of MongoDB Metrics CACHE_BYTES_READ_INTO, CACHE_BYTES_WRITTEN_FROM | By | Gauge | <ul> </ul> |
| mongodbatlas.process.cache.size | Cache sizes Aggregate of MongoDB Metrics CACHE_USED_BYTES, CACHE_DIRTY_BYTES | By | Sum | <ul> </ul> |
| mongodbatlas.process.connections | Number of current connections MongoDB Metric CONNECTIONS | {connections} | Sum | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.process.cpu.usage.average | CPU Usage (%) Aggregate of MongoDB Metrics PROCESS_CPU_KERNEL, PROCESS_CPU_USER | 1 | Gauge | <ul> </ul> |
| mongodbatlas.process.cpu.usage.max | CPU Usage (%) Aggregate of MongoDB Metrics MAX_PROCESS_CPU_KERNEL, MAX_PROCESS_CPU_USER | 1 | Gauge | <ul> </ul> |
| mongodbatlas.process.cursors | Number of cursors Aggregate of MongoDB Metrics CURSORS_TOTAL_OPEN, CURSORS_TOTAL_TIMED_OUT | {cursors} | Gauge | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.process.db.query_executor.scanned | Scanned objects Aggregate of MongoDB Metrics QUERY_EXECUTOR_SCANNED_OBJECTS, QUERY_EXECUTOR_SCANNED | {objects}/s | Gauge | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.process.fts.cpu.usage | Full text search CPU (%) Aggregate of MongoDB Metrics FTS_PROCESS_CPU_USER, FTS_PROCESS_CPU_KERNEL | 1 | Gauge | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.process.index.btree_miss_ratio | Index miss ratio (%) MongoDB Metric INDEX_COUNTERS_BTREE_MISS_RATIO | 1 | Gauge | <ul> </ul> |
| mongodbatlas.process.index.counters | Indexes Aggregate of MongoDB Metrics INDEX_COUNTERS_BTREE_MISSES, INDEX_COUNTERS_BTREE_ACCESSES, INDEX_COUNTERS_BTREE_HITS | {indexes} | Gauge | <ul> </ul> |
| mongodbatlas.process.journaling.commits | Journaling commits MongoDB Metric JOURNALING_COMMITS_IN_WRITE_LOCK | {commits} | Gauge | <ul> </ul> |
| mongodbatlas.process.journaling.data_files | Data file sizes MongoDB Metric JOURNALING_WRITE_DATA_FILES_MB | MiBy | Gauge | <ul> </ul> |
| mongodbatlas.process.journaling.written | Journals written MongoDB Metric JOURNALING_MB | MiBy | Gauge | <ul> </ul> |
| mongodbatlas.process.memory.usage | Memory Usage Aggregate of MongoDB Metrics MEMORY_MAPPED, MEMORY_VIRTUAL, COMPUTED_MEMORY, MEMORY_RESIDENT | By | Gauge | <ul> </ul> |
| mongodbatlas.process.network.io | Network IO Aggregate of MongoDB Metrics NETWORK_BYTES_OUT, NETWORK_BYTES_IN | By/s | Gauge | <ul> </ul> |
| mongodbatlas.process.network.requests | Network requests MongoDB Metric NETWORK_NUM_REQUESTS | {requests} | Sum | <ul> </ul> |
| mongodbatlas.process.oplog.rate | Execution rate by operation MongoDB Metric OPLOG_RATE_GB_PER_HOUR | GiBy/h | Gauge | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.process.restarts | Restarts in last hour Aggregate of MongoDB Metrics RESTARTS_IN_LAST_HOUR | {restarts}/h | Gauge | <ul> </ul> |
| mongodbatlas.process.tickets | Tickets Aggregate of MongoDB Metrics TICKETS_AVAILABLE_WRITE, TICKETS_AVAILABLE_READS | {tickets} | Gauge | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.system.fts.cpu.usage | Full-text search (%) | 1 | Gauge | <ul> </ul> |
| mongodbatlas.system.fts.disk.used | Full text search disk usage MongoDB Metric FTS_DISK_USAGE | By | Gauge | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| 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 | <ul> </ul> |
| mongodbatlas.system.network.io.average | System Network IO Aggregate of MongoDB Metrics SYSTEM_NETWORK_IN, SYSTEM_NETWORK_OUT | By/s | Gauge | <ul> </ul> |
| mongodbatlas.system.network.io.max | System Network IO Aggregate of MongoDB Metrics MAX_SYSTEM_NETWORK_OUT, MAX_SYSTEM_NETWORK_IN | By/s | Gauge | <ul> </ul> |
| mongodbatlas.system.paging.io.average | Swap IO Aggregate of MongoDB Metrics SWAP_IO_IN, SWAP_IO_OUT | {pages}/s | Gauge | <ul> </ul> |
| mongodbatlas.system.paging.io.max | Swap IO Aggregate of MongoDB Metrics MAX_SWAP_IO_IN, MAX_SWAP_IO_OUT | {pages}/s | Gauge | <ul> </ul> |
| mongodbatlas.system.paging.usage.average | Swap usage Aggregate of MongoDB Metrics SWAP_USAGE_FREE, SWAP_USAGE_USED | KiBy | Gauge | <ul> </ul> |
| mongodbatlas.system.paging.usage.max | Swap usage Aggregate of MongoDB Metrics MAX_SWAP_USAGE_FREE, MAX_SWAP_USAGE_USED | KiBy | Gauge | <ul> </ul> |

## Attributes
zenmoto marked this conversation as resolved.
Show resolved Hide resolved

| Name | Description |
| ---- | ----------- |
2 changes: 2 additions & 0 deletions receiver/mongodbatlasreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions receiver/mongodbatlasreceiver/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading