-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Export cpu usage in percentage by default #1705
Export cpu usage in percentage by default #1705
Conversation
394127b
to
818424b
Compare
b92e6d4
to
cb40022
Compare
- name: irq | ||
type: integer | ||
description: > | ||
The amount of CPU time spent servicing and handling hardware interrupts. | ||
|
||
- name: irq_p | ||
type: integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be float. I am fixing it.
In general LGTM. Somme suggestions/comments:
|
9b9b1c8
to
6f76d43
Compare
I updated the PR with all the comments. @ruflin I kept |
4bee927
to
4cd909a
Compare
jenkins, test it |
4cd909a
to
9ef54d0
Compare
@@ -13,10 +13,11 @@ topbeat.procs: [ | |||
|
|||
# Statistics to collect (all enabled by default) | |||
topbeat.stats: | |||
system: {{ "false" if system_stats == false else "true" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is 4 spaces now. Does it still work? Is there a need to change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it's working. Adding more spaces at each line wasn't on purpose.
LGTM |
jenkins, test it |
d16500a
to
4419741
Compare
The following changes are included in the PR: - Exports CPU usage in percentage (default behaviour) - Add `cpu_ticks` option in the system module of Metricbeat and Topbeat. If it's enabled, it exports the CPU usage in ticks together with the values in percentages. By default is false. - Export CPU stats per core in `type=core` documents instead of `type=system` documents.
4419741
to
142c71b
Compare
jenkins, test it |
With this PR, I did the minimal changes that Topbeat and Metricbeat to export (by default) the CPU usage statistics in percentage instead of CPU ticks. The percentages are:
cpu.iowait_p
,cpu.idle_p
,cpu.irq_p
,cpu.nice_p
,cpu.softirq_p
,cpu.steal_p
,cpu.system_p
andcpu.user_p
.proc.cpu.total_p
If the user is interested in exporting the CPU usage in ticks , he/she needs to set the configuration option
cpu_usage_in_ticks
to true. The following values are exported in addition to the CPU usage in percentage:cpu.iowait
,cpu.idle
,cpu.irq
,cpu.nice
,cpu.softirq
,cpu.steal
proc.cpu.user
,proc.cpu.system
,proc.cpu.total
core.iowait
,core.idle
,core.irq
,core.nice
,core.softirq
,core.steal
We don't need to change the Topbeat dashboard as the values that we are making optional, are not used in the dashboard.
cc-ed: @tsg @simianhacker @ruflin @andrewkroh