Skip to content

MongoDbCollector sends several same-name metrics at a time, the latest set overwrites all the data sent to Graphite #657

Open

Description

@stayen

OS: Ubuntu 16.04, Diamond: 4.0.515

I was studying the issue of MongoDbCollector providing zero metrics for MongoDb in Graphite. Finally, I saw via catching the traffic that the MongoDB collector sends data sets like those below:

servers.servername.mongo.network_per_sec.numRequests 24 1497791440
servers.servername.mongo.network_per_sec.bytesOut 57890 1497791440
servers.servername.mongo.network_per_sec.bytesIn 4156 1497791440
servers.servername.mongo.network_per_sec.numRequests 0 1497791440
servers.servername.mongo.network_per_sec.bytesOut 0 1497791440
servers.servername.mongo.network_per_sec.bytesIn 0 1497791440

The result: zero values are stored in Graphite.

Possible solutions could be:

  1. sum up the COUNTER type of metrics, use the last one for GAUGE, before sending to Graphite
  2. add an option to send data to Graphite aggregator (that would require additional setup on Graphite side)

Currently, the above collector became meaningless and I perhaps will try to use the first "hack" to send actual data at a cost of wasting more RAM on Diamond side.

Activity

  1. changed the title [-]MongoDbCollector sends several same-name metrics at a time, the latest set overwrites al the data sent to Graphite[/-] [+]MongoDbCollector sends several same-name metrics at a time, the latest set overwrites all the data sent to Graphite[/+] on Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions