-
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
[metricbeat] Add service metricset #14206
[metricbeat] Add service metricset #14206
Conversation
Commit'ed the new dependencies. Not sure if we want to take the time to use the lower-level |
Still not sure how to map the nsec CPU usage, since it's an oddball metric. Everything else should be a little more standard now, I hope. |
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.
Thank you for starting this! I left a few comments
Cleaned this up a lot, and ended up using the |
Yes, dupe the data until 8.0, and mark the currently existing field as deprecated in favour of the new ECS one. Of course this should only be done once the new field has been released in an official ECS release :-) |
That sounds like a plan. Do we have some kind of process for deprecated/removing metricsets? |
Sounds good to me. Mind if I take a shot at this? Is there any due date for 8.0?
I will go through your fields.yml and look at this and create an issue at ECS to discuss that further? |
@webmat might know more, I don't have much contact with ECS.
Right now I'd like to get this PR merged, as any cross-platform stuff falls outside the scope of this PR. I don't have much windows knowledge, so I'm more than happy to have other folks work on it. |
Just checking in here, the scope of this PR is still the same, isn't it? Getting systemd services in first.
You flag it as deprecated both in docs and code, pointing users to the new replacement metricset. Then in 8.0 we remove it altogether. Just a note, the new |
Of course! I always thought that the merge between windows and system should be is own PR and not be blocking yours. I am sorry if I caused confusion |
Yep, the conversation has just expanded somewhat. We may want to open a separate issue for dealing with non-systemd integrations. |
@philippkahr @fearful-symmetry Simplest way to get this going is probably to drop in #ecs and have a discussion to get aligned. Then we'll see if/which fields are needed. If new fields are needed, I can guide you on creating that PR :-) |
7d482ee
to
4b343ad
Compare
jenkins, test this |
1 similar comment
jenkins, test this |
* add system/services metricset and dashboard (cherry picked from commit ed74a3f)
@fearful-symmetry I have tested the metricset. Everything works well. One minor note is the new metricset is missing from the reference configuration. |
Created an issue for the missing config: #15635 |
This is part of #14122 and #11846
What is this?
This PR adds
system/services
metricset that reports on the state of services from systemd. Right now this only supports systemd, but I tried to make it somewhat generic in the hope that we could support other service managers from other OSes as time goes on.How do I test this?
This is fairly simple. Any linux distro that uses systemd (which is nearly all of them at this point) will work. Just pull down, enable the metricset and run. You may need to separately run
go get github.com/coreos/go-systemd/dbus
.TODO
coreos/go-systemd
dependency.Some other ideas I had
services_summary
metricset like how we have asocket_summary
metricset?We now have a dashboard!
Test Plan
Start metricbeat and load the dashboards. This metricset should be run on a linux distro using systemd.
Check for output:
Restart the metricset with the
state_filter
config value set to something like[active]
and insure that the metricset is filtering out events with that state.Also check the dashboard to make sure events are showing up.