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

[Metricbeat] gcp: fields do not respect naming best practices #27231

Closed
endorama opened this issue Aug 4, 2021 · 2 comments · Fixed by #27974
Closed

[Metricbeat] gcp: fields do not respect naming best practices #27231

endorama opened this issue Aug 4, 2021 · 2 comments · Fixed by #27974
Assignees
Labels
Team:Integrations Label for the Integrations team

Comments

@endorama
Copy link
Member

endorama commented Aug 4, 2021

While working at #26824 I noticed that the current implementation of the gcp module for Metricbeat does not seem to align to naming conventions.

Examples:

  • gcp.compute.instance.uptime.value is a value in seconds, for which sec suffix should be used
  • gcp.compute.instance.firewall.dropped_bytes_count.value is a bytes value, for which bytes suffix should be used
@endorama endorama self-assigned this Aug 4, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 4, 2021
@endorama endorama added the Team:Integrations Label for the Integrations team label Aug 4, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 4, 2021
endorama added a commit to endorama/beats that referenced this issue Aug 17, 2021
In elastic#27231 I discovered that all `gcp` metricsets do not respect the
Beats naming conventions.

In order to preserve consistency across metricset this commit reverts
the changes that aligned the newly added metrics to naming conventions.
@endorama endorama changed the title [Metricbeat] gcp: fields do not respect ECS and naming best practices [Metricbeat] gcp: fields do not respect naming best practices Sep 22, 2021
@endorama
Copy link
Member Author

endorama commented Sep 22, 2021

After reading through the code I learnt that ECS fields are exported:

hostFieldTable := map[string]string{
"instance.cpu.utilization.value": "host.cpu.usage",
"instance.network.sent_bytes_count.value": "host.network.ingress.bytes",
"instance.network.received_bytes_count.value": "host.network.egress.bytes",
"instance.network.sent_packets_count.value": "host.network.ingress.packets",
"instance.network.received_packets_count.value": "host.network.egress.packets",
"instance.disk.read_bytes_count.value": "host.disk.read.bytes",
"instance.disk.write_bytes_count.value": "host.disk.write.bytes",
}
for _, singleEvent := range groupedEvents {
if hostMetricName, ok := hostFieldTable[singleEvent.Key]; ok {
hostRootFields.Put(hostMetricName, singleEvent.Value)
}
}

Still Beats naming conventions are not respected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants