Docs » Splunk Observability Cloud でサポートされているインテグレーション » Collectorコンポーネント: レシーバー » MongoDB レシーバー

MongoDB レシーバー 🔗

The MongoDB receiver fetches metrics from standalone MongoDB clusters, including non-Atlas managed MongoDB servers. The supported pipeline type is metrics. See パイプラインでデータを処理する for more information.

The receiver collects stats with MongoDB’s dbStats and serverStatus commands, and uses the golang mongo driver. See more at Mongo Go driver documentation .

注釈

Out-of-the-box dashboards and navigators aren’t supported for the MongoDB receiver yet, but are planned for a future release.

前提条件 🔗

The MongoDB receiver supports MongoDB versions 4.0+ and 5.0.

MongoDB recommends to set up a least privilege user (LPU) with a clusterMonitor role in order to collect metrics.

注釈

If you’re using automatic discovery with MongoDB, see Automatic discovery for MongoDB.

はじめに 🔗

以下の手順に従って、コンポーネントの設定とアクティベーションを行ってください:

  1. Splunk Distribution of the OpenTelemetry Collector をホストまたはコンテナプラットフォームにデプロイします:

  2. 次のセクションで説明するようにレシーバーを設定します。

  3. Collector を再起動します。

サンプル構成 🔗

To activate the MongoDB receiver, add mongodb to the receivers section of your configuration file, as shown in the following example:

receivers:
  mongodb:
    hosts:
      - endpoint: localhost:27017
        transport: tcp
    username: otel
    password: ${env:MONGODB_PASSWORD}
    collection_interval: 60s
    initial_delay: 1s
    tls:
      insecure: true
      insecure_skip_verify: true

コンフィギュレーションを完了するには、コンフィギュレーションファイルの service セクションの metrics パイプラインに、レシーバーを含めます。例:

service:
  pipelines:
    metrics:
      receivers: [mongodb]

設定オプション 🔗

以下の設定はオプションです:

  • hosts. [localhost:27017] by default. List of host:port or Unix domain socket endpoints.

    • For standalone MongoDB deployments this is the hostname and port of the mongod instance.

    • For replica sets specify the hostnames and ports of the mongod instances that are in the replica set configuration. If the replica_set field is specified, nodes will be autodiscovered.

    • For a sharded MongoDB deployment, specify a list of the mongos hosts.

  • username: If authentication is required, provide the clusterMonitor permissions here.

  • password: If authentication is required, provide the password here.

  • collection_interval. 1m by default. This receiver collects metrics on an interval. Valid time units are ns, us (or µs), ms, s, m, h. This value must be a string readable by Golang’s time parseDuration. Learn more at ParseDuration .

  • initial_delay デフォルトでは 1s 。このレシーバーが開始するまでの待ち時間を定義します。

  • replica_set: If the deployment of MongoDB is a replica set, use this to specify the replica set name which allows for autodiscovery of other nodes in the replica set.

  • timeout. 1m by default. The timeout of running commands against mongo.

  • tls: TLS control. By default insecure settings are rejected and certificate verification is on. See more at TLS Configuration Settings .

設定 🔗

The following table shows the configuration options for the MongoDB receiver:

メトリクス 🔗

以下のメトリクス、リソース属性、および属性が使用できます。

  • mongodb.extent.count is available for versions under 4.4 with mmapv1 storage engine.

特定のメトリクスをアクティブまたは非アクティブにする 🔗

各メトリクスの metrics セクションの enabled フィールドを設定することで、特定のメトリクスをアクティブまたは非アクティブにできます。例:

receivers:
  samplereceiver:
    metrics:
      metric-one:
        enabled: true
      metric-two:
        enabled: false

以下は、アクティブ化されたメトリクスを持つホスト・メトリクス・レシーバーの構成例です:

receivers:
  hostmetrics:
    scrapers:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true

注釈

無効化されたメトリクスは Splunk Observability Cloud に送信されません。

トラブルシューティング 🔗

Splunk Observability Cloudをご利用のお客様で、Splunk Observability Cloudでデータを確認できない場合は、以下の方法でサポートを受けることができます。

Splunk Observability Cloudをご利用のお客様

見込み客および無料トライアルユーザー様

  • Splunk Answers のコミュニティサポートで質問し、回答を得る

  • Splunk #observability ユーザーグループの Slack チャンネルに参加して、世界中の顧客、パートナー、Splunk 社員とのコミュニケーションを図る。参加するには、Get Started with Splunk Community マニュアルの チャットグループ を参照してください。

This page was last updated on 2024年05月29日.