MongoDB

Supported OS Linux Mac OS Windows

통합 버전8.5.0

![MongoDB 대시보드1

개요

MongoDB를 Datadog에 연결하면 다음을 수행할 수 있습니다.

  • 주요 MongoDB 메트릭을 시각화합니다.
  • MongoDB 성능과 나머지 애플리케이션의 상관관계를 파악합니다.

커스텀 find, count, aggregate 쿼리를 사용하여 고유한 메트릭을 만들 수도 있습니다.

데이터베이스 모니터링(DBM)을 통해 쿼리 성능 및 데이터베이스 상태에 대한 인사이트를 얻을 수 있습니다. 표준 통합 외에도 Datadog DBM은 실시간 및 이전 쿼리 스냅샷, 느린 쿼리 메트릭, 데이터베이스 로드, 작업 실행 계획 및 컬렉션 인사이트를 제공합니다.

참고: 이 통합에는 MongoDB v3.0 이상이 필요합니다. MongoDB Atlas와 Datadog의 통합은 M10 이상 클러스터에서만 사용할 수 있습니다. 이 통합은 Alibaba ApsaraDB 및 AWS DocumentDB 인스턴스 기반 클러스터도 지원합니다. DocumentDB Elastic 클러스터는 클러스터(mongos) 엔드포인트만 노출하므로 지원되지 않습니다.

설정

이 페이지에서는 표준 MongoDB Agent 통합에 대해 설명합니다. MongoDB용 데이터베이스 모니터링 제품을 찾고 있다면 Datadog 데이터베이스 모니터링을 확인하세요.

설치

MongoDB 점검은 Datadog Agent 패키지에 포함되어 있어 추가 설치가 필요하지 않습니다.

아키텍처

참고: MongoDB용 데이터베이스 모니터링을 설치하려면 데이터베이스 모니터링 문서에서 해당 호스팅 솔루션을 선택한 후 지침을 확인하세요.

대부분의 하위 수준 메트릭(가동 시간, 스토리지 크기 등)은 모든 mongod 노드에서 수집되어야 합니다. 기타 상위 수준 메트릭(컬렉션/인덱스 통계 등)는 한 번만 수집해야 합니다. 이러한 이유로 Agent를 구성하는 방법은 mongo 클러스터 배포 방법에 따라 달라집니다.

독립형

단일 노드 MongoDB 배포에 대해 이 통합을 구성하려면 다음 지침을 따르세요.

MongoDB 준비

Mongo 셸에서 admin 데이터베이스의 Datadog Agent에 대한 읽기 전용 사용자를 만듭니다.

# 어드민 사용자로 인증합니다.
use admin
db.auth("admin", "<YOUR_MONGODB_ADMIN_PASSWORD>")

# Datadog Agent에 대한 사용자를 만듭니다.
db.createUser({
  "user": "datadog",
  "pwd": "<UNIQUEPASSWORD>",
  "roles": [
    { role: "read", db: "admin" },
    { role: "clusterMonitor", db: "admin" },
    { role: "read", db: "local" },
    #컬렉션/인덱스 통계를 수집하려는 데이터베이스에 대한 추가 읽기 전용 액세스 권한을 부여합니다.
    { role: "read", db: "mydb" },
    { role: "read", db: "myanotherdb" },
    # 또는 모든 데이터베이스에 읽기 전용 액세스 권한을 부여합니다.
    { role: "readAnyDatabase", db: "admin" }
  ]
})
Agent 구성

사용 가능한 모든 mongo 메트릭을 수집하려면 단일 Agent(가급적이면 동일한 노드에서 실행)만 필요합니다. 구성 옵션은 아래를 참조하세요.

복제본 세트

MongoDB 복제본 세트에 대해 이 통합을 구성하려면 다음 지침을 따르세요.

MongoDB 준비

Mongo 셸에서 기본 인증 후 admin 데이터베이스의 Datadog Agent에 대한 읽기 전용 사용자를 만듭니다.

# 어드민 사용자로 인증합니다.
use admin
db.auth("admin", "<YOUR_MONGODB_ADMIN_PASSWORD>")

# Datadog Agent에 대한 사용자를 만듭니다.
db.createUser({
  "user": "datadog",
  "pwd": "<UNIQUEPASSWORD>",
  "roles": [
    { role: "read", db: "admin" },
    { role: "clusterMonitor", db: "admin" },
    { role: "read", db: "local" },
    # 컬렉션/인덱스 통계를 수집하려는 데이터베이스에 대한 추가 읽기 전용 액세스 권한을 부여합니다.
    { role: "read", db: "mydb" },
    { role: "read", db: "myanotherdb" },
    # 또는 모든 데이터베이스에 읽기 전용 액세스 권한을 부여합니다.
    { role: "readAnyDatabase", db: "admin" }
  ]
})
Agent 구성

MongoDB 복제본 세트의 각 호스트에 Datadog Agent를 설치하고 해당 호스트(localhost)의 복제본에 연결하도록 Agent를 구성합니다. 각 호스트에서 Agent를 실행하면 대기 시간과 실행 시간이 줄어들고 호스트에 장애가 발생하더라도 데이터가 계속 연결되어 있습니다.

예를 들어 기본 노드에서 다음을 수행합니다.

init_config:
instances:
  - hosts:
      - mongo-primary:27017

2차 노드에서 다음을 수행합니다.

init_config:
instances:
  - hosts:
      - mongo-secondary:27017

3차 노드에서 다음을 수행합니다.

init_config:
instances:
  - hosts:
      - mongo-tertiary:27017

샤딩

MongoDB 샤드 클러스터에 대해 이 통합을 구성하려면 다음 지침을 따르세요.

MongoDB 준비

클러스터의 각 샤드에 대해 복제본 세트의 기본 샤드에 연결하고 admin 데이터베이스의 Datadog Agent에 대한 로컬 읽기 전용 사용자를 생성합니다.

# 어드민 사용자로 인증합니다.
use admin
db.auth("admin", "<YOUR_MONGODB_ADMIN_PASSWORD>")

# Datadog Agent에 대한 사용자를 만듭니다.
db.createUser({
  "user": "datadog",
  "pwd": "<UNIQUEPASSWORD>",
  "roles": [
    { role: "read", db: "admin" },
    { role: "clusterMonitor", db: "admin" },
    { role: "read", db: "local" }
  ]
})

그런 다음 mongos 프록시에서 동일한 사용자를 만듭니다. 이 작업을 수행하면 구성 서버에 로컬 사용자가 생성되고 직접 연결이 허용됩니다.

Agent 구성
  1. 각 샤드의 각 구성원에 대해 하나의 Agent를 구성합니다.
  2. 구성 서버의 각 구성원에 대해 하나의 Agent를 구성합니다.
  3. mongos 프록시를 통해 클러스터에 연결하도록 하나의 추가 Agent를 구성합니다. 이 mongos 프록시는 모니터링 전용의 새로운 프록시이거나 기존 mongos 프록시일 수 있습니다.

참고: 중재자 노드 모니터링은 지원되지 않습니다(자세한 내용은 MongoDB Replica Set Arbiter 참조). 그러나 기본 노드에 연결된 Agent가 중재자 노드의 상태 변경을 보고합니다.

설정

호스트에서 실행되는 경우 아래 지침에 따라 이 점검을 설정하세요. 컨테이너화된 환경 경우 도커(Docker), 쿠버네티스(Kubernetes) 또는 ECS 섹션을 참조하세요.

호스트

호스트에서 실행 중인 에이전트에 이 점검을 구성하는 방법:

메트릭 수집
  1. Agent 구성 디렉터리 루트의 conf.d/ 폴더에 있는 mongo.d/conf.yaml 파일을 편집합니다. 사용 가능한 모든 구성 옵션은 sample mongo.d/conf.yaml을 참조하세요.

    init_config:
    
    instances:
        ## @param hosts - list of strings - required
        ## Hosts to collect metrics from, as is appropriate for your deployment topology.
        ## E.g. for a standalone deployment, specify the hostname and port of the mongod instance.
        ## For replica sets or sharded clusters, see instructions in the sample conf.yaml.
        ## Only specify multiple hosts when connecting through mongos
        #
      - hosts:
          - <HOST>:<PORT>
    
        ## @param username - string - optional
        ## The username to use for authentication.
        #
        username: datadog
    
        ## @param password - string - optional
        ## The password to use for authentication.
        #
        password: <UNIQUEPASSWORD>
    
        ## @param database - string - optional
        ## The database to collect metrics from.
        #
        database: <DATABASE>
    
        ## @param options - mapping - optional
        ## Connection options. For a complete list, see:
        ## https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options
        #
        options:
          authSource: admin
    
  2. 에이전트를 다시 시작합니다.

데이터베이스 자동탐지

Datadog Agent v7.56부터 데이터베이스 자동탐지를 활성화하여 MongoDB 인스턴스의 모든 데이터베이스에서 메트릭을 자동으로 수집할 수 있습니다. 데이터베이스 자동탐지는 기본적으로 비활성화되어 있습니다. 메트릭을 수집하려면 자동탐지된 데이터베이스에 대한 읽기 액세스 권한이 필요합니다. mongo.d/conf.yaml 파일에 다음 구성을 추가하여 활성화하세요.

   init_config:

   instances:
       ## @param hosts - 문자열 목록 - 필수
       ## 배포 토폴로지에 적합하게 메트릭을 수집할 호스트입니다.
       ## 예: 독립형 배포의 경우 mongod 인스턴스의 호스트 이름과 포트를 지정합니다.
       ## 복제본 세트 또는 샤딩된 클러스터의 경우 샘플 conf.yaml의 지침을 참조하세요.
       ## mongos를 통해 연결하는 경우에만 여러 호스트를 지정하세요.
       #
     - hosts:
         - <HOST>:<PORT>

       ## @param username - 문자열 - 선택사항
       ## 인증에 사용할 사용자 이름입니다.
       #
       username: datadog

       ## @param password - 문자열 - 선택사항
       ## 인증에 사용할 비밀번호입니다.
       #
       password: <UNIQUE_PASSWORD>

       ## @param options - 매핑 - 선택 사항
       ## 연결 옵션. 전체 목록을 보려면 다음을 참조하세요.
       ## https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options
       #
       options:
         authSource: admin

       ## @param database_autodiscovery - 매핑 - 선택 사항
       ## 모든 MongoDB 데이터베이스에서 메트릭을 자동으로 수집하려면 데이터베이스 자동탐지를 활성화하세요.
       #
       database_autodiscovery:
         ## @param enabled - 부울 - 필수
         ## 데이터베이스 자동탐지를 활성화합니다.
         #
         enabled: true

         ## @param include - 문자열 목록 - 선택 사항
         ## 자동탐지에 포함할 데이터베이스 목록입니다. 여러 데이터베이스를 일치시키려면 정규 표현식을 사용하세요.
         ## 예를 들어 "mydb"로 시작하는 모든 데이터베이스를 포함하려면 "^mydb.*"를 사용합니다.
         ## 기본적으로 포함은 ".*"로 설정되며 모든 데이터베이스가 포함됩니다.
         #
         include:
            - "^mydb.*"

         ## @param exclude - 문자열 목록 - 선택 사항
         ## 자동탐지에서 제외할 데이터베이스 목록입니다. 여러 데이터베이스를 일치시키려면 정규 표현식을 사용하세요.
         ## 예를 들어 "mydb"로 시작하는 모든 데이터베이스를 제외하려면 "^mydb.*"를 사용합니다.
         ## 제외 목록이 포함 목록과 충돌하는 경우 제외 목록이 우선 적용됩니다.
         #
         exclude:
            - "^mydb2.*"
            - "admin$"

         ## @param max_databases - 정수 - 선택 사항
         ## 메트릭을 수집할 최대 데이터베이스 수입니다. 기본값은 100입니다.
         #
         max_databases: 100

         ## @param refresh_interval - 정수 - 선택 사항
         ## 데이터베이스 목록을 새로 고치는 간격(초)입니다. 기본값은 600초입니다.
         #
         refresh_interval: 600
  1. 에이전트를 다시 시작합니다.
트레이스 수집

Datadog APM은 Mongo와 통합되어 분산 시스템 전체의 트레이스를 확인합니다. Datadog Agent v6+에서는 트레이스 수집이 기본적으로 활성화되어 있습니다. 트레이스 수집을 시작하려면 다음 지침을 따르세요.

  1. Datadog에서 트레이스 수집을 활성화합니다.
  2. Mongo에 요청하는 애플리케이션을 계측합니다.
로그 수집

에이전트 버전 > 6.0에서 사용 가능

  1. 로그 수집은 Datadog 에이전트에서 기본적으로 비활성화되어 있습니다. datadog.yaml 파일에서 활성화합니다.

    logs_enabled: true
    
  2. MongoDB 로그 수집을 시작하려면 mongo.d/conf.yaml 파일에 다음 구성 블록을 추가하세요.

    logs:
      - type: file
        path: /var/log/mongodb/mongodb.log
        service: mongo
        source: mongodb
    

    servicepath 파라미터 값을 변경하고 환경에 맞게 구성합니다. 사용 가능한 모든 구성 옵션은 샘플 mongo.yaml을 참조하세요.

  3. 에이전트를 다시 시작합니다.

도커(Docker)

컨테이너에서 실행 중인 에이전트에 이 점검을 구성하는 방법:

메트릭 수집

애플리케이션 컨테이너에 자동탐지 통합 템플릿을 Docker 레이블로 설정하세요.

LABEL "com.datadoghq.ad.check_names"='["mongo"]'
LABEL "com.datadoghq.ad.init_configs"='[{}]'
LABEL "com.datadoghq.ad.instances"='[{"hosts": ["%%host%%:%%port%%"], "username": "datadog", "password" : "<UNIQUEPASSWORD>", "database": "<DATABASE>"}]'
로그 수집

기본적으로 로그 수집은 Datadog 에이전트에서 비활성화되어 있습니다. 활성화하려면 Docker 로그 수집을 참고하세요.

그런 다음 Docker 레이블로 로그 통합을 설정하세요.

LABEL "com.datadoghq.ad.logs"='[{"source":"mongodb","service":"<SERVICE_NAME>"}]'
트레이스 수집

컨테이너화된 앱용 APM은 Agent v6+에서 지원되지만 트레이스 수집을 시작하려면 추가 구성이 필요합니다.

Agent 컨테이너의 필수 환경 변수:

파라미터
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

사용 가능한 환경 변수 및 구성의 전체 목록은 Docker 애플리케이션 추적을 참조하세요.

그런 다음 애플리케이션 컨테이너를 계측하고 DD_AGENT_HOST를 Agent 컨테이너의 이름으로 설정합니다.

Kubernetes

쿠버네티스에서 실행 중인 에이전트에 이 점검을 구성하는 방법:

메트릭 수집

자동탐지 통합 템플릿을 애플리케이션 컨테이너의 파드 주석으로 설정합니다. 이 외에도 템플릿은 파일, 구성 맵 또는 키-값 저장소를 사용하여 구성할 수도 있습니다.

주석 v1(Datadog 에이전트 v7.36 이하용)

apiVersion: v1
kind: Pod
metadata:
  name: mongo
  annotations:
    ad.datadoghq.com/mongo.check_names: '["mongo"]'
    ad.datadoghq.com/mongo.init_configs: '[{}]'
    ad.datadoghq.com/mongo.instances: |
      [
        {
          "hosts": ["%%host%%:%%port%%"],
          "username": "datadog",
          "password": "<UNIQUEPASSWORD>",
          "database": "<DATABASE>"
        }
      ]      
spec:
  containers:
    - name: mongo

주석 v2(Datadog 에이전트 v7.36 이상용)

apiVersion: v1
kind: Pod
metadata:
  name: mongo
  annotations:
    ad.datadoghq.com/mongo.checks: |
      {
        "mongo": {
          "init_config": {},
          "instances": [
            {
              "hosts": ["%%host%%:%%port%%"],
              "username": "datadog",
              "password": "<UNIQUEPASSWORD>",
              "database": "<DATABASE>"
            }
          ]
        }
      }      
spec:
  containers:
    - name: mongo
로그 수집

Datadog 에이전트에서 기본적으로 로그 수집이 비활성화되어 있습니다. 활성화하려면 [쿠버네티스 로그 수집]을 확인하세요.

그런 다음 로그 통합을 포드 주석으로 설정합니다. 또한 파일, configmap, 또는 key-value store로 설정할 수 있습니다.

주석 v1/v2

apiVersion: v1
kind: Pod
metadata:
  name: mongo
  annotations:
    ad.datadoghq.com/mongo.logs: '[{"source":"mongodb","service":"<SERVICE_NAME>"}]'
spec:
  containers:
    - name: mongo
트레이스 수집

컨테이너화된 앱용 APM은 Agent v6+를 실행하는 호스트에서 지원되지만 트레이스 수집을 시작하려면 추가 구성이 필요합니다.

Agent 컨테이너의 필수 환경 변수:

파라미터
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

사용 가능한 환경 변수 및 구성의 전체 목록은 Kubernetes 애플리케이션 추적Kubernetes DaemonSet 설정을 참조하세요.

그런 다음 애플리케이션 컨테이너를 계측하고 DD_AGENT_HOST를 Agent 컨테이너의 이름으로 설정합니다.

ECS

ECS에서 실행 중인 에이전트에 이 점검을 구성하는 방법:

메트릭 수집

애플리케이션 컨테이너에 자동탐지 통합 템플릿을 Docker 레이블로 설정하세요.

{
  "containerDefinitions": [{
    "name": "mongo",
    "image": "mongo:latest",
    "dockerLabels": {
      "com.datadoghq.ad.check_names": "[\"mongo\"]",
      "com.datadoghq.ad.init_configs": "[{}]",
      "com.datadoghq.ad.instances": "[{\"hosts\": [\"%%host%%:%%port%%\"], \"username\": \"datadog\", \"password\": \"<UNIQUEPASSWORD>\", \"database\": \"<DATABASE>\"}]"
    }
  }]
}
로그 수집

에이전트 버전 > 6.0에서 사용 가능

기본적으로 로그 수집은 Datadog 에이전트에서 비활성화되어 있습니다. 활성화하려면 ECS 로그 수집을 참조하세요.

그런 다음 Docker 레이블로 로그 통합을 설정하세요.

{
  "containerDefinitions": [{
    "name": "mongo",
    "image": "mongo:latest",
    "dockerLabels": {
      "com.datadoghq.ad.logs": "[{\"source\":\"mongodb\",\"service\":\"<SERVICE_NAME>\"}]"
    }
  }]
}
트레이스 수집

컨테이너화된 앱용 APM은 Agent v6+에서 지원되지만 트레이스 수집을 시작하려면 추가 구성이 필요합니다.

Agent 컨테이너의 필수 환경 변수:

파라미터
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

사용 가능한 환경 변수 및 구성의 전체 목록은 Docker 애플리케이션 추적을 참조하세요.

그런 다음 애플리케이션 컨테이너를 계측하고 DD_AGENT_HOSTEC2 프라이빗 IP 주소로 설정합니다.

검증

Agent의 상태 하위 명령을 실행하고 Checks 섹션에서 mongo을 찾습니다.

수집한 데이터

메트릭

mongodb.asserts.msgps
(gauge)
Number of message assertions raised per second.
Shown as assertion
mongodb.asserts.regularps
(gauge)
Number of regular assertions raised per second.
Shown as assertion
mongodb.asserts.rolloversps
(gauge)
Number of times that the rollover counters roll over per second. The counters rollover to zero every 2^30 assertions.
Shown as assertion
mongodb.asserts.userps
(gauge)
Number of user assertions raised per second.
Shown as assertion
mongodb.asserts.warningps
(gauge)
Number of warnings raised per second.
Shown as assertion
mongodb.backgroundflushing.average_ms
(gauge)
Average time for each flush to disk. (deprecated in MongoDB 4.0)
Shown as millisecond
mongodb.backgroundflushing.flushesps
(gauge)
Number of times the database has flushed all writes to disk. (deprecated in MongoDB 4.0)
Shown as flush
mongodb.backgroundflushing.last_ms
(gauge)
Amount of time that the last flush operation took to complete. (deprecated in MongoDB 4.0)
Shown as millisecond
mongodb.backgroundflushing.total_ms
(gauge)
Total number of time that the mongod processes have spent writing (i.e. flushing) data to disk. (deprecated in MongoDB 4.0)
Shown as millisecond
mongodb.chunks.jumbo
(gauge)
Total number of 'jumbo' chunks in the mongo cluster.
mongodb.chunks.total
(gauge)
Total number of chunks in the mongo cluster.
mongodb.collection.avgobjsize
(gauge)
The size of the average object in the collection in bytes.
Shown as byte
mongodb.collection.capped
(gauge)
Whether or not the collection is capped.
Shown as record
mongodb.collection.collectionscans.nontailable
(gauge)
Number of times the collection was scanned without tailable cursor (deprecated).
Shown as scan
mongodb.collection.collectionscans.nontailableps
(gauge)
Number of times the collection was scanned without tailable cursor per second.
Shown as scan
mongodb.collection.collectionscans.total
(gauge)
Total number of times the collection was scanned (deprecated).
Shown as scan
mongodb.collection.collectionscans.totalps
(gauge)
Total number of times the collection was scanned per second.
Shown as scan
mongodb.collection.commands.latency
(gauge)
Total latency for commands on the collection.
Shown as microsecond
mongodb.collection.commands.latency.avg
(gauge)
Average latency for commands on the collection.
Shown as microsecond
mongodb.collection.commands.opsps
(gauge)
Number of command operations per second on the collection.
Shown as operation
mongodb.collection.count
(gauge)
Total number of objects in the collection.
Shown as item
mongodb.collection.indexes.accesses.ops
(gauge)
Number of time the index was used.
Shown as event
mongodb.collection.indexes.accesses.opsps
(gauge)
Number of time the index was used per second.
Shown as event
mongodb.collection.indexsizes
(gauge)
Size of index in bytes.
Shown as byte
mongodb.collection.max
(gauge)
Maximum number of documents in a capped collection.
Shown as document
mongodb.collection.maxsize
(gauge)
Maximum size of a capped collection in bytes.
Shown as byte
mongodb.collection.nindexes
(gauge)
Total number of indices on the collection.
Shown as index
mongodb.collection.reads.latency
(gauge)
Total latency for read operations on the collection.
Shown as microsecond
mongodb.collection.reads.latency.avg
(gauge)
Average latency for read operations on the collection.
Shown as microsecond
mongodb.collection.reads.opsps
(gauge)
Number of read operations per second on the collection.
Shown as operation
mongodb.collection.size
(gauge)
The total uncompressed size in memory of all records in a collection. The size does not include the size of any indexes associated with the collection.
Shown as byte
mongodb.collection.storagesize
(gauge)
Total storage space allocated to this collection for document storage.
Shown as byte
mongodb.collection.totalindexsize
(gauge)
Total disk space used by all indexes created on this collection.
Shown as byte
mongodb.collection.transactions.latency
(gauge)
Total latency for transactions on the collection.
Shown as microsecond
mongodb.collection.transactions.latency.avg
(gauge)
Average latency for transactions on the collection.
Shown as microsecond
mongodb.collection.transactions.opsps
(gauge)
Number of transaction operations per second on the collection.
Shown as operation
mongodb.collection.writes.latency
(gauge)
Total latency for write operations on the collection.
Shown as microsecond
mongodb.collection.writes.latency.avg
(gauge)
Average latency for write operations on the collection.
Shown as microsecond
mongodb.collection.writes.opsps
(gauge)
Number of write operations per second on the collection.
Shown as operation
mongodb.connection_pool.numascopedconnections
(gauge)
Number of active and stored outgoing scoped synchronous connections from the current mongos instance to other members of the sharded cluster or replica set.
Shown as connection
mongodb.connection_pool.numclientconnections
(gauge)
Reports the number of active and stored outgoing synchronous connections from the current mongos instance to other members of the sharded cluster or replica set.
Shown as connection
mongodb.connection_pool.totalavailable
(gauge)
Reports the total number of available outgoing connections from the current mongos instance to other members of the sharded cluster or replica set.
Shown as connection
mongodb.connection_pool.totalcreatedps
(gauge)
Reports the total number of outgoing connections created per second by the current mongos instance to other members of the sharded cluster or replica set.
Shown as connection
mongodb.connection_pool.totalinuse
(gauge)
Reports the total number of outgoing connections from the current mongod/mongos instance to other members of the sharded cluster or replica set that are currently in use.
Shown as connection
mongodb.connection_pool.totalrefreshing
(gauge)
Reports the total number of outgoing connections from the current mongos instance to other members of the sharded cluster or replica set that are currently being refreshed.
Shown as connection
mongodb.connections.available
(gauge)
Number of unused available incoming connections the database can provide.
Shown as connection
mongodb.connections.current
(gauge)
Number of connections to the database server from clients.
Shown as connection
mongodb.connections.totalcreated
(gauge)
Total number of connections created.
Shown as connection
mongodb.cursors.timedout
(gauge)
Total number of cursors that have timed out since the server process started.
Shown as cursor
mongodb.cursors.totalopen
(gauge)
Number of cursors that MongoDB is maintaining for clients
Shown as cursor
mongodb.dbs
(gauge)
Total number of existing databases
Shown as item
mongodb.dur.commits
(gauge)
Number of transactions written to the journal during the last journal group commit interval.
Shown as transaction
mongodb.dur.commitsinwritelock
(gauge)
Count of the commits that occurred while a write lock was held.
Shown as commit
mongodb.dur.compression
(gauge)
Compression ratio of the data written to the journal.
Shown as fraction
mongodb.dur.earlycommits
(gauge)
Number of times MongoDB requested a commit before the scheduled journal group commit interval.
Shown as commit
mongodb.dur.journaledmb
(gauge)
Amount of data written to journal during the last journal group commit interval.
Shown as mebibyte
mongodb.dur.timems.commits
(gauge)
Amount of time spent for commits.
Shown as millisecond
mongodb.dur.timems.commitsinwritelock
(gauge)
Amount of time spent for commits that occurred while a write lock was held.
Shown as millisecond
mongodb.dur.timems.dt
(gauge)
Amount of time over which MongoDB collected the dur.timeMS data.
Shown as millisecond
mongodb.dur.timems.preplogbuffer
(gauge)
Amount of time spent preparing to write to the journal.
Shown as millisecond
mongodb.dur.timems.remapprivateview
(gauge)
Amount of time spent remapping copy-on-write memory mapped views.
Shown as millisecond
mongodb.dur.timems.writetodatafiles
(gauge)
Amount of time spent writing to data files after journaling.
Shown as millisecond
mongodb.dur.timems.writetojournal
(gauge)
Amount of time spent writing to the journal
Shown as millisecond
mongodb.dur.writetodatafilesmb
(gauge)
Amount of data written from journal to the data files during the last journal group commit interval.
Shown as mebibyte
mongodb.extra_info.heap_usage_bytesps
(gauge)
The total size in bytes of heap space used by the database process. Available on Unix/Linux systems only.
Shown as byte
mongodb.extra_info.page_faultsps
(gauge)
Number of page faults per second that require disk operations.
Shown as fault
mongodb.fsynclocked
(gauge)
Metric representing the fsynclock state of a database. 1 if it's locked and 0 if it's not.
mongodb.globallock.activeclients.readers
(gauge)
Count of the active client connections performing read operations.
Shown as connection
mongodb.globallock.activeclients.total
(gauge)
Total number of active client connections to the database.
Shown as connection
mongodb.globallock.activeclients.writers
(gauge)
Count of active client connections performing write operations.
Shown as connection
mongodb.globallock.currentqueue.readers
(gauge)
Number of operations that are currently queued and waiting for the read lock.
Shown as operation
mongodb.globallock.currentqueue.total
(gauge)
Total number of operations queued waiting for the lock.
Shown as operation
mongodb.globallock.currentqueue.writers
(gauge)
Number of operations that are currently queued and waiting for the write lock.
Shown as operation
mongodb.globallock.locktime
(gauge)
Time since the database last started that the globalLock has been held.
Shown as millisecond
mongodb.globallock.ratio
(gauge)
Ratio of the time that the globalLock has been held to the total time since it was created.
Shown as fraction
mongodb.globallock.totaltime
(gauge)
Time since the database last started and created the global lock.
Shown as microsecond
mongodb.indexcounters.accessesps
(gauge)
Number of times that operations have accessed indexes per second.
Shown as event
mongodb.indexcounters.hitsps
(gauge)
Number of times per second that an index has been accessed and mongod is able to return the index from memory.
Shown as hit
mongodb.indexcounters.missesps
(gauge)
Number of times per second that an operation attempted to access an index that was not in memory.
Shown as miss
mongodb.indexcounters.missratio
(gauge)
Ratio of index hits to misses.
Shown as fraction
mongodb.indexcounters.resetsps
(gauge)
Number of times per second the index counters have been reset.
Shown as event
mongodb.locks.collection.acquirecount.exclusiveps
(gauge)
Number of times the collection lock type was acquired in the Exclusive (X) mode.
Shown as lock
mongodb.locks.collection.acquirecount.intent_exclusiveps
(gauge)
Number of times the collection lock type was acquired in the Intent Exclusive (IX) mode.
Shown as lock
mongodb.locks.collection.acquirecount.intent_sharedps
(gauge)
Number of times the collection lock type was acquired in the Intent Shared (IS) mode.
Shown as lock
mongodb.locks.collection.acquirecount.sharedps
(gauge)
Number of times the collection lock type was acquired in the Shared (S) mode.
Shown as lock
mongodb.locks.collection.acquirewaitcount.exclusiveps
(gauge)
Number of times the collection lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.collection.acquirewaitcount.sharedps
(gauge)
Number of times the collection lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.collection.timeacquiringmicros.exclusiveps
(gauge)
Wait time for the collection lock type acquisitions in the Exclusive (X) mode.
Shown as fraction
mongodb.locks.collection.timeacquiringmicros.sharedps
(gauge)
Wait time for the collection lock type acquisitions in the Shared (S) mode.
Shown as fraction
mongodb.locks.database.acquirecount.exclusiveps
(gauge)
Number of times the database lock type was acquired in the Exclusive (X) mode.
Shown as lock
mongodb.locks.database.acquirecount.intent_exclusiveps
(gauge)
Number of times the database lock type was acquired in the Intent Exclusive (IX) mode.
Shown as lock
mongodb.locks.database.acquirecount.intent_sharedps
(gauge)
Number of times the database lock type was acquired in the Intent Shared (IS) mode.
Shown as lock
mongodb.locks.database.acquirecount.sharedps
(gauge)
Number of times the database lock type was acquired in the Shared (S) mode.
Shown as lock
mongodb.locks.database.acquirewaitcount.exclusiveps
(gauge)
Number of times the database lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.database.acquirewaitcount.intent_exclusiveps
(gauge)
Number of times the database lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.database.acquirewaitcount.intent_sharedps
(gauge)
Number of times the database lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.database.acquirewaitcount.sharedps
(gauge)
Number of times the database lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.database.timeacquiringmicros.exclusiveps
(gauge)
Wait time for the database lock type acquisitions in the Exclusive (X) mode.
Shown as fraction
mongodb.locks.database.timeacquiringmicros.intent_exclusiveps
(gauge)
Wait time for the database lock type acquisitions in the Intent Exclusive (IX) mode.
Shown as fraction
mongodb.locks.database.timeacquiringmicros.intent_sharedps
(gauge)
Wait time for the database lock type acquisitions in the Intent Shared (IS) mode.
Shown as fraction
mongodb.locks.database.timeacquiringmicros.sharedps
(gauge)
Wait time for the database lock type acquisitions in the Shared (S) mode.
Shown as fraction
mongodb.locks.global.acquirecount.exclusiveps
(gauge)
Number of times the global lock type was acquired in the Exclusive (X) mode.
Shown as lock
mongodb.locks.global.acquirecount.intent_exclusiveps
(gauge)
Number of times the global lock type was acquired in the Intent Exclusive (IX) mode.
Shown as lock
mongodb.locks.global.acquirecount.intent_sharedps
(gauge)
Number of times the global lock type was acquired in the Intent Shared (IS) mode.
Shown as lock
mongodb.locks.global.acquirecount.sharedps
(gauge)
Number of times the global lock type was acquired in the Shared (S) mode.
Shown as lock
mongodb.locks.global.acquirewaitcount.exclusiveps
(gauge)
Number of times the global lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.global.acquirewaitcount.intent_exclusiveps
(gauge)
Number of times the global lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.global.acquirewaitcount.intent_sharedps
(gauge)
Number of times the global lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.global.acquirewaitcount.sharedps
(gauge)
Number of times the global lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.global.timeacquiringmicros.exclusiveps
(gauge)
Wait time for the global lock type acquisitions in the Exclusive (X) mode.
Shown as fraction
mongodb.locks.global.timeacquiringmicros.intent_exclusiveps
(gauge)
Wait time for the global lock type acquisitions in the Intent Exclusive (IX) mode.
Shown as fraction
mongodb.locks.global.timeacquiringmicros.intent_sharedps
(gauge)
Wait time for the global lock type acquisitions in the Intent Shared (IS) mode.
Shown as fraction
mongodb.locks.global.timeacquiringmicros.sharedps
(gauge)
Wait time for the global lock type acquisitions in the Shared (S) mode.
Shown as fraction
mongodb.locks.metadata.acquirecount.exclusiveps
(gauge)
Number of times the metadata lock type was acquired in the Exclusive (X) mode.
Shown as lock
mongodb.locks.metadata.acquirecount.sharedps
(gauge)
Number of times the metadata lock type was acquired in the Shared (S) mode.
Shown as lock
mongodb.locks.mmapv1journal.acquirecount.intent_exclusiveps
(gauge)
Number of times the MMAPv1 storage engine lock type was acquired in the Intent Exclusive (IX) mode.
Shown as lock
mongodb.locks.mmapv1journal.acquirecount.intent_sharedps
(gauge)
Number of times the MMAPv1 storage engine lock type was acquired in the Intent Shared (IS) mode.
Shown as lock
mongodb.locks.mmapv1journal.acquirewaitcount.intent_exclusiveps
(gauge)
Number of times the MMAPv1 storage engine lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.mmapv1journal.acquirewaitcount.intent_sharedps
(gauge)
Number of times the MMAPv1 storage engine lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.mmapv1journal.timeacquiringmicros.intent_exclusiveps
(gauge)
Wait time for the MMAPv1 storage engine lock type acquisitions in the Intent Exclusive (IX) mode.
Shown as fraction
mongodb.locks.mmapv1journal.timeacquiringmicros.intent_sharedps
(gauge)
Wait time for the MMAPv1 storage engine lock type acquisitions in the Intent Shared (IS) mode.
Shown as fraction
mongodb.locks.oplog.acquirecount.intent_exclusiveps
(gauge)
Number of times the oplog lock type was acquired in the Intent Exclusive (IX) mode.
Shown as lock
mongodb.locks.oplog.acquirecount.sharedps
(gauge)
Number of times the oplog lock type was acquired in the Shared (S) mode.
Shown as lock
mongodb.locks.oplog.acquirewaitcount.intent_exclusiveps
(gauge)
Number of times the oplog lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.oplog.acquirewaitcount.sharedps
(gauge)
Number of times the oplog lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode.
Shown as wait
mongodb.locks.oplog.timeacquiringmicros.intent_exclusiveps
(gauge)
Wait time for the oplog lock type acquisitions in the Intent Exclusive (IX) mode.
Shown as fraction
mongodb.locks.oplog.timeacquiringmicros.sharedps
(gauge)
Wait time for the oplog lock type acquisitions in the Shared (S) mode.
Shown as fraction
mongodb.mem.bits
(gauge)
Size of the in-memory storage engine.
Shown as mebibyte
mongodb.mem.mapped
(gauge)
Amount of mapped memory by the database.
Shown as mebibyte
mongodb.mem.mappedwithjournal
(gauge)
The amount of mapped memory, including the memory used for journaling.
Shown as mebibyte
mongodb.mem.resident
(gauge)
Amount of memory currently used by the database process.
Shown as mebibyte
mongodb.mem.virtual
(gauge)
Amount of virtual memory used by the mongod process.
Shown as mebibyte
mongodb.metrics.commands.count.failedps
(gauge)
Number of times count failed
Shown as command
mongodb.metrics.commands.count.total
(gauge)
Number of times count executed
Shown as command
mongodb.metrics.commands.createindexes.failedps
(gauge)
Number of times createIndexes failed
Shown as command
mongodb.metrics.commands.createindexes.total
(gauge)
Number of times createIndexes executed
Shown as command
mongodb.metrics.commands.delete.failedps
(gauge)
Number of times delete failed
Shown as command
mongodb.metrics.commands.delete.total
(gauge)
Number of times delete executed
Shown as command
mongodb.metrics.commands.eval.failedps
(gauge)
Number of times eval failed
Shown as command
mongodb.metrics.commands.eval.total
(gauge)
Number of times eval executed
Shown as command
mongodb.metrics.commands.findandmodify.failedps
(gauge)
Number of times findAndModify failed
Shown as command
mongodb.metrics.commands.findandmodify.total
(gauge)
Number of times findAndModify executed
Shown as command
mongodb.metrics.commands.insert.failedps
(gauge)
Number of times insert failed
Shown as command
mongodb.metrics.commands.insert.total
(gauge)
Number of times insert executed
Shown as command
mongodb.metrics.commands.update.failedps
(gauge)
Number of times update failed
Shown as command
mongodb.metrics.commands.update.total
(gauge)
Number of times update executed
Shown as command
mongodb.metrics.cursor.open.notimeout
(gauge)
Number of open cursors with the option DBQuery.Option.noTimeout set to prevent timeout after a period of inactivity.
Shown as cursor
mongodb.metrics.cursor.open.pinned
(gauge)
Number of pinned open cursors.
Shown as cursor
mongodb.metrics.cursor.open.total
(gauge)
Number of cursors that MongoDB is maintaining for clients.
Shown as cursor
mongodb.metrics.cursor.timedoutps
(gauge)
Number of cursors that time out, per second.
Shown as cursor
mongodb.metrics.document.deletedps
(gauge)
Number of documents deleted per second.
Shown as document
mongodb.metrics.document.insertedps
(gauge)
Number of documents inserted per second.
Shown as document
mongodb.metrics.document.returnedps
(gauge)
Number of documents returned by queries per second.
Shown as document
mongodb.metrics.document.updatedps
(gauge)
Number of documents updated per second.
Shown as document
mongodb.metrics.getlasterror.wtime.numps
(gauge)
Number of getLastError operations per second with a specified write concern (i.e. w) that wait for one or more members of a replica set to acknowledge the write operation.
Shown as operation
mongodb.metrics.getlasterror.wtime.totalmillisps
(gauge)
Fraction of time (ms/s) that the mongod has spent performing getLastError operations with write concern (i.e. w) that wait for one or more members of a replica set to acknowledge the write operation.
Shown as fraction
mongodb.metrics.getlasterror.wtimeoutsps
(gauge)
Number of times per second that write concern operations have timed out as a result of the wtimeout threshold to getLastError
Shown as event
mongodb.metrics.operation.fastmodps
(gauge)
Number of update operations per second that neither cause documents to grow nor require updates to the index.
Shown as operation
mongodb.metrics.operation.idhackps
(gauge)
Number of queries per second that contain the _id field.
Shown as query
mongodb.metrics.operation.scanandorderps
(gauge)
Number of queries per second that return sorted numbers that cannot perform the sort operation using an index.
Shown as query
mongodb.metrics.operation.writeconflictsps
(gauge)
Number of times per second that write concern operations has encounter a conflict.
Shown as event
mongodb.metrics.query.plancache.classic.hitsps
(gauge)
Number of times per second the query planner accesses the classic plan cache and finds a cached plan (requires MongoDB 7.0 and above).
Shown as operation
mongodb.metrics.query.plancache.classic.missesps
(gauge)
Number of times per second the query planner accesses the classic plan cache and does not find a cached plan (requires MongoDB 7.0 and above).
Shown as operation
mongodb.metrics.query.plancache.sbe.hitsps
(gauge)
Number of times per second the query planner accesses the slot-based execution engine plan cache and finds a cached plan (requires MongoDB 7.0 and above).
Shown as operation
mongodb.metrics.query.plancache.sbe.missesps
(gauge)
Number of times per second the query planner accesses the slot-based execution engine plan cache and does not find a cached plan (requires MongoDB 7.0 and above).
Shown as operation
mongodb.metrics.query.sort.spilltodiskps
(gauge)
The total number of writes per second to disk caused by sort stages (requires MongoDB 6.2 and above).
Shown as operation
mongodb.metrics.query.sort.totalbytessortedps
(gauge)
The total amount of sorted data in bytes per second (requires MongoDB 6.2 and above).
Shown as byte
mongodb.metrics.query.sort.totalkeyssortedps
(gauge)
The total number of keys used in sorts per second (requires MongoDB 6.2 and above).
Shown as key
mongodb.metrics.queryexecutor.scannedobjectsps
(gauge)
Number of documents scanned per second during queries and query-plan evaluation.
Shown as operation
mongodb.metrics.queryexecutor.scannedps
(gauge)
Number of index items scanned per second during queries and query-plan evaluation.
Shown as operation
mongodb.metrics.record.movesps
(gauge)
Number of times per second documents move within the on-disk representation of the MongoDB data set.
Shown as operation
mongodb.metrics.repl.apply.batches.numps
(gauge)
Number of batches applied across all databases per second.
Shown as operation
mongodb.metrics.repl.apply.batches.totalmillisps
(gauge)
Fraction of time (ms/s) the mongod has spent applying operations from the oplog.
Shown as fraction
mongodb.metrics.repl.apply.opsps
(gauge)
Number of oplog operations applied per second.
Shown as operation
mongodb.metrics.repl.buffer.count
(gauge)
Number of operations in the oplog buffer.
Shown as operation
mongodb.metrics.repl.buffer.maxsizebytes
(gauge)
Maximum size of the buffer.
Shown as byte
mongodb.metrics.repl.buffer.sizebytes
(gauge)
Current size of the contents of the oplog buffer.
Shown as byte
mongodb.metrics.repl.network.bytesps
(gauge)
Amount of data read from the replication sync source per second.
Shown as byte
mongodb.metrics.repl.network.getmores.numps
(gauge)
Number of getmore operations per second.
Shown as operation
mongodb.metrics.repl.network.getmores.totalmillisps
(gauge)
Fraction of time (ms/s) required to collect data from getmore operations.
Shown as fraction
mongodb.metrics.repl.network.opsps
(gauge)
Number of operations read from the replication source per second.
Shown as operation
mongodb.metrics.repl.network.readerscreatedps
(gauge)
Number of oplog query processes created per second.
Shown as process
mongodb.metrics.repl.preload.docs.numps
(gauge)
Number of documents loaded per second during the pre-fetch stage of replication.
Shown as document
mongodb.metrics.repl.preload.docs.totalmillisps
(gauge)
Fraction of time (ms/s) spent loading documents as part of the pre-fetch stage of replication.
Shown as fraction
mongodb.metrics.repl.preload.indexes.numps
(gauge)
Number of index entries loaded by members before updating documents as part of the pre-fetch stage of replication.
Shown as document
mongodb.metrics.repl.preload.indexes.totalmillisps
(gauge)
Fraction of time (ms/s) spent loading documents as part of the pre-fetch stage of replication.
Shown as fraction
mongodb.metrics.ttl.deleteddocumentsps
(gauge)
Number of documents deleted from collections with a ttl index per second.
Shown as document
mongodb.metrics.ttl.passesps
(gauge)
Number of times per second the background process removes documents from collections with a ttl index.
Shown as operation
mongodb.network.bytesinps
(gauge)
The number of bytes that reflects the amount of network traffic received by this database.
Shown as byte
mongodb.network.bytesoutps
(gauge)
The number of bytes that reflects the amount of network traffic sent from this database.
Shown as byte
mongodb.network.numrequestsps
(gauge)
Number of distinct requests that the server has received.
Shown as request
mongodb.opcounters.commandps
(gauge)
Total number of commands per second issued to the database.
Shown as command
mongodb.opcounters.deleteps
(gauge)
Number of delete operations per second.
Shown as operation
mongodb.opcounters.getmoreps
(gauge)
Number of getmore operations per second.
Shown as operation
mongodb.opcounters.insertps
(gauge)
Number of insert operations per second.
Shown as operation
mongodb.opcounters.queryps
(gauge)
Total number of queries per second.
Shown as query
mongodb.opcounters.updateps
(gauge)
Number of update operations per second.
Shown as operation
mongodb.opcountersrepl.commandps
(gauge)
Total number of replicated commands issued to the database per second.
Shown as command
mongodb.opcountersrepl.deleteps
(gauge)
Number of replicated delete operations per second.
Shown as operation
mongodb.opcountersrepl.getmoreps
(gauge)
Number of replicated getmore operations per second.
Shown as operation
mongodb.opcountersrepl.insertps
(gauge)
Number of replicated insert operations per second.
Shown as operation
mongodb.opcountersrepl.queryps
(gauge)
Total number of replicated queries per second.
Shown as query
mongodb.opcountersrepl.updateps
(gauge)
Number of replicated update operations per second.
Shown as operation
mongodb.oplatencies.commands.latency
(gauge)
Total combined latency for database commands.
Shown as microsecond
mongodb.oplatencies.commands.latency.avg
(gauge)
Average latency for database commands.
Shown as microsecond
mongodb.oplatencies.commands.latencyps
(gauge)
Total latency statistics for database commands per second (deprecated).
Shown as command
mongodb.oplatencies.reads.latency
(gauge)
Total combined latency for read requests.
Shown as microsecond
mongodb.oplatencies.reads.latency.avg
(gauge)
Average latency for read requests.
Shown as microsecond
mongodb.oplatencies.reads.latencyps
(gauge)
Total latency statistics for read requests per second (deprecated).
Shown as operation
mongodb.oplatencies.writes.latency
(gauge)
Total combined latency for write requests.
Shown as microsecond
mongodb.oplatencies.writes.latency.avg
(gauge)
Average latency for write requests.
Shown as microsecond
mongodb.oplatencies.writes.latencyps
(gauge)
Total latency statistics for write operations per second (deprecated).
Shown as operation
mongodb.oplog.logsizemb
(gauge)
Total size of the oplog.
Shown as mebibyte
mongodb.oplog.timediff
(gauge)
Oplog window: difference between the first and last operation in the oplog.
Shown as second
mongodb.oplog.usedsizemb
(gauge)
Total amount of space used by the oplog.
Shown as mebibyte
mongodb.replset.health
(gauge)
Member health value of the replica set: conveys if the member is up (i.e. 1) or down (i.e. 0).
mongodb.replset.optime_lag
(gauge)
Delay between a write operation on the primary and its copy to a secondary. Computed only on primary and tagged by 'member'.
Shown as second
mongodb.replset.replicationlag
(gauge)
Delay between a write operation on the primary and its copy to a secondary. Computed on each node and tagged by 'host', but may not be representative of cluster health. Negative values do not indicate that the secondary is ahead of the primary. To use a more up-to-date metric, use mongodb.replset.optime_lag instead.
Shown as second
mongodb.replset.state
(gauge)
State of a replica that reflects its disposition within the set.
mongodb.replset.votefraction
(gauge)
Fraction of votes a server will cast in a replica set election.
Shown as fraction
mongodb.replset.votes
(gauge)
The number of votes a server will cast in a replica set election.
Shown as item
mongodb.sessions.count
(gauge)
Number of active sessions for all users.
Shown as session
mongodb.sharded_data_distribution.num_orphaned_docs
(gauge)
Number of orphaned documents in the shard.
Shown as document
mongodb.sharded_data_distribution.num_owned_documents
(gauge)
Number of owned documents in the shard.
Shown as document
mongodb.sharded_data_distribution.orphaned_size_bytes
(gauge)
Size of orphaned documents in the shard.
Shown as byte
mongodb.sharded_data_distribution.owned_size_bytes
(gauge)
Size of owned documents in the shard.
Shown as byte
mongodb.stats.avgobjsize
(gauge)
The average size of each document in bytes.
Shown as byte
mongodb.stats.collections
(gauge)
Contains a count of the number of collections in that database.
mongodb.stats.datasize
(gauge)
Total size of the data held in this database including the padding factor.
Shown as byte
mongodb.stats.filesize
(gauge)
Total size of the data held in this database including the padding factor (only available with the mmapv1 storage engine).
Shown as byte
mongodb.stats.freestoragesize
(gauge)
Total amount of free space allocated to all collections in the database for document storage.
Shown as byte
mongodb.stats.fstotalsize
(gauge)
Total amount of all disk capacity on the filesystem where MongoDB stores data.
Shown as byte
mongodb.stats.fsusedsize
(gauge)
Total amount of all disk space in use on the filesystem where MongoDB stores data.
Shown as byte
mongodb.stats.indexes
(gauge)
Total number of indexes across all collections in the database.
Shown as index
mongodb.stats.indexfreestoragesize
(gauge)
Total amount of free disk space allocated to all indexes in the database.
Shown as byte
mongodb.stats.indexsize
(gauge)
Total size of all indexes created on this database.
Shown as byte
mongodb.stats.numextents
(gauge)
Contains a count of the number of extents in the database across all collections.
mongodb.stats.objects
(gauge)
Number of objects (documents) in the database across all collections.
Shown as object
mongodb.stats.storagesize
(gauge)
Total amount of space allocated to collections in this database for document storage.
Shown as byte
mongodb.stats.totalfreestoragesize
(gauge)
Total amount of free storage space allocated for both documents and indexes in all collections in the database.
Shown as byte
mongodb.stats.totalsize
(gauge)
Total amount of disk space allocated for both documents and indexes in all collections in the database. Includes used and free storage space.
Shown as byte
mongodb.stats.views
(gauge)
Contains a count of the number of views in the database.
mongodb.system.cpu.cores
(gauge)
The total number of available logical processor cores.
Shown as core
mongodb.system.cpu.percent
(gauge)
Total CPU usage percentage of the MongoDB process (only available on self-hosted MongoDB running on the same host as the Agent).
Shown as percent
mongodb.system.mem.limit
(gauge)
The system memory (RAM) usage limit. For example running in a container may impose memory limits that are lower than the total system memory.
Shown as megabyte
mongodb.system.mem.total
(gauge)
The total amount of system memory (RAM).
Shown as megabyte
mongodb.tcmalloc.generic.current_allocated_bytes
(gauge)
Number of bytes used by the application.
Shown as byte
mongodb.tcmalloc.generic.heap_size
(gauge)
Bytes of system memory reserved by TCMalloc.
Shown as byte
mongodb.tcmalloc.tcmalloc.aggressive_memory_decommit
(gauge)
Status of aggressive memory decommit mode.
mongodb.tcmalloc.tcmalloc.central_cache_free_bytes
(gauge)
Number of free bytes in the central cache.
Shown as byte
mongodb.tcmalloc.tcmalloc.current_total_thread_cache_bytes
(gauge)
Number of bytes used across all thread caches.
Shown as byte
mongodb.tcmalloc.tcmalloc.max_total_thread_cache_bytes
(gauge)
Upper limit on total number of bytes stored across all per-thread caches.
Shown as byte
mongodb.tcmalloc.tcmalloc.pageheap_free_bytes
(gauge)
Number of bytes in free mapped pages in page heap.
Shown as byte
mongodb.tcmalloc.tcmalloc.pageheap_unmapped_bytes
(gauge)
Number of bytes in free unmapped pages in page heap.
Shown as byte
mongodb.tcmalloc.tcmalloc.spinlock_total_delay_ns
(gauge)
Spinlock delay time.
Shown as nanosecond
mongodb.tcmalloc.tcmalloc.thread_cache_free_bytes
(gauge)
Number of free bytes in thread caches.
Shown as byte
mongodb.tcmalloc.tcmalloc.transfer_cache_free_bytes
(gauge)
Number of free bytes that are waiting to be transferred between the central cache and a thread cache.
Shown as byte
mongodb.uptime
(gauge)
Number of seconds that the mongos or mongod process has been active.
Shown as second
mongodb.usage.commands.count
(gauge)
Number of commands since server start (deprecated)
Shown as command
mongodb.usage.commands.countps
(gauge)
Number of commands per second
Shown as command
mongodb.usage.commands.time
(gauge)
Total time spent performing commands in microseconds
Shown as microsecond
mongodb.usage.getmore.count
(gauge)
Number of getmore since server start (deprecated)
Shown as fetch
mongodb.usage.getmore.countps
(gauge)
Number of getmore per second
Shown as fetch
mongodb.usage.getmore.time
(gauge)
Total time spent performing getmore in microseconds
Shown as microsecond
mongodb.usage.insert.count
(gauge)
Number of inserts since server start (deprecated)
Shown as commit
mongodb.usage.insert.countps
(gauge)
Number of inserts per second
Shown as commit
mongodb.usage.insert.time
(gauge)
Total time spent performing inserts in microseconds
Shown as microsecond
mongodb.usage.queries.count
(gauge)
Number of queries since server start (deprecated)
Shown as query
mongodb.usage.queries.countps
(gauge)
Number of queries per second
Shown as query
mongodb.usage.queries.time
(gauge)
Total time spent performing queries in microseconds
Shown as microsecond
mongodb.usage.readlock.count
(gauge)
Number of read locks since server start (deprecated)
Shown as lock
mongodb.usage.readlock.countps
(gauge)
Number of read locks per second
Shown as lock
mongodb.usage.readlock.time
(gauge)
Total time spent performing read locks in microseconds
Shown as microsecond
mongodb.usage.remove.count
(gauge)
Number of removes since server start (deprecated)
Shown as commit
mongodb.usage.remove.countps
(gauge)
Number of removes per second
Shown as commit
mongodb.usage.remove.time
(gauge)
Total time spent performing removes in microseconds
Shown as microsecond
mongodb.usage.total.count
(gauge)
Number of operations since server start (deprecated)
Shown as command
mongodb.usage.total.countps
(gauge)
Number of operations per second
Shown as command
mongodb.usage.total.time
(gauge)
Total time spent holding locks in microseconds
Shown as microsecond
mongodb.usage.update.count
(gauge)
Number of updates since server start (deprecated)
Shown as commit
mongodb.usage.update.countps
(gauge)
Number of updates per second
Shown as commit
mongodb.usage.update.time
(gauge)
Total time spent performing updates in microseconds
Shown as microsecond
mongodb.usage.writelock.count
(gauge)
Number of write locks since server start (deprecated)
Shown as lock
mongodb.usage.writelock.countps
(gauge)
Number of write locks per second
Shown as lock
mongodb.usage.writelock.time
(gauge)
Total time spent performing write locks in microseconds
Shown as microsecond
mongodb.wiredtiger.cache.bytes_currently_in_cache
(gauge)
Size of the data currently in cache.
Shown as byte
mongodb.wiredtiger.cache.bytes_read_into_cache
(gauge)
Number of bytes read into the cache.
Shown as byte
mongodb.wiredtiger.cache.bytes_written_from_cache
(gauge)
Number of bytes written from the cache.
Shown as byte
mongodb.wiredtiger.cache.failed_eviction_of_pages_exceeding_the_in_memory_maximumps
(gauge)
Number of failed eviction of pages that exceeded the in-memory maximum, per second.
Shown as page
mongodb.wiredtiger.cache.in_memory_page_splits
(gauge)
In-memory page splits.
Shown as split
mongodb.wiredtiger.cache.maximum_bytes_configured
(gauge)
Maximum cache size.
Shown as byte
mongodb.wiredtiger.cache.maximum_page_size_at_eviction
(gauge)
Maximum page size at eviction.
Shown as byte
mongodb.wiredtiger.cache.modified_pages_evicted
(gauge)
Number of pages, that have been modified, evicted from the cache.
Shown as page
mongodb.wiredtiger.cache.pages_currently_held_in_cache
(gauge)
Number of pages currently held in the cache.
Shown as page
mongodb.wiredtiger.cache.pages_evicted_by_application_threadsps
(gauge)
Number of page evicted by application threads per second.
Shown as page
mongodb.wiredtiger.cache.pages_evicted_exceeding_the_in_memory_maximumps
(gauge)
Number of pages evicted because they exceeded the cache in-memory maximum, per second.
Shown as page
mongodb.wiredtiger.cache.pages_read_into_cache
(gauge)
Number of pages read into the cache.
Shown as page
mongodb.wiredtiger.cache.pages_requested_from_cache
(gauge)
Number of pages requested from the cache.
Shown as page
mongodb.wiredtiger.cache.pages_written_from_cache
(gauge)
Number of pages writtent from the cache
Shown as page
mongodb.wiredtiger.cache.tracked_dirty_bytes_in_cache
(gauge)
Size of the dirty data in the cache.
Shown as byte
mongodb.wiredtiger.cache.unmodified_pages_evicted
(gauge)
Number of pages, that were not modified, evicted from the cache.
Shown as page
mongodb.wiredtiger.concurrenttransactions.read.available
(gauge)
Number of available read tickets (concurrent transactions) remaining.
Shown as ticket
mongodb.wiredtiger.concurrenttransactions.read.out
(gauge)
Number of read tickets (concurrent transactions) in use.
Shown as ticket
mongodb.wiredtiger.concurrenttransactions.read.totaltickets
(gauge)
Total number of read tickets (concurrent transactions) available.
Shown as ticket
mongodb.wiredtiger.concurrenttransactions.write.available
(gauge)
Number of available write tickets (concurrent transactions) remaining.
Shown as ticket
mongodb.wiredtiger.concurrenttransactions.write.out
(gauge)
Number of write tickets (concurrent transactions) in use.
Shown as ticket
mongodb.wiredtiger.concurrenttransactions.write.totaltickets
(gauge)
Total number of write tickets (concurrent transactions) available.
Shown as ticket

메트릭 일부에 대한 자세한 설명은 MongoDB 3.0 매뉴얼을 참조하세요.

추가 메트릭

다음 메트릭은 기본적으로 수집되지 않습니다. mongo.d/conf.yaml 파일에서 additional_metrics 파라미터를 사용하여 수집합니다.

메트릭 접두사수집을 위해 additional_metrics에 추가해야 할 항목
mongodb.collectioncollection
mongodb.usage.commandstop
mongodb.usage.getmoretop
mongodb.usage.inserttop
mongodb.usage.queriestop
mongodb.usage.readLocktop
mongodb.usage.writeLocktop
mongodb.usage.removetop
mongodb.usage.totaltop
mongodb.usage.updatetop
mongodb.usage.writeLocktop
mongodb.tcmalloctcmalloc
mongodb.metrics.commandsmetrics.commands
mongodb.chunks.jumbojumbo_chunks
mongodb.chunks.totaljumbo_chunks
mongodb.sharded_data_distributionsharded_data_distribution

이벤트

복제 상태 변경:
이 점검은 Mongo 노드의 복제 상태가 변경될 때마다 이벤트를 생성합니다.

서비스 점검

mongodb.can_connect
Returns CRITICAL if the Agent is unable to connect to the monitored MongoDB instance. Returns OK otherwise.
Statuses: ok, critical

트러블슈팅

도움이 필요하신가요? Datadog 지원팀에 문의하세요.

참고 자료

기타 유용한 문서, 링크 및 기사:

PREVIEWING: aliciascott/DOCS-9725-Cloudcraft