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

Set default metricset in windows module to service #6675

Merged
merged 1 commit into from
Mar 29, 2018

Conversation

jsoriano
Copy link
Member

See #6668

@jsoriano jsoriano requested review from ruflin and andrewkroh March 27, 2018 09:19
@ruflin ruflin mentioned this pull request Mar 27, 2018
32 tasks
@jsoriano jsoriano force-pushed the windows-default-metricset branch 2 times, most recently from 4e719da to ac04a7c Compare March 27, 2018 09:36
period: 10s
perfmon.counters:

- module: windows
Copy link
Contributor

@ruflin ruflin Mar 27, 2018

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.

Copy link
Contributor

@ruflin ruflin left a 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.

@jsoriano jsoriano force-pushed the windows-default-metricset branch from ac04a7c to 4c75863 Compare March 27, 2018 17:08
@jsoriano
Copy link
Member Author

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.
What do you think? Should we enable both metricsets by default?

@@ -20,13 +21,8 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: windows
metricsets: ["perfmon"]
period: 10s
perfmon.counters:
Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

@jsoriano jsoriano force-pushed the windows-default-metricset branch from 4c75863 to ab0f878 Compare March 28, 2018 12:06
@jsoriano jsoriano changed the title Set default metricset in windows module to perfmon Set default metricset in windows module to service Mar 28, 2018
@jsoriano
Copy link
Member Author

Changed default metricset to service, reverted changes in periods in reference config, and added commented-out example for perfmon.


- module: windows
metricsets: ["service"]
enabled: true
period: 60s
Copy link
Contributor

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.ymloverwrite the defaults. At least that is what we did so far.

Copy link
Member Author

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?

Copy link
Contributor

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.

@jsoriano jsoriano force-pushed the windows-default-metricset branch from ab0f878 to fec1a94 Compare March 28, 2018 15:43
@ruflin ruflin merged commit 1a25bea into elastic:master Mar 29, 2018
@jsoriano jsoriano deleted the windows-default-metricset branch March 29, 2018 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants