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 system uptime metricset #4887

Merged
merged 3 commits into from
Aug 14, 2017
Merged

Conversation

andrewkroh
Copy link
Member

This adds a new metricset that reports the system uptime. The metricset
is enabled by default with a period of 15m.

The metricset reports one field system.uptime.duration.ms that is the system's
uptime reported in milliseconds. In Kibana the field is formatted as a duration
and shown in human-readable format (e.g. "8 days").

uptime-kibana

Closes #4848

This adds a new metricset that reports the system uptime. The metricset
is enabled by default with a period of 15m.

The metricset reports one field `system.uptime.duration.ms` that is the system's
uptime reported in milliseconds. In Kibana the field is formatted as a `duration`
and shown in human-readable format (e.g. "8 days").

Closes elastic#4848
@andrewkroh andrewkroh force-pushed the feature/mb/system-uptime branch from 4ddf98c to 5e514dc Compare August 11, 2017 21:50
Copy link
Contributor

@exekias exekias left a comment

Choose a reason for hiding this comment

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

LGTM, left a minor comment


- module: system
period: 15m
metricsets: [uptime]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if this format (instead of a list with -) may confuse some users, as we don't follow the same pattern in the whole file. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree. Changed to block style.

Copy link
Contributor

@tsg tsg left a comment

Choose a reason for hiding this comment

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

Nice 👍

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Nice addition about the input_format.

@@ -79,6 +79,11 @@ def field_to_json(fields, desc, path, output,
if "format" in desc:
fieldFormat["id"] = desc["format"]

if "input_format" in desc:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

Copy link
Contributor

Choose a reason for hiding this comment

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

Great idea!

@@ -83,6 +83,8 @@ https://github.com/elastic/beats/compare/v6.0.0-beta1...master[Check the HEAD di
- Add http server metricset to support push metrics via http. {pull}4770[4770]
- Make config object public for graphite and http server {pull}4820[4820]

- Add system uptime metricset. {issue}[4848[4848]
Copy link
Contributor

Choose a reason for hiding this comment

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

Empty line above on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@ruflin ruflin merged commit 43cd1e7 into elastic:master Aug 14, 2017
@andrewkroh andrewkroh deleted the feature/mb/system-uptime branch December 14, 2017 21:28
@@ -0,0 +1,28 @@
// +build darwin linux openbsd windows
Copy link
Member

Choose a reason for hiding this comment

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

@andrewkroh was there any reason to exclude freebsd here? sigar has the implementation for this. // cc @kaiyan-sheng @ruflin

Copy link
Member Author

Choose a reason for hiding this comment

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

I can’t think of any reason. It probably should be tagged as freebsd,cgo.

Choose a reason for hiding this comment

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

Hi, what is the difference between freebsd & freebsd,cgo tags?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants