-
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
Set default metricset in windows module to service
#6675
Conversation
4e719da
to
ac04a7c
Compare
metricbeat/metricbeat.reference.yml
Outdated
period: 10s | ||
perfmon.counters: | ||
|
||
- module: windows |
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.
Reference file should definitiveyl contain both options. Probably a config.reference.yml has to be added.
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.
Can you update the docs and quickly mention in the PR on why perfmon is the default metricset. So in case we come back later to this PR again, we know.
ac04a7c
to
4c75863
Compare
Added reference config and updated doc. Regarding why chosing perfmon as default option I don't have a strong opinion on that, I only though that maybe by default the user may not want to monitor all services. |
@@ -20,13 +21,8 @@ in <<configuration-metricbeat>>. Here is an example configuration: | |||
---- | |||
metricbeat.modules: | |||
- module: windows | |||
metricsets: ["perfmon"] | |||
period: 10s | |||
perfmon.counters: |
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.
perfmon
requires configuration so maybe it shouldn't be a "default". You must configure perfmon.counters
in order for it to be useful so I think this example needs improvement.
The service
metricset does not require any configuration so it might be a good default. But TBH the default period of 10s is a excessive. I'd probably increase it 60s at a minimum or drop events for healthy services.
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.
+1 on the proposal. As we have now also a config.reference.yml
we can set the period to 60s (non default) in the config.yml. Also we can add a processor to drop the healthy events with a processor in the config.yml
.
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.
Agree with the proposals, thanks @andrewkroh
Would it be ok to set a different default for the period in the initialization of this module?
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 would be possible but as the default period is possible, I would not do that and use the config.yml
for it. This keeps the code and defaults simple, but still allows us to overwrite them.
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.
Oh, period is module-wide 🤔 it shouldn't be set from the metricset.
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.
You can define a module multiple times in the config if you want to have different periods for different metricsets.
4c75863
to
ab0f878
Compare
perfmon
service
Changed default metricset to |
|
||
- module: windows | ||
metricsets: ["service"] | ||
enabled: true | ||
period: 60s |
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.
Now it becomes interesting. In the reference
config we should use defaults and only in config.yml
overwrite the defaults. At least that is what we did so far.
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.
This is how periods were in the reference config before this PR :)
I think that supporting different default periods can make a lot of sense (this module is a good example), but this gives for a bigger discussion out of the scope of this PR, wdyt?
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.
That we had different periods in the reference config was more an accident as the values were taken from the short config. Now that we have a reference file we could use the default one.
There are a lot of interesting discussion popping up with our changes here. We can take these offline. Will merge as is for now.
ab0f878
to
fec1a94
Compare
See #6668