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

Add MongoDB uptime_ms #6669

Merged
merged 2 commits into from
Dec 2, 2019
Merged

Conversation

pertu
Copy link
Contributor

@pertu pertu commented Nov 17, 2019

@@ -659,6 +661,8 @@ func NewStatLine(oldMongo, newMongo MongoStatus, key string, all bool, sampleSec
Faults: -1,
}

returnVal.UptimeMillis = newStat.UptimeMillis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but can you update the field to be in nanoseconds and rename the field to uptime_ns to match up with flushes_total_time_ns? See line 742

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get it why it's better to name things consistently, but I have doubts:

  1. It may be misleading to have _ns suffix on something that has millisecond resolution.
  2. It's clearer for user when metric name matches with MongoDB's command output.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are good points but I'd still like to make this change for consistency. We are trying to do this across the board for all duration and time values and nanosecond precision gives us the most flexibility and is consistend with our timestamp format.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced uptime_ms with uptime_ns.

@danielnelson danielnelson added area/mongodb feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin labels Nov 22, 2019
@danielnelson danielnelson added this to the 1.13.0 milestone Dec 2, 2019
@danielnelson danielnelson merged commit 6175d17 into influxdata:master Dec 2, 2019
@pertu pertu deleted the add-mongo-uptime branch December 2, 2019 19:45
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mongodb feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants