-
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
Add host inventory metrics to system module #20415
Add host inventory metrics to system module #20415
Conversation
Pinging @elastic/integrations-platforms (Team:Platforms) |
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.
Could you update the data.json
files?
The only thing I'm kinda worried about here is how conceptually similar metrics (for example, |
@@ -95,6 +95,7 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) error { | |||
event.Put("softirq.norm.pct", normalizedPct.SoftIRQ) | |||
event.Put("steal.norm.pct", normalizedPct.Steal) | |||
event.Put("total.norm.pct", normalizedPct.Total) | |||
hostFields.Put("host.cpu.pct", normalizedPct.Total) |
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.
All the other metricsets this PR adds host
data to just constructs a MapStr in Event()
. I wonder if we want to do that instead for the sake of consistency?
@fearful-symmetry Yes, these metrics will be common across all hosts/VMs, such as AWS EC2, Azure compute VM. These components don't report counters so in order to make them all consistent, we decide to use gauges instead. We will definitely keep all the counters in system module because they are the raw data and more accurate when data loss occurred. But for the sake of consistency and for Metrics UI display, we will use gauges instead. |
Looks Good. Also +1 on updating the |
@fearful-symmetry Thank you! Will do! (maybe early next week). I will ping you and Jaime for review again after I updated the |
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.
data.json
files updated. For disk and network host metrics, it’s not showing up in data.json
. That’s because the host disk and host network metrics are calculated gauges instead of counters. So it needs more than one metric to calculate gauge.
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.
LGTM.
…ne-2.0-arm * upstream/master: (29 commits) Fix librpm installation in auditbeat build (elastic#21239) Fix prometheus default config (elastic#21253) Fix dev guide test command (elastic#21254) Move aws lambda metricset to GA (elastic#21255) [Docs] Typo in table syntax (elastic#20227) [ECS] Adds related.hosts to capture all hostnames and host identifiers on an event. (elastic#21160) Add recursive split to httpjson (elastic#21214) [DOCS] Add beat specific start widgets (elastic#21217) Fix timestamp handling in remote_write (elastic#21166) Fix aws, azure and googlecloud compute dashboards (elastic#21098) Add acceptable event log keys to winlog (elastic#21205) Add elastic-agent to gitignore (elastic#21219) Add cloudfoundry tags to events (elastic#21177) [Ingest Manager] Agent includes pgp file (elastic#19480) Add compatibility note about ingress-controller-v0.34.1 (elastic#21209) [Ingest Manager] Support for UPGRADE_ACTION (elastic#21002) Fix libbeat.output.*.bytes metrics of Elasticsearch output (elastic#21197) [packaging] use docker.elastic.co/ubi8/ubi-minimal (elastic#21154) Add host inventory metrics to system module (elastic#20415) [Filebeat][Azure Module] Fixing event.outcome from result_type issue (elastic#20998) ...
What does this PR do?
This PR is to add proposed host common fields into
system
module:For network and disk metrics, instead of reporting one event per interface,
host.network.*
andhost.disk.*
aggregates values from all interfaces.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Change
system
module configsystem.yml
with:Then start Metricbeat with
./metricbeat -e
and you should see host common fields listed above in events.Event Example
CPU metric:
Network metrics:
Disk metrics:
Related issues