Skip to content

Add calculate_rate for NetworkIn/Out, DiskRead/WriteBytes and DiskRead/WriteOps#13203

Merged
kaiyan-sheng merged 4 commits intoelastic:masterfrom
kaiyan-sheng:calculate_ec2
Aug 18, 2019
Merged

Add calculate_rate for NetworkIn/Out, DiskRead/WriteBytes and DiskRead/WriteOps#13203
kaiyan-sheng merged 4 commits intoelastic:masterfrom
kaiyan-sheng:calculate_ec2

Conversation

@kaiyan-sheng
Copy link
Copy Markdown
Contributor

@kaiyan-sheng kaiyan-sheng commented Aug 8, 2019

This PR is to try solve elastic/kibana#42687 in metricbeat side.
In ec2 metricset, adding a config parameter called calculate_rate to calculate rates for 8 metrics:

network.in.bytes_per_sec = network.in.bytes / 300 or network.in.bytes / 60
network.out.bytes_per_sec = network.out.bytes / 300 or network.out.bytes / 60
network.in.packets_per_sec = network.in.packets / 300 or network.in.bytes / 60
network.out.packets_per_sec = network.out.packets / 300 or network.out.bytes / 60
diskio.read.bytes_per_sec = diskio.read.bytes / 300 or diskio.read.bytes / 60
diskio.write.bytes_per_sec = diskio.write.bytes / 300 or diskio.write.bytes / 60
diskio.read.ops_per_sec = diskio.read.ops / 300 or diskio.read.ops / 60
diskio.write.ops_per_sec = diskio.write.ops / 300 or diskio.write.ops / 60

Right now both the original metrics and the rate metrics are reported by ec2 metricset, in the future, the original metrics will be removed.

@kaiyan-sheng
Copy link
Copy Markdown
Contributor Author

If detailed monitoring is enabled, then these metrics will be sent to Cloudwatch every 1 min instead of every 5min. The rate calculated here is for each data point, which has nothing to do with the collection period that user sets in Metricbeat aws module. Therefore this calculation doesn't seem to be able to replace by adding collection period into each event. @jsoriano What do you think?

Copy link
Copy Markdown
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Added some comments, and this will also need a changelog entry.

Copy link
Copy Markdown
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

It LGTM, but it needs a changelog entry.

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

Labels

Metricbeat Metricbeat review Team:Integrations Label for the Integrations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants