-
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
Move the import/export dashboards scripts to dev-tools #1359
Merged
ruflin
merged 1 commit into
elastic:master
from
monicasarbu:move_import_export_dashboards_scripts
Apr 13, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
[[new-dashboards]] | ||
== Developer Guide: Creating new Kibana dashboards | ||
|
||
This guide walks you through the steps for creating a new Kibana dashboards | ||
or changing the existing Kibana dashboards for a single Beat. | ||
|
||
If the Beat you are targeting has already few dashboards, the first step would be to import | ||
those dashboards to Kibana and then start changing or adding a dashboard from the existing ones. | ||
|
||
Kibana saves the dashboards together with all the dependencies (visualizations, searches and | ||
index patterns) in a special index in Elasticsearch. By default the index is `.kibana`, but it can be changed to anything. | ||
|
||
After you have created or changed a dashboard in Kibana for a certain Beat, you can export it together with all dependencies to | ||
your local directory. | ||
|
||
We recommend you use the virtual environment under | ||
https://github.com/elastic/beats/tree/master/testing/environments[beats/testing/environments] with the latest version of | ||
Kibana and Elasticsearch to import, create and export the Kibana dashboards, so the latest dashboards are exported from | ||
the same Kibana version. | ||
|
||
=== Import existing Beat dashboards | ||
|
||
For Unix systems, you can use the bash script `import_dashboards.sh` | ||
and for Windows you can use the powershell script `import_dashboards.ps1` from | ||
https://github.com/elastic/beats/tree/master/dev-tools[dev-tools]. | ||
|
||
The command has the following options: | ||
|
||
[source,shell] | ||
---------------------------------------------------------------------- | ||
$ ./import_dashboards.sh -h | ||
|
||
|
||
Import the dashboards, visualizations and index patterns into Kibana. | ||
|
||
The Kibana dashboards together with its dependencies are saved into a | ||
special index pattern in Elasticsearch (by default .kibana), so you need to | ||
specify the Elasticsearch URL and optionally an username and password. | ||
|
||
Usage: | ||
import_dashboards.sh -url http://localhost:9200 -user admin:secret -index .kibana | ||
|
||
Options: | ||
-h | -help | ||
Print the help menu. | ||
-d | -dir | ||
Local directory where the dashboards, visualizations, searches and index | ||
pattern are saved. | ||
-l | -url | ||
Elasticseacrh URL. By default is http://localhost:9200. | ||
-u | -user | ||
Username and password for authenticating to Elasticsearch using Basic | ||
Authentication. The username and password should be separated by a | ||
colon (i.e. admin:secret). By default no username and password are | ||
used. | ||
-i | -index | ||
Kibana index pattern where to save the dashboards, visualizations, | ||
index patterns. By default is .kibana. | ||
|
||
---------------------------------------------------------------------- | ||
|
||
==== dir | ||
The input directory with the dashboards together with its dependencies. The default value is current directory. | ||
|
||
==== url | ||
The Elasticsearch URL. The default value is http://localhost:9200. | ||
|
||
==== user | ||
The username and password for authenticating the connection to Elasticsearch using Basic Authentication. The username and password should be separated by a colon. By default no username and password are used. | ||
|
||
==== kibana | ||
The Elasticsearch index pattern where Kibana saved its configuration. The default value is `.kibana`. | ||
|
||
|
||
To import all the dashboards together with all the dependencies (visualizations, searches and index patterns), you just | ||
need to run the following command in the beats repository: | ||
|
||
On Unix systems: | ||
|
||
[source,shell] | ||
---------------------------------------------------------------------- | ||
../dev-tools/import_dashboards.sh -dir etc/kibana | ||
---------------------------------------------------------------------- | ||
|
||
On Windows systems: | ||
|
||
[source,shell] | ||
---------------------------------------------------------------------- | ||
..\dev-tools\import_dashboards.ps1 -dir .\etc\kibana | ||
---------------------------------------------------------------------- | ||
|
||
|
||
=== Export the Beat dashboards | ||
|
||
To export all the dashboards for a Beat together with all dependencies (visualizations, searches and index patterns), | ||
you can use the python script `export_dashboards.py` from | ||
https://github.com/elastic/beats/tree/master/dev-tools[dev-tools]. | ||
|
||
The command has the following options: | ||
|
||
[source,shell] | ||
---------------------------------------------------------------------- | ||
$ python export_dashboards.py -h | ||
usage: export_dashboards.py [-h] [--url URL] --beat BEAT [--index INDEX] | ||
[--kibana KIBANA] [--dir DIR] | ||
|
||
Export the Kibana dashboards together with all used visualizations, searches | ||
and index pattern | ||
|
||
optional arguments: | ||
-h, --help Show this help message and exit | ||
--url URL Elasticsearch URL. E.g. http://localhost:9200 | ||
--beat BEAT Beat name e.g. topbeat | ||
--index INDEX Elasticsearch index for the Beat data. E.g. topbeat-* | ||
--kibana KIBANA Elasticsearch index for the Kibana dashboards. E.g. .kibana | ||
--dir DIR Output directory. E.g. output | ||
|
||
---------------------------------------------------------------------- | ||
|
||
==== url | ||
The Elasticsearch URL. The default value is http://localhost:9200. | ||
|
||
==== beat | ||
The name of the Beat. This argument is required. | ||
|
||
==== index | ||
The Elasticsearch index pattern where the Beat is storing the data. The default value is constructed from the Beat name + `-*` string. | ||
|
||
==== kibana | ||
The Elasticsearch index pattern where Kibana saved its configuration. The default value is `.kibana`. | ||
|
||
==== dir | ||
The output directory where to save the dashboards together with its dependencies. The default value is `output`. | ||
|
||
For example to export all Packetbeat dashboards, you can run the following command in the `packetbeat` repository: | ||
|
||
[source,shell] | ||
---------------------------------------------------------------------- | ||
../dev-tools/export_dashboards.py --beat packetbeat | ||
---------------------------------------------------------------------- | ||
|
||
NOTE:: We have made it even easier for you to import and export the dashboards | ||
by running the following commands in the Beats repository: | ||
|
||
[source,shell] | ||
---------------------------------------------------------------------- | ||
make import-dashboards | ||
---------------------------------------------------------------------- | ||
|
||
[source,shell] | ||
---------------------------------------------------------------------- | ||
make export-dashboards | ||
---------------------------------------------------------------------- | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should recommend here to use the virtual environment under
testing/environments
to create the dashboards. The reasons for this is:This should lead to hopefully cleaner dashboards or outdated 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.
That's a good point. I will add it.