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

check for collections field in db.stats output #36

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

dipu018
Copy link

@dipu018 dipu018 commented Jul 20, 2022

fix for Splunk support case 3015833

@dloucasfx
Copy link

Thanks for your PR.
The plugin does not support sharded cluster, but with your change, we'll be able to collect non-sharded related metrics

For reference, this is how the db.stats() looks like on a sharded cluster

{
  raw: {
    'shard0/shard0-replica0:27017,shard0-replica1:27017,shard0-replica2:27017': {
      db: 'test',
      collections: 0,
      views: 0,
      objects: 0,
      avgObjSize: 0,
      dataSize: 0,
      storageSize: 0,
      totalSize: 0,
      indexes: 0,
      indexSize: 0,
      scaleFactor: 1,
      fileSize: 0,
      fsUsedSize: 0,
      fsTotalSize: 0,
      ok: 1
    }
  },
  objects: 0,
  avgObjSize: 0,
  dataSize: 0,
  storageSize: 0,
  totalSize: 0,
  indexes: 0,
  indexSize: 0,
  scaleFactor: 1,
  fileSize: 0,
  ok: 1,
  '$clusterTime': {
    clusterTime: Timestamp({ t: 1658417413, i: 4 }),
    signature: {
      hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
      keyId: Long("0")
    }
  },
  operationTime: Timestamp({ t: 1658417412, i: 3 })
}

@dloucasfx dloucasfx merged commit 1f51592 into signalfx:master Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants