-
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
Make -setup load the Beat dashboards #3506
Conversation
164700a
to
0d8d8b6
Compare
@dedemorton I'd appreciate your review on the docs part. |
0d8d8b6
to
dd7f882
Compare
#dashboards.file: | ||
|
||
# If this option is enabled, the snapshot URL is used instead of the default URL. | ||
#dashboard.snapshot: false |
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.
Nice.
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's a feature we already have in `import_dashboards" :)
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's really great to have all dashboard config options now also directly in the config file and indirectly available through the -E
flag.
Question for the -setup
flag: If I run now ./filebeat -setup
will filebeat stop after the setup phase or will it continue running? And will it load only dashboards or also pipelines, index patterns etc?
} | ||
|
||
var ( | ||
printVersion = flag.Bool("version", false, "Print the version and exit") | ||
setup = flag.Bool("setup", false, "Load the sample Kibana dashboards") |
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.
Load sampel Kibana dashboards, index template, patterns?
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.
At the moment it only loads the dashboards, see the other answer.
@@ -0,0 +1,535 @@ | |||
package dashboards |
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.
Why is it dashboards/dashboards/...
?
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.
First dashboards
is the current import_dashboards
main package. The second is where I gathered most of the code. After we remove import_dashboards
we can move the package one level up.
metricbeat/_meta/beat.full.yml
Outdated
@@ -0,0 +1,294 @@ | |||
########################## Metricbeat Configuration ########################### |
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.
Wasn't this under .gitignore? Do we need it again?
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.
Hmm, weird, i'll check.
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.
There was a typo in .gitignore, I deleted it again.
It will continue in case of success and stop in case of errors. Since we still have the At the moment, |
@tsg Thanks for the details. My preferred option would be as following:
But if -setup only loads the dashboards, I can see that you're behaviour is preferrable as we also have "only" the script. |
We could have both |
For demos what can be done now is |
We're splitting hairs now, but I think Or maybe I'm wrong and we could skip both |
dd7f882
to
f79a78d
Compare
heartbeat/heartbeat.full.yml
Outdated
#dashboards.index: | ||
|
||
# If enabled, load only the dashboards and not the index pattern. | ||
#dashboards.only_dashboards: false |
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.
I think it doesn't make sense to migrate these two options (only_dashboards
and only_index
) from import_dashboards
, and leave -setup
to import both dashboards and the index pattern.
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.
I removed the two options from the configuration files and docs, but they still exist in the code so that they keep working for import_dashboards
. We can remove them from the code as well when we remove import_dashboards
.
f79a78d
to
90ee353
Compare
With this change, `filebeat -setup` loads the sample Kibana dashboards, being the rough equivalent of running: `scripts/import_dashboards && filebeat`. This works for all Beats, not only Filebeat. The `import_dashboards` program is kept for now, to avoid braking compatibility. Code wise, the two share most of the code, which was separated in a sub-package. All flags available for the `import_dashboard` are available as go-ucfg options. For example, to load the dashboards from a directory you can do: filebeat -e -setup -E "dashboards.dir=_meta/kibana" Or do load the snapshot version of the dashboards: filebeat -e -setup -E "dashboards.snapshot=true" This also changes the pipeline loading to happen automatically regardless of whether `-setup` was used or not. Part of elastic#3159. Contains updates for the docs and changelog.
90ee353
to
e10fbaa
Compare
I think what we should improve here on longer term is to remove the necessity of Another improvement that we can do is to load only the Kibana dashboards for which the modules are enabled, but this requires us to split the dashboards per module. The index pattern will be loaded for all modules. For now, I would say to keep |
@tsg sorry I didn't get to the review today (didn't see your request until late in the day). I'll look in the morning. But I have a couple of initial questions:
|
Correct, we don't have to change the getting started guide yet. I think the new way will become preferred in 6.0, but until then more changes might happen.
For the moment we keep the |
With this change,
filebeat -setup
loads the sample Kibana dashboards,being the rough equivalent of running:
scripts/import_dashboards && filebeat
.This works for all Beats, not only Filebeat. The
import_dashboards
programis kept for now, to avoid braking compatibility. Code wise, the two share
most of the code, which was separated in a sub-package.
All flags available for the
import_dashboard
are available as go-ucfg options.For example, to load the dashboards from a directory you can do:
Or do load the snapshot version of the dashboards:
This also changes the pipeline loading to happen automatically regardless of
whether
-setup
was used or not.Part of #3159.
TODOs: