Importing Existing Beat Dashboardsedit

You can use the import_dashboards script to import all the dashboards and the index pattern for a Beat, including the dependencies such as visualizations and searches. The import_dashboards script is available under beats/libbeat/dashboards. It’s also available in each Beat package under the scripts directory.

There are a couple of common use cases for importing dashboards:

Import Dashboards and/or the Index Pattern for a Single Beatedit

Using the import_dashboards script from the Beat package, you can import the dashboards and the index pattern to Elasticsearch running on localhost for a single Beat (eg. Metricbeat):

If you don’t specify the location of the archive, then by default it’s set to the official zip archive containing the index pattern and the dashboards of the official Beats.

To import only the index-pattern for a single Beat (eg. Metricbeat) use:

./scripts/import_dashboards -only-index

To import only the dashboards together with visualizations and searches for a single Beat (eg. Metricbeat) use:

./scripts/import_dashboards -only-dashboards
Note

When running the import_dashboards script from within the Beat package, the -beat option is set automatically to the Beat name.

See Command Line Options for a description of other import options.

Import Dashboards for Developmentedit

For development or community Beats, it’s easier to run the import_dashboards script from the beats/libbeat/dashboards directory. In this case, you need to first compile the script:

cd beats/libbeat/dashboards
make

And then you can import the index pattern and the dashboards together with visualizations and searches for a single Beat, by passing the -beat option.

For example, to import the Metricbeat dashboards together with visualizations, searches, and the Metricbeat index pattern:

beats/libbeat/dashboards/import_dashboards -beat metricbeat

For this example, you must specify -beat metricbeat. If the -beat option is not specified, the script imports the dashboards of all Beats.

Note

You can make use of the Makefile from the Beat GitHub repository to import the dashboards. If Elasticsearch is running on localhost, then you can run the following command from the Beat repository:

make import-dashboards

If Elasticsearch is running on a different host, then you can use the ES_URL variable:

ES_URL="http://192.168.3.206:9200" make import-dashboards

Command Line Optionsedit

The import_dashboards script accepts the following command-line options. To see all the available options, read the descriptions below or run:

./import_dashboards -h
-beat <beatname>
The Beat name. The Beat name is required when importing from a zip archive. When using import_dashboards from the Beat package, this option is set automatically with the name of the Beat. When running the script from source, the default value is "", so you need to set this option in order to install the index pattern and the dashboards for a single Beat. Otherwise the script imports the index pattern and the dashboards for all Beats.
-cacert <certificate_authority>
The Certificate Authority to use for server verification.
-cert <client_certificate>
The certificate to use for SSL client authentication. The certificate must be in PEM format.
-dir <local_dir>
Local directory that contains the subdirectories: dashboard, visualization, search, and index-pattern. The default value is the current directory.
-es <elasticsearch_url>
The Elasticsearch URL. The default value is http://localhost:9200.
-file <local_archive>
Local zip archive with the dashboards. The archive can contain Kibana dashboards for a single Beat or for multiple Beats.
-i <elasticsearch_index>
You should only use this option if you want to change the index pattern name that’s used by default. For example, if the default is metricbeat-*, you can change it to custombeat-*.
-insecure
If specified, "insecure" SSL connections are allowed.
-k <kibana_index>
The Elasticsearch index pattern where Kibana saves its configuration. The default value is .kibana.
-key <client_key>
The client certificate key. The key must be in PEM format.
-only-dashboards
If specified, then only the dashboards, along with their visualizations and searches, are imported. The index pattern is not imported. By default, this is false.
-only-index
If specified, then only the index pattern is imported. The dashboards, along with their visualizations and searches, are not imported. By default, this is false.
-pass <password>
The password for authenticating the connection to Elasticsearch by using Basic Authentication. By default no username and password are used.
-snapshot

Using -snapshot will import the snapshot dashboards build for the current version. This is mainly useful when running a snapshot Beat build for testing purpose.

Note

When using -snapshot, -url will be ignored.

-url <zip_url>
Zip archive with the dashboards, available online. The archive can contain Kibana dashboards for a single Beat or for multiple Beats.
-user <username>
The username for authenticating the connection to Elasticsearch by using Basic Authentication. By default no username and password are used.

Structure of the Dashboards Archiveedit

The zip archive contains dashboards for at least one Beat. The index pattern, dashboards, visualizations and searches are available in a separate directory for each Beat, having the name of the Beat. For example the official zip archive (beats-dashboards-5.4.0) has the following structure:

  metricbeat/
    dashboard/
    search/
    visualization/
    index-pattern/
  packetbeat/
    dashboard/
    search/
    visualization/
    index-pattern/
  filebeat/
    index-pattern/
  winlogbeat/
    dashboard/
    search/
    visualization/
    index-pattern/