|
1 | 1 | [[install-infrastructure-monitoring]]
|
2 | 2 | [role="xpack"]
|
3 |
| -== Get up and running |
4 |
| - |
5 |
| -beta[] |
6 |
| - |
7 |
| -To get up and running with infrastructure monitoring, you need: |
8 |
| - |
9 |
| -* An Elasticsearch cluster and Kibana (version 6.5 or later) with a basic |
10 |
| -license. To learn how to get started quickly, see |
11 |
| -{stack-gs}/get-started-elastic-stack.html[Getting started with the {stack}]. |
12 |
| -+ |
13 |
| -[TIP] |
14 |
| -============== |
15 |
| -You can skip having to install {es} and {kib} by using our |
16 |
| -https://www.elastic.co/cloud/elasticsearch-service[hosted {es} Service] on |
17 |
| -Elastic Cloud. The {es} Service is available on both AWS and GCP. |
18 |
| -https://www.elastic.co/cloud/elasticsearch-service/signup[Try out the {es} |
19 |
| -Service for free]. |
20 |
| -============== |
21 |
| - |
22 |
| -* {beats} shippers (version 6.5 or later) installed on each system you want to |
| 3 | +== Getting started with infrastructure monitoring |
| 4 | + |
| 5 | +To get started with infrastructure monitoring, you need: |
| 6 | + |
| 7 | +* An Elasticsearch cluster and Kibana (version 6.5 or later) with a basic license |
| 8 | +// Add a link to what constitutes a basic license. And is this any different for the cloud? |
| 9 | + |
| 10 | +* Appropriate {beats} shippers (version 6.5 or later) installed and enabled on each system you want to |
23 | 11 | monitor
|
24 | 12 |
|
25 |
| -You might also need to modify UI settings in {kib} to change default behaviors, |
26 |
| -such as the index pattern used to query the data, and the timestamp field used |
27 |
| -for sorting. For more information, see |
28 |
| -{kibana-ref}/infrastructure-ui-settings-kb.html[{infra-ui} UI Settings] and |
29 |
| -{kibana-ref}/logs-ui-settings-kb.html[{logs-ui} UI Settings]. |
| 13 | +If your data uses nonstandard fields, you may also need to modify some default configuration settings. |
| 14 | + |
| 15 | +[float] |
| 16 | +=== Get Elasticsearch and Kibana |
| 17 | + |
| 18 | +To get started, you can use our hosted {es} Service on Elastic Cloud (recommended for new users), or you can install {es} and {kib} locally. |
| 19 | + |
| 20 | +[float] |
| 21 | +==== Use our hosted service |
| 22 | + |
| 23 | +The hosted {es} Service is available on both AWS and GCP. |
| 24 | +https://www.elastic.co/cloud/elasticsearch-service/signup[Try out the {es} Service for free]. |
| 25 | + |
| 26 | +[float] |
| 27 | +==== Install {es} and {kib} locally |
| 28 | + |
| 29 | +Alternatively, you can {stack-gs}/get-started-elastic-stack.html[install {es} and {kib} locally]. |
| 30 | +Follow the instructions to install {es}, and to install and start {kib}. |
30 | 31 |
|
31 | 32 | [float]
|
32 | 33 | [[install-beats-for-infra-UI]]
|
33 | 34 | === Install {beats} shippers
|
34 | 35 |
|
35 |
| -To populate the <<infrastructure-ui-overview,{infra-ui} UI>> with metrics and |
36 |
| -log data, you need to install and configure the following shippers: |
| 36 | +To start collecting metrics and log data, you need to install and configure the following {beats} shippers: |
37 | 37 |
|
38 |
| -* https://www.elastic.co/products/beats/metricbeat[{metricbeat}] for metrics |
39 |
| -* https://www.elastic.co/products/beats/filebeat[{filebeat}] for log data |
| 38 | +* {metricbeat} for metrics |
| 39 | +* {filebeat} for log data |
40 | 40 |
|
41 |
| -To learn how to install and configure the shippers, do one of the following: |
| 41 | +You can install and configure {beats} shippers for most kinds of data directly from {kib}, or you can install {beats} yourself. |
42 | 42 |
|
43 |
| -* Follow the instructions in the Add Data section of the {kib} home page. Click |
44 |
| -*Add log data* or *Add metrics*, and follow the links for the types of data you |
45 |
| -want to collect. |
46 |
| -+ |
47 |
| -[role="screenshot"] |
48 |
| -image::add-data.png[] |
| 43 | +[float] |
| 44 | +==== Install {beats} from {kib} |
| 45 | + |
| 46 | +To install {beats} from {kib}, on the machine where you want to collect the data, open a {kib} browser window. |
| 47 | +In the *Add Data to Kibana* section, click *Add metric data* or *Add log data*. |
| 48 | +Now follow the instructions for the type of data you want to collect. |
| 49 | +The instructions walk you through the steps required to download, install and configure the appropriate Beats modules for your data. |
49 | 50 |
|
50 |
| -* If your data source isn't in the list, or you want to install {beats} the old |
51 |
| -fashioned way: |
| 51 | +[role="screenshot"] |
| 52 | +image::images/add-data.png[] |
52 | 53 |
|
53 |
| -** Follow the |
54 |
| -{metricbeat-ref}/metricbeat-getting-started.html[{metricbeat} getting started] |
55 |
| -and enable modules for the metrics you want to collect. |
| 54 | +[float] |
| 55 | +==== Install {beats} yourself |
56 | 56 |
|
57 |
| -** Follow the |
58 |
| -{filebeat-ref}/filebeat-modules-quickstart.html[{filebeat} modules quick start] |
59 |
| -and enable modules for the logs you want to collect. If there is no module |
60 |
| -for the logs you want to collect, see the |
61 |
| -{filebeat-ref}/filebeat-getting-started.html[{filebeat} getting started] to |
62 |
| -learn how to configure inputs. |
| 57 | +If your data source doesn't have a {beats} module, or if you want to install {beats} the old fashioned way: |
63 | 58 |
|
64 |
| -For either approach, you need to enable modules in {filebeat} and {metricbeat} |
65 |
| -to populate the {infra-ui} UI with data. |
| 59 | +** For metrics data, follow the instructions in {metricbeat-ref}/metricbeat-getting-started.html[{metricbeat} getting started] and enable modules for the metrics you want to collect. |
66 | 60 |
|
| 61 | +** For logs data, follow the instructions in {filebeat-ref}/filebeat-modules-quickstart.html[{filebeat} modules quick start] and enable modules for the logs you want to collect. |
| 62 | +If there is no module for the logs you want to collect, see the {filebeat-ref}/filebeat-getting-started.html[{filebeat} getting started] to learn how to configure inputs. |
67 | 63 |
|
68 | 64 | [float]
|
69 |
| -==== Which modules and configuration options do I enable? |
| 65 | +=== Enable modules |
| 66 | +However you install {beats}, you need to enable the appropriate modules in {filebeat} and {metricbeat} to populate the Infrastructure and Logs views with data. |
| 67 | + |
| 68 | +// ++ I think some of this is still necessary even if you've followed the instructions to install Beats from Kibana. |
| 69 | +// ++ The instructions there explain how to enable the module. Below, we enable more stuff. |
| 70 | +// ++ What about if you are using Cloud? Is anything different? |
70 | 71 |
|
71 |
| -To populate the *Hosts* view and add logs, enable: |
| 72 | +To populate the *Hosts* view in the Infrastructure app and add logs, enable: |
72 | 73 |
|
73 | 74 | * {metricbeat-ref}/metricbeat-module-system.html[{metricbeat} `system` module] (enabled by default)
|
74 | 75 | * {filebeat-ref}/filebeat-module-system.html[{filebeat} `system` module]
|
75 |
| -* {filebeat-ref}/filebeat-modules.html[Other {filebeat} modules] needed for |
76 |
| -your environment, such as `apache2`, `redis`, and so on |
| 76 | +* {filebeat-ref}/filebeat-modules.html[Other {filebeat} modules] needed for your environment, such as `apache2`, `redis`, and so on |
77 | 77 | * {metricbeat-ref}/add-host-metadata.html[{metricbeat} `add_host_metadata` processor] (enabled by default)
|
78 | 78 | * {metricbeat-ref}/add-cloud-metadata.html[{metricbeat} `add_cloud_metadata` processor] (enabled by default)
|
79 | 79 |
|
80 |
| -To populate the *Docker* view and add logs, enable: |
| 80 | +To populate the *Docker* view in the Infrastructure app and add logs, enable: |
81 | 81 |
|
82 | 82 | * {metricbeat-ref}/metricbeat-module-docker.html[{metricbeat} `docker` module]
|
83 | 83 | * {metricbeat-ref}/add-docker-metadata.html[{metricbeat} `add_docker_metadata` processor]
|
84 | 84 | * {filebeat-ref}/filebeat-input-docker.html[{filebeat} `docker` input]
|
85 | 85 | * {filebeat-ref}/add-docker-metadata.html[{filebeat} `add_docker_metadata` processor]
|
86 | 86 |
|
87 |
| -To populate the *Kubernetes* view and add logs, enable: |
| 87 | +To populate the *Kubernetes* view in the Infrastructure app and add logs, enable: |
88 | 88 |
|
89 |
| -* {metricbeat-ref}/metricbeat-module-kubernetes.html[{metricbeat} `kubernetes` |
90 |
| -module] |
| 89 | +* {metricbeat-ref}/metricbeat-module-kubernetes.html[{metricbeat} `kubernetes` module] |
91 | 90 | * {metricbeat-ref}/add-kubernetes-metadata.html[{metricbeat} `add_kubernetes_metadata` processor]
|
92 | 91 | * {filebeat-ref}/filebeat-input-docker.html[{filebeat} `docker` input]
|
93 | 92 | * {filebeat-ref}/add-kubernetes-metadata.html[{filebeat} `add_kubernetes_metadata` processor]
|
94 | 93 |
|
95 | 94 | [float]
|
96 |
| -==== Which fields are used for the metrics on the Infrastructure home page? |
97 |
| - |
98 |
| -The metrics listed below are provided by the Beats Shippers. Each system type requires their corresponding identity field to be in the same event document: |
99 |
| - |
100 |
| -* Hosts require `host.name` |
101 |
| -* Docker containers require `container.id` |
102 |
| -* Kubernetes pods require `kubernetes.pod.uid` |
103 |
| - |
104 |
| -For the metrics detail page, `event.dataset` is a required field. This field is a combination of `metricset.module`, which is the Metricbeat module name, and `metricset.name`, which is the sub module name. |
105 |
| - |
106 |
| - |
107 |
| -[float] |
108 |
| -===== Host Metrics |
109 |
| - |
110 |
| -*CPU Usage*:: Average of `system.cpu.user.pct` added to the average of `system.cpu.system.pct` divided by `system.cpu.cores` |
111 |
| - |
112 |
| -*Memory Usage*:: Average of `system.memory.actual.used.pct` |
113 |
| - |
114 |
| -*Load*:: Average of `system.load.5` |
115 |
| - |
116 |
| -*Inbound Traffic*:: Derivative of the max of `system.netowrk.in.bytes` scaled to a 1 second rate |
117 |
| - |
118 |
| -*Outbound Traffic*:: Derivative of the max of `system.netowrk.out.bytes` scaled to a 1 second rate |
119 |
| - |
120 |
| -*Log Rate*:: Derivative of the cumulative sum of the document count scaled to a 1 second rate. |
121 |
| -This metric relies on the same indices as the logs. |
122 |
| - |
123 |
| - |
124 |
| -[float] |
125 |
| -===== Docker Container Metrics |
126 |
| - |
127 |
| -*CPU Usage*:: Average of `docker.cpu.total.pct` |
128 |
| - |
129 |
| -*Memory Usage*:: Average of `docker.memory.usage.pct` |
130 |
| - |
131 |
| -*Inbound Traffic*:: Derivative of the max of `docker.network.in.bytes` scaled to a 1 second rate |
132 |
| - |
133 |
| -*Outbound Traffic*:: Derivative of the max of `docker.network.out.bytes` scaled to a 1 second rate |
134 |
| - |
| 95 | +=== Configure your data sources |
| 96 | +// ++ This should probably link directly to the Kibana Source config tab (to be), rather than the detailed list of settings as it currently does? |
| 97 | +If your metrics data or logs data has non-standard fields, you may need to modify some configuration settings in {kib} to change the default behaviors, such as the index pattern used to query the data, and the timestamp field used for sorting. |
| 98 | +For more information, see {kibana-ref}/infrastructure-ui-settings-kb.html[{infra-ui} UI Settings] and {kibana-ref}/logs-ui-settings-kb.html[{logs-ui} UI Settings]. |
135 | 99 |
|
136 | 100 | [float]
|
137 |
| -===== Kubernetes Pod Metrics |
| 101 | +=== More about container monitoring |
138 | 102 |
|
139 |
| -*CPU Usage*:: Average of `kubernetes.pod.cpu.usage.node.pct` |
140 |
| - |
141 |
| -*Memory Usage*:: Average of `kubernetes.pod.memory.usage.node.pct` |
142 |
| - |
143 |
| -*Inbound Traffic*:: Derivative of the max of `kubernetes.pod.network.rx.bytes` scaled to a 1 second rate |
144 |
| - |
145 |
| -*Outbound Traffic*:: Derivative of the max of `kubernetes.pod.network.tx.bytes` scaled to a 1 second rate |
146 |
| - |
147 |
| - |
148 |
| - |
149 |
| -[float] |
150 |
| -==== More about container monitoring |
151 |
| - |
152 |
| -If you're monitoring containers, you can use autodiscover to automatically apply |
153 |
| -configuration changes in response to changes in your containers. To learn how, |
154 |
| -see: |
155 |
| - |
156 |
| -* {filebeat-ref}/configuration-autodiscover.html[{filebeat} autodiscover |
157 |
| -configuration] |
158 |
| -* {metricbeat-ref}/configuration-autodiscover.html[{metricbeat} autodiscover |
159 |
| -configuration] |
160 |
| - |
161 |
| - |
162 |
| -[float] |
163 |
| -==== Known Workarounds |
| 103 | +If you're monitoring Docker containers or Kubernetes pods, you can use autodiscover to automatically change the configuration settings in response to changes in your containers. |
| 104 | +This ensures you don't stop collecting data when your container configuration changes. |
| 105 | +To learn how to do this, see: |
164 | 106 |
|
165 |
| -*Running Metricbeat <=6.5 with Kibana 6.6+*:: For Kubernetes, you will need to change the "Pod ID" field in the "Configure Source" panel (`xpack.infra.sources.default.fields.pod` in `config/kibana.yml` for Kibana 6.6) to `kubernetes.pod.name`. There is a caveat for this workaround; if you have two pods with the same name, only one will be visible in the UI. |
| 107 | +* {filebeat-ref}/configuration-autodiscover.html[{filebeat} autodiscover configuration] |
| 108 | +* {metricbeat-ref}/configuration-autodiscover.html[{metricbeat} autodiscover configuration] |
0 commit comments