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

Cherry-pick to 7.x: [DOCS] Add setup content to Kubernetes and Cloud Foundry docs (#23580) #23680

Merged
merged 2 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions filebeat/docs/running-on-kubernetes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,28 @@ oc patch namespace kube-system -p \
This command sets the node selector for the project to an empty string. If you
don't run this command, the default node selector will skip master nodes.

[float]
==== Load {kib} dashboards

{beatname_uc} comes packaged with various pre-built {kib} dashboards
that you can use to visualize logs from your Kubernetes environment.

If these dashboards are not already loaded into {kib}, you must <<{beatname_lc}-installation-configuration,install {beatname_uc}>>
on any system that can connect to the {stack}, and then run the `setup` command to load the dashboards.
To learn how, see <<load-kibana-dashboards,Load {kib} dashboards>>.

The `setup` command does not load the ingest pipelines used to parse log lines. By default, ingest pipelines
are set up automatically the first time you run {beatname_uc} and connect to {es}.

[IMPORTANT]
=======================================
If you are using a different output other than {es}, such as {ls}, you
need to:

* <<load-template-manually>>
* <<load-kibana-dashboards>>
* <<load-ingest-pipelines>>
=======================================

[float]
==== Deploy
Expand Down
186 changes: 23 additions & 163 deletions libbeat/docs/howto/load-dashboards.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,98 +15,44 @@
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[Analyze metrics]
and {observability-guide}/monitor-logs.html[Monitor logs].
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`
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
+{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 set up the Kibana dashboards for {beatname_uc}, use the appropriate command
for your system. The command shown here loads the dashboards from the {beatname_uc}
package. For more options, such as loading customized dashboards, see
{beatsdevguide}/import-dashboards.html[Importing Existing Beat Dashboards] in
the _Beats Developer Guide_.
ifndef::no-output-logstash[]
If you've configured the Logstash output, see
<<load-dashboards-logstash>>.
endif::[]
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[]

ifdef::deb_os,rpm_os[]
*deb and rpm:*

["source","sh",subs="attributes"]
----------------------------------------------------------------------
{beatname_lc} setup --dashboards
----------------------------------------------------------------------
endif::deb_os,rpm_os[]

ifdef::mac_os[]
*mac:*

["source","sh",subs="attributes"]
----------------------------------------------------------------------
./{beatname_lc} setup --dashboards
----------------------------------------------------------------------

*brew:*

["source","sh",subs="attributes"]
----------------------------------------------------------------------
{beatname_lc} setup --dashboards
----------------------------------------------------------------------
endif::mac_os[]
include::{libbeat-dir}/tab-widgets/load-dashboards-widget.asciidoc[]

ifdef::linux_os[]
*linux:*

["source","sh",subs="attributes"]
----------------------------------------------------------------------
./{beatname_lc} setup --dashboards
----------------------------------------------------------------------
endif::linux_os[]

ifdef::docker_platform[]
*docker:*

["source","sh",subs="attributes"]
----------------------------------------------------------------------
docker run --net="host" {dockerimage} setup --dashboards
----------------------------------------------------------------------
endif::docker_platform[]

ifdef::win_os[]
ifndef::win_only[]
*win:*
endif::win_only[]

Open a PowerShell prompt as an Administrator (right-click the PowerShell icon
and select *Run As Administrator*).

From the PowerShell prompt, change to the directory where you installed {beatname_uc},
and run:

["source","sh",subs="attributes"]
----------------------------------------------------------------------
PS > .{backslash}{beatname_lc}.exe setup --dashboards
----------------------------------------------------------------------
endif::win_os[]
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]
Expand All @@ -128,95 +74,9 @@ ifdef::serverless[]
in environment variables.
endif::[]

ifdef::deb_os,rpm_os[]
*deb and rpm:*

["source","sh",subs="attributes"]
----
{beatname_lc} setup -e \
-E output.logstash.enabled=false \
-E output.elasticsearch.hosts=['localhost:9200'] \
-E output.elasticsearch.username={beat_default_index_prefix}_internal \
-E output.elasticsearch.password={pwd} \
-E setup.kibana.host=localhost:5601
----
endif::deb_os,rpm_os[]

ifdef::mac_os[]
*mac:*

["source","sh",subs="attributes"]
----
./{beatname_lc} setup -e \
-E output.logstash.enabled=false \
-E output.elasticsearch.hosts=['localhost:9200'] \
-E output.elasticsearch.username={beat_default_index_prefix}_internal \
-E output.elasticsearch.password={pwd} \
-E setup.kibana.host=localhost:5601
----

*brew:*

["source","sh",subs="attributes"]
----
{beatname_lc} setup -e \
-E output.logstash.enabled=false \
-E output.elasticsearch.hosts=['localhost:9200'] \
-E output.elasticsearch.username={beat_default_index_prefix}_internal \
-E output.elasticsearch.password={pwd} \
-E setup.kibana.host=localhost:5601
----
endif::mac_os[]

ifdef::linux_os[]
*linux:*

["source","sh",subs="attributes"]
----
./{beatname_lc} setup -e \
-E output.logstash.enabled=false \
-E output.elasticsearch.hosts=['localhost:9200'] \
-E output.elasticsearch.username={beat_default_index_prefix}_internal \
-E output.elasticsearch.password={pwd} \
-E setup.kibana.host=localhost:5601
----
endif::linux_os[]

ifdef::docker_platform[]
*docker:*

["source","sh",subs="attributes"]
----
docker run --net="host" {dockerimage} setup -e \
-E output.logstash.enabled=false \
-E output.elasticsearch.hosts=['localhost:9200'] \
-E output.elasticsearch.username={beat_default_index_prefix}_internal \
-E output.elasticsearch.password={pwd} \
-E setup.kibana.host=localhost:5601
----
endif::docker_platform[]

ifdef::win_os[]
ifndef::win_only[]
*win:*
endif::win_only[]

Open a PowerShell prompt as an Administrator (right-click the PowerShell icon
and select *Run As Administrator*).

From the PowerShell prompt, change to the directory where you installed {beatname_uc},
and run:

["source","sh",subs="attributes"]
----
PS > .{backslash}{beatname_lc}.exe setup -e `
-E output.logstash.enabled=false `
-E output.elasticsearch.hosts=['localhost:9200'] `
-E output.elasticsearch.username={beat_default_index_prefix}_internal `
-E output.elasticsearch.password={pwd} `
-E setup.kibana.host=localhost:5601
----
endif::win_os[]

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[]
29 changes: 29 additions & 0 deletions libbeat/docs/shared-cloudfoundry.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,35 @@ curl -L -O https://raw.githubusercontent.com/elastic/beats/{branch}/deploy/cloud
You need to modify the +{beatname_lc}.yml+ file to set the `api_address`,
`client_id` and `client_secret`.

==== Load {kib} dashboards

{beatname_uc} comes packaged with various pre-built {kib} dashboards
that you can use to visualize data in {kib}.

If these dashboards are not already loaded into {kib}, you must run the {beatname_uc} `setup` command.
To learn how, see <<load-kibana-dashboards,Load {kib} dashboards>>.

ifeval::["{beatname_lc}"=="metricbeat"]
[IMPORTANT]
=======================================
If you are using a different output other than {es}, such as {ls}, you
need to <<load-template-manually>> and <<load-kibana-dashboards>>.
=======================================
endif::[]
ifeval::["{beatname_lc}"=="filebeat"]
The `setup` command does not load the ingest pipelines used to parse log lines. By default, ingest pipelines
are set up automatically the first time you run {beatname_uc} and connect to {es}.

[IMPORTANT]
=======================================
If you are using a different output other than {es}, such as {ls}, you
need to:

* <<load-template-manually>>
* <<load-kibana-dashboards>>
* <<load-ingest-pipelines>>
=======================================
endif::[]

==== Deploy {beatname_uc}

Expand Down
Loading