esms.asciidoc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. [role="xpack"]
  2. [[esms]]
  3. == {esms}
  4. The {esms} ({esms-init}) is a monitoring cluster on {ecloud}. Elastic provides
  5. and maintains {esms-init} for self-managed commercial customers. If you send
  6. your monitoring data to {esms-init}, it can also be used by Elastic support to
  7. provide better and faster incident resolution.
  8. NOTE: You must obtain your {esms-init} cluster URLs and credentials from the
  9. Elastic support team.
  10. [discrete]
  11. [[esms-elasticsearch]]
  12. === Collecting monitoring data about {es}
  13. There are two methods for collecting and sending data about the health of your
  14. production cluster to {esms-init}:
  15. * {metricbeat}
  16. * collectors and exporters
  17. To use {metricbeat}:
  18. . Enable the collection of monitoring data on your cluster.
  19. +
  20. --
  21. include::configuring-metricbeat.asciidoc[tag=enable-collection]
  22. For more information about these settings, see
  23. <<monitoring-settings>>.
  24. --
  25. . Disable the default collection of {es} monitoring metrics.
  26. +
  27. --
  28. include::configuring-metricbeat.asciidoc[tag=disable-default-collection]
  29. --
  30. . {metricbeat-ref}/metricbeat-installation.html[Install {metricbeat}] on each
  31. node.
  32. . Enable the {es} {xpack} module in {metricbeat} on each node. +
  33. +
  34. --
  35. include::configuring-metricbeat.asciidoc[tag=enable-es-module]
  36. --
  37. . Configure the {es} {xpack} module in {metricbeat} on each node. +
  38. +
  39. --
  40. include::configuring-metricbeat.asciidoc[tag=configure-es-module]
  41. include::configuring-metricbeat.asciidoc[tag=remote-monitoring-user]
  42. --
  43. . Optional: Disable the system module in {metricbeat}. +
  44. +
  45. --
  46. include::configuring-metricbeat.asciidoc[tag=disable-system-module]
  47. --
  48. . Identify where to send the {es} monitoring data and supply the necessary
  49. security information.
  50. +
  51. --
  52. // tag::metricbeat-config[]
  53. Add the following settings in the {metricbeat} configuration file
  54. (`metricbeat.yml`):
  55. [source,yaml]
  56. ----------------------------------
  57. output.elasticsearch:
  58. hosts: ["MONITORING_ELASTICSEARCH_URL"] <1>
  59. username: cloud_monitoring_agent <2>
  60. password: MONITORING_AGENT_PASSWORD <3>
  61. ----------------------------------
  62. <1> Replace `MONITORING_ELASTICSEARCH_URL` with the appropriate URL for {esms-init},
  63. which was provided by the Elastic support team.
  64. <2> The Elastic support team creates this user in {esms-init} and grants it the
  65. <<built-in-roles,`remote_monitoring_agent` built-in role>>.
  66. <3> Replace `MONITORING_AGENT_PASSWORD` with the value provided to you by the
  67. Elastic support team.
  68. // end::metricbeat-config[]
  69. --
  70. . {metricbeat-ref}/metricbeat-starting.html[Start {metricbeat}].
  71. . Verify that your monitoring data exists in {esms-init}.
  72. +
  73. --
  74. Open {kib} in your web browser. Use the {kib} URL and the administrator user ID
  75. that was provided to you by the Elastic support team.
  76. {kibana-ref}/elasticsearch-metrics.html[View the {es} metrics] on the
  77. *Stack Monitoring* page.
  78. If you do not see your metrics yet, see
  79. <<monitoring-troubleshooting,Troubleshooting {monitor-features}>>.
  80. --
  81. [discrete]
  82. [[esms-kibana]]
  83. === Collecting monitoring data about {kib}
  84. There are two methods for sending monitoring data about {kib} to {esms-init}.
  85. You can send it directly to {esms-init} by using {metricbeat} or you can route
  86. it through exporters on the production cluster.
  87. To use {metricbeat}:
  88. . Disable the default collection of {kib} monitoring metrics. +
  89. +
  90. --
  91. //include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=disable-kibana-collection]
  92. Add the following setting in the {kib} configuration file (`kibana.yml`):
  93. [source,yaml]
  94. ----------------------------------
  95. xpack.monitoring.kibana.collection.enabled: false
  96. ----------------------------------
  97. Leave the `xpack.monitoring.enabled` set to its default value (`true`).
  98. For more information, see
  99. {kibana-ref}/monitoring-settings-kb.html[Monitoring settings in {kib}].
  100. --
  101. . {kibana-ref}/start-stop.html[Start {kib}].
  102. . Ensure that the `xpack.monitoring.collection.enabled` setting is `true` on
  103. each node in the production cluster.
  104. . {metricbeat-ref}/metricbeat-installation.html[Install {metricbeat}] on the
  105. same server as {kib}.
  106. . Enable the {kib} {xpack} module in {metricbeat}. +
  107. +
  108. --
  109. // include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=enable-kibana-module]
  110. For example, to enable the default configuration in the `modules.d` directory,
  111. run the following command:
  112. ["source","sh",subs="attributes,callouts"]
  113. ----------------------------------------------------------------------
  114. metricbeat modules enable kibana-xpack
  115. ----------------------------------------------------------------------
  116. For more information, see
  117. {metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and
  118. {metricbeat-ref}/metricbeat-module-kibana.html[{kib} module].
  119. --
  120. . Configure the {kib} {xpack} module in {metricbeat}. +
  121. +
  122. --
  123. // include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=configure-kibana-module]
  124. The `modules.d/kibana-xpack.yml` file contains the following settings:
  125. [source,yaml]
  126. ----------------------------------
  127. - module: kibana
  128. metricsets:
  129. - stats
  130. period: 10s
  131. hosts: ["localhost:5601"]
  132. #basepath: ""
  133. #username: "user"
  134. #password: "secret"
  135. xpack.enabled: true
  136. ----------------------------------
  137. By default, the module collects {kib} monitoring metrics from `localhost:5601`.
  138. If that host and port number are not correct, you must update the `hosts`
  139. setting. If you configured {kib} to use encrypted communications, you must
  140. access it via HTTPS. For example, use a `hosts` setting like
  141. `https://localhost:5601`.
  142. // include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=remote-monitoring-user]
  143. If the Elastic {security-features} are enabled, you must also provide a user
  144. ID and password so that {metricbeat} can collect metrics successfully:
  145. .. Create a user on the production cluster that has the
  146. `remote_monitoring_collector` <<built-in-roles,built-in role>>.
  147. Alternatively, use the `remote_monitoring_user`
  148. <<built-in-users,built-in user>>.
  149. .. Add the `username` and `password` settings to the {kib} module configuration
  150. file.
  151. --
  152. . Optional: Disable the system module in {metricbeat}. +
  153. +
  154. --
  155. // include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=disable-system-module]
  156. By default, the {metricbeat-ref}/metricbeat-module-system.html[system module] is
  157. enabled. The information it collects, however, is not shown on the *Monitoring*
  158. page in {kib}. Unless you want to use that information for other purposes, run
  159. the following command:
  160. ["source","sh",subs="attributes,callouts"]
  161. ----------------------------------------------------------------------
  162. metricbeat modules disable system
  163. ----------------------------------------------------------------------
  164. --
  165. . Identify where to send the {kib} monitoring data and supply the necessary
  166. security information.
  167. +
  168. --
  169. include::esms.asciidoc[tag=metricbeat-config]
  170. --
  171. . {metricbeat-ref}/metricbeat-starting.html[Start {metricbeat}].
  172. . Verify that your monitoring data exists in {esms-init}.
  173. +
  174. --
  175. Open {kib} in your web browser. Use the {kib} URL and the administrator user ID
  176. that was provided to you by the Elastic support team.
  177. {kibana-ref}/kibana-page.html[View the {kib} metrics] on the *Stack Monitoring* page.
  178. If you do not see your metrics yet, see
  179. <<monitoring-troubleshooting,Troubleshooting {monitor-features}>>.
  180. --
  181. [discrete]
  182. [[esms-beats]]
  183. === Collecting monitoring data about Beats
  184. :beatname_lc: packetbeat
  185. :beatname_uc: {packetbeat}
  186. There are two methods for sending monitoring data about Beats to {esms-init}.
  187. You can send it directly to {esms-init} by using {metricbeat} or you can route
  188. it through exporters on the production cluster.
  189. For example, to use {metricbeat} to monitor {beatname_uc}:
  190. . Enable the HTTP endpoint to allow external collection of monitoring data:
  191. +
  192. --
  193. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=enable-http-endpoint]
  194. Add the following setting in the {beatname_uc} configuration file
  195. (+{beatname_lc}.yml+):
  196. [source,yaml]
  197. ----------------------------------
  198. http.enabled: true
  199. ----------------------------------
  200. By default, metrics are exposed on port 5066. If you need to monitor multiple
  201. {beats} shippers running on the same server, set `http.port` to expose metrics
  202. for each shipper on a different port number:
  203. [source,yaml]
  204. ----------------------------------
  205. http.port: 5067
  206. ----------------------------------
  207. --
  208. . Disable the default collection of {beatname_uc} monitoring metrics. +
  209. +
  210. --
  211. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=disable-beat-collection]
  212. Add the following setting in the {beatname_uc} configuration file
  213. (+{beatname_lc}.yml+):
  214. [source,yaml]
  215. ----------------------------------
  216. monitoring.enabled: false
  217. ----------------------------------
  218. --
  219. . Start {beatname_uc}.
  220. . {metricbeat-ref}/metricbeat-installation.html[Install {metricbeat}] on the
  221. same server as {beatname_uc}. If you already have {metricbeat} installed on the
  222. server, skip this step.
  223. . Enable the `beat-xpack` module in {metricbeat}.
  224. +
  225. --
  226. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=enable-beat-module]
  227. For example, to enable the default configuration in the `modules.d` directory,
  228. run the following command, using the correct command syntax for your OS:
  229. ["source","sh",subs="attributes,callouts"]
  230. ----------------------------------------------------------------------
  231. metricbeat modules enable beat-xpack
  232. ----------------------------------------------------------------------
  233. For more information, see
  234. {metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and
  235. {metricbeat-ref}/metricbeat-module-beat.html[beat module].
  236. --
  237. . Configure the `beat-xpack` module in {metricbeat}. +
  238. +
  239. --
  240. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=configure-beat-module]
  241. The `modules.d/beat-xpack.yml` file contains the following settings:
  242. [source,yaml]
  243. ----------------------------------
  244. - module: beat
  245. metricsets:
  246. - stats
  247. - state
  248. period: 10s
  249. hosts: ["http://localhost:5066"]
  250. #username: "user"
  251. #password: "secret"
  252. xpack.enabled: true
  253. ----------------------------------
  254. Set the `hosts`, `username`, and `password` settings as required by your
  255. environment. For other module settings, it's recommended that you accept the
  256. defaults.
  257. By default, the module collects {beatname_uc} monitoring data from
  258. `localhost:5066`. If you exposed the metrics on a different host or port when
  259. you enabled the HTTP endpoint, update the `hosts` setting.
  260. To monitor multiple {beats} agents or APM Server instances, specify a list of
  261. hosts, for example:
  262. [source,yaml]
  263. ----------------------------------
  264. hosts: ["http://localhost:5066","http://localhost:5067","http://localhost:5068"]
  265. ----------------------------------
  266. If you configured {beatname_uc} to use encrypted communications, you must access
  267. it via HTTPS. For example, use a `hosts` setting like `https://localhost:5066`.
  268. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=remote-monitoring-user]
  269. If the Elastic {security-features} are enabled, you must also provide a user
  270. ID and password so that {metricbeat} can collect metrics successfully:
  271. .. Create a user on the production cluster that has the
  272. `remote_monitoring_collector` <<built-in-roles,built-in role>>.
  273. Alternatively, if it's available in your environment, use the
  274. `remote_monitoring_user` <<built-in-users,built-in user>>.
  275. .. Add the `username` and `password` settings to the beat module configuration
  276. file.
  277. --
  278. . Optional: Disable the system module in the {metricbeat}.
  279. +
  280. --
  281. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=disable-system-module]
  282. By default, the {metricbeat-ref}/metricbeat-module-system.html[system module] is
  283. enabled. The information it collects, however, is not shown on the
  284. *Stack Monitoring* page in {kib}. Unless you want to use that information for
  285. other purposes, run the following command:
  286. ["source","sh",subs="attributes,callouts"]
  287. ----------------------------------------------------------------------
  288. metricbeat modules disable system
  289. ----------------------------------------------------------------------
  290. --
  291. . Identify where to send the monitoring data and supply the necessary security
  292. information.
  293. +
  294. --
  295. include::esms.asciidoc[tag=metricbeat-config]
  296. --
  297. . {metricbeat-ref}/metricbeat-starting.html[Start {metricbeat}].
  298. . Verify that your monitoring data exists in {esms-init}.
  299. +
  300. --
  301. Open {kib} in your web browser. Use the {kib} URL and the administrator user ID
  302. that was provided to you by the Elastic support team. View the
  303. {kibana-ref}/beats-page.html[{beats} metrics] on the *Stack Monitoring* page.
  304. If you do not see your metrics yet, see
  305. <<monitoring-troubleshooting,Troubleshooting {monitor-features}>>.
  306. --
  307. For more information about monitoring Beats, see:
  308. * {auditbeat-ref}/monitoring.html[{auditbeat}]
  309. * {filebeat-ref}/monitoring.html[{filebeat}]
  310. * {functionbeat-ref}/monitoring.html[{functionbeat}]
  311. * {heartbeat-ref}/monitoring.html[{heartbeat}]
  312. * {journalbeat-ref}/monitoring.html[{journalbeat}]
  313. * {metricbeat-ref}/monitoring.html[{metricbeat}]
  314. * {packetbeat-ref}/monitoring.html[{packetbeat}]
  315. * {winlogbeat-ref}/monitoring.html[{winlogbeat}]