esms.asciidoc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  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. For more information, see
  98. {kibana-ref}/monitoring-settings-kb.html[Monitoring settings in {kib}].
  99. --
  100. . {kibana-ref}/start-stop.html[Start {kib}].
  101. . Ensure that the `xpack.monitoring.collection.enabled` setting is `true` on
  102. each node in the production cluster.
  103. . {metricbeat-ref}/metricbeat-installation.html[Install {metricbeat}] on the
  104. same server as {kib}.
  105. . Enable the {kib} {xpack} module in {metricbeat}. +
  106. +
  107. --
  108. // include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=enable-kibana-module]
  109. For example, to enable the default configuration in the `modules.d` directory,
  110. run the following command:
  111. ["source","sh",subs="attributes,callouts"]
  112. ----------------------------------------------------------------------
  113. metricbeat modules enable kibana-xpack
  114. ----------------------------------------------------------------------
  115. For more information, see
  116. {metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and
  117. {metricbeat-ref}/metricbeat-module-kibana.html[{kib} module].
  118. --
  119. . Configure the {kib} {xpack} module in {metricbeat}. +
  120. +
  121. --
  122. // include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=configure-kibana-module]
  123. The `modules.d/kibana-xpack.yml` file contains the following settings:
  124. [source,yaml]
  125. ----------------------------------
  126. - module: kibana
  127. metricsets:
  128. - stats
  129. period: 10s
  130. hosts: ["localhost:5601"]
  131. #basepath: ""
  132. #username: "user"
  133. #password: "secret"
  134. xpack.enabled: true
  135. ----------------------------------
  136. By default, the module collects {kib} monitoring metrics from `localhost:5601`.
  137. If that host and port number are not correct, you must update the `hosts`
  138. setting. If you configured {kib} to use encrypted communications, you must
  139. access it via HTTPS. For example, use a `hosts` setting like
  140. `https://localhost:5601`.
  141. // include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=remote-monitoring-user]
  142. If the Elastic {security-features} are enabled, you must also provide a user
  143. ID and password so that {metricbeat} can collect metrics successfully:
  144. .. Create a user on the production cluster that has the
  145. `remote_monitoring_collector` <<built-in-roles,built-in role>>.
  146. Alternatively, use the `remote_monitoring_user`
  147. <<built-in-users,built-in user>>.
  148. .. Add the `username` and `password` settings to the {kib} module configuration
  149. file.
  150. --
  151. . Optional: Disable the system module in {metricbeat}. +
  152. +
  153. --
  154. // include::{kib-repo-dir}/user/monitoring/monitoring-metricbeat.asciidoc[tag=disable-system-module]
  155. By default, the {metricbeat-ref}/metricbeat-module-system.html[system module] is
  156. enabled. The information it collects, however, is not shown on the *Monitoring*
  157. page in {kib}. Unless you want to use that information for other purposes, run
  158. the following command:
  159. ["source","sh",subs="attributes,callouts"]
  160. ----------------------------------------------------------------------
  161. metricbeat modules disable system
  162. ----------------------------------------------------------------------
  163. --
  164. . Identify where to send the {kib} monitoring data and supply the necessary
  165. security information.
  166. +
  167. --
  168. include::esms.asciidoc[tag=metricbeat-config]
  169. --
  170. . {metricbeat-ref}/metricbeat-starting.html[Start {metricbeat}].
  171. . Verify that your monitoring data exists in {esms-init}.
  172. +
  173. --
  174. Open {kib} in your web browser. Use the {kib} URL and the administrator user ID
  175. that was provided to you by the Elastic support team.
  176. {kibana-ref}/kibana-page.html[View the {kib} metrics] on the *Stack Monitoring* page.
  177. If you do not see your metrics yet, see
  178. <<monitoring-troubleshooting,Troubleshooting {monitor-features}>>.
  179. --
  180. [discrete]
  181. [[esms-beats]]
  182. === Collecting monitoring data about Beats
  183. :beatname_lc: packetbeat
  184. :beatname_uc: {packetbeat}
  185. There are two methods for sending monitoring data about Beats to {esms-init}.
  186. You can send it directly to {esms-init} by using {metricbeat} or you can route
  187. it through exporters on the production cluster.
  188. For example, to use {metricbeat} to monitor {beatname_uc}:
  189. . Enable the HTTP endpoint to allow external collection of monitoring data:
  190. +
  191. --
  192. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=enable-http-endpoint]
  193. Add the following setting in the {beatname_uc} configuration file
  194. (+{beatname_lc}.yml+):
  195. [source,yaml]
  196. ----------------------------------
  197. http.enabled: true
  198. ----------------------------------
  199. By default, metrics are exposed on port 5066. If you need to monitor multiple
  200. {beats} shippers running on the same server, set `http.port` to expose metrics
  201. for each shipper on a different port number:
  202. [source,yaml]
  203. ----------------------------------
  204. http.port: 5067
  205. ----------------------------------
  206. --
  207. . Disable the default collection of {beatname_uc} monitoring metrics. +
  208. +
  209. --
  210. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=disable-beat-collection]
  211. Add the following setting in the {beatname_uc} configuration file
  212. (+{beatname_lc}.yml+):
  213. [source,yaml]
  214. ----------------------------------
  215. monitoring.enabled: false
  216. ----------------------------------
  217. --
  218. . Start {beatname_uc}.
  219. . {metricbeat-ref}/metricbeat-installation.html[Install {metricbeat}] on the
  220. same server as {beatname_uc}. If you already have {metricbeat} installed on the
  221. server, skip this step.
  222. . Enable the `beat-xpack` module in {metricbeat}.
  223. +
  224. --
  225. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=enable-beat-module]
  226. For example, to enable the default configuration in the `modules.d` directory,
  227. run the following command, using the correct command syntax for your OS:
  228. ["source","sh",subs="attributes,callouts"]
  229. ----------------------------------------------------------------------
  230. metricbeat modules enable beat-xpack
  231. ----------------------------------------------------------------------
  232. For more information, see
  233. {metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and
  234. {metricbeat-ref}/metricbeat-module-beat.html[beat module].
  235. --
  236. . Configure the `beat-xpack` module in {metricbeat}. +
  237. +
  238. --
  239. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=configure-beat-module]
  240. The `modules.d/beat-xpack.yml` file contains the following settings:
  241. [source,yaml]
  242. ----------------------------------
  243. - module: beat
  244. metricsets:
  245. - stats
  246. - state
  247. period: 10s
  248. hosts: ["http://localhost:5066"]
  249. #username: "user"
  250. #password: "secret"
  251. xpack.enabled: true
  252. ----------------------------------
  253. Set the `hosts`, `username`, and `password` settings as required by your
  254. environment. For other module settings, it's recommended that you accept the
  255. defaults.
  256. By default, the module collects {beatname_uc} monitoring data from
  257. `localhost:5066`. If you exposed the metrics on a different host or port when
  258. you enabled the HTTP endpoint, update the `hosts` setting.
  259. To monitor multiple {beats} agents or APM Server instances, specify a list of
  260. hosts, for example:
  261. [source,yaml]
  262. ----------------------------------
  263. hosts: ["http://localhost:5066","http://localhost:5067","http://localhost:5068"]
  264. ----------------------------------
  265. If you configured {beatname_uc} to use encrypted communications, you must access
  266. it via HTTPS. For example, use a `hosts` setting like `https://localhost:5066`.
  267. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=remote-monitoring-user]
  268. If the Elastic {security-features} are enabled, you must also provide a user
  269. ID and password so that {metricbeat} can collect metrics successfully:
  270. .. Create a user on the production cluster that has the
  271. `remote_monitoring_collector` <<built-in-roles,built-in role>>.
  272. Alternatively, if it's available in your environment, use the
  273. `remote_monitoring_user` <<built-in-users,built-in user>>.
  274. .. Add the `username` and `password` settings to the beat module configuration
  275. file.
  276. --
  277. . Optional: Disable the system module in the {metricbeat}.
  278. +
  279. --
  280. // include::{beats-repo-dir}/monitoring/monitoring-metricbeat.asciidoc[tag=disable-system-module]
  281. By default, the {metricbeat-ref}/metricbeat-module-system.html[system module] is
  282. enabled. The information it collects, however, is not shown on the
  283. *Stack Monitoring* page in {kib}. Unless you want to use that information for
  284. other purposes, run the following command:
  285. ["source","sh",subs="attributes,callouts"]
  286. ----------------------------------------------------------------------
  287. metricbeat modules disable system
  288. ----------------------------------------------------------------------
  289. --
  290. . Identify where to send the monitoring data and supply the necessary security
  291. information.
  292. +
  293. --
  294. include::esms.asciidoc[tag=metricbeat-config]
  295. --
  296. . {metricbeat-ref}/metricbeat-starting.html[Start {metricbeat}].
  297. . Verify that your monitoring data exists in {esms-init}.
  298. +
  299. --
  300. Open {kib} in your web browser. Use the {kib} URL and the administrator user ID
  301. that was provided to you by the Elastic support team. View the
  302. {kibana-ref}/beats-page.html[{beats} metrics] on the *Stack Monitoring* page.
  303. If you do not see your metrics yet, see
  304. <<monitoring-troubleshooting,Troubleshooting {monitor-features}>>.
  305. --
  306. For more information about monitoring Beats, see:
  307. * {auditbeat-ref}/monitoring.html[{auditbeat}]
  308. * {filebeat-ref}/monitoring.html[{filebeat}]
  309. * {functionbeat-ref}/monitoring.html[{functionbeat}]
  310. * {heartbeat-ref}/monitoring.html[{heartbeat}]
  311. * {journalbeat-ref}/monitoring.html[{journalbeat}]
  312. * {metricbeat-ref}/monitoring.html[{metricbeat}]
  313. * {packetbeat-ref}/monitoring.html[{packetbeat}]
  314. * {winlogbeat-ref}/monitoring.html[{winlogbeat}]