//////////////////////////////////////////////////////////////////////////
//// This content is shared by all Elastic Beats. Make sure you keep the
//// descriptions here generic enough to work for all Beats that include
//// this file. When using cross references, make sure that the cross
//// references resolve correctly for any files that include this one.
//// Use the appropriate variables defined in the index.asciidoc file to
//// resolve Beat names: beatname_uc and beatname_lc.
//// Use the following include to pull this content into a doc file:
//// include::../../libbeat/docs/dashboards.asciidoc[]
//////////////////////////////////////////////////////////////////////////

[[load-kibana-dashboards]]
== Load {kib} dashboards

ifdef::has_solutions[]
TIP: For deeper observability into your infrastructure, you can use the
{metrics-app} and the {logs-app} in {kib}.
For more details, see {observability-guide}/analyze-metrics.html[Metrics monitoring]
and {observability-guide}/monitor-logs.html[Log monitoring].
endif::has_solutions[]

{beatname_uc} comes packaged with example Kibana dashboards, visualizations,
and searches for visualizing {beatname_uc} data in Kibana. Before you can use
the dashboards, you need to create the index pattern, +{beat_default_index_prefix}-*+, and
load the dashboards into Kibana.

To do this, you can either run the `setup`
command (as described here) or
<<configuration-dashboards,configure dashboard loading>> in the
+{beatname_lc}.yml+ config file. This requires a Kibana endpoint configuration. If you didn't already configure
a Kibana endpoint, see <<setup-kibana-endpoint>>.

[float]
[[load-dashboards]]
=== Load dashboards

Make sure Kibana is running before you perform this step. If you are accessing a
secured Kibana instance, make sure you've configured credentials as described in
the <<{beatname_lc}-installation-configuration>>.

To load the recommended index template for writing to {es} and deploy the sample dashboards
for visualizing the data in {kib}, use the command that works with your system.

ifdef::requires-sudo[]
include::{libbeat-dir}/shared-note-sudo.asciidoc[]
endif::requires-sudo[]

include::{libbeat-dir}/tab-widgets/load-dashboards-widget.asciidoc[]

For more options, such as loading customized dashboards, see
{beatsdevguide}/import-dashboards.html[Importing Existing Beat Dashboards].
ifndef::no-output-logstash[]
If you've configured the Logstash output, see
<<load-dashboards-logstash>>.
endif::[]

ifndef::no-output-logstash[]
[float]
[[load-dashboards-logstash]]
=== Load dashboards for Logstash output

During dashboard loading, {beatname_uc} connects to Elasticsearch to check
version information. To load dashboards when the Logstash output is enabled, you
need to temporarily disable the Logstash output and enable Elasticsearch. To
connect to a secured Elasticsearch cluster, you also need to pass Elasticsearch
credentials.

TIP: The example shows a hard-coded password, but you should store sensitive
values
ifndef::serverless[]
in the <<keystore,secrets keystore>>.
endif::[]
ifdef::serverless[]
in environment variables.
endif::[]

endif::no-output-logstash[]

include::{libbeat-dir}/tab-widgets/load-dashboards-logstash-widget.asciidoc[]

// Add Javascript and CSS for tabbed panels
include::{libbeat-dir}/tab-widgets/code.asciidoc[]
