Elastic Stack Monitoring Service

edit

Elastic Stack Monitoring Service

edit

We have stopped adding new customers to our Elastic Stack Monitoring Service.

If you are interested in similar capabilities, contact Elastic Support to discuss available options.

The Elastic Stack Monitoring Service (ESMS) is a monitoring cluster on Elastic Cloud. Elastic provides and maintains ESMS for self-managed commercial customers. If you send your monitoring data to ESMS, it can also be used by Elastic support to provide better and faster incident resolution.

Collecting monitoring data about Elasticsearch

edit

There are two methods for collecting and sending data about the health of your production cluster to ESMS:

  • Metricbeat
  • collectors and exporters

To use Metricbeat:

  1. Enable the collection of monitoring data on your cluster.

    Set xpack.monitoring.collection.enabled to true on the production cluster. By default, it is is disabled (false).

    You can use the following APIs to review and change this setting:

    GET _cluster/settings
    
    PUT _cluster/settings
    {
      "persistent": {
        "xpack.monitoring.collection.enabled": true
      }
    }

    If Elasticsearch security features are enabled, you must have monitor cluster privileges to view the cluster settings and manage cluster privileges to change them.

    For more information about these settings, see Monitoring settings.

  2. Disable the default collection of Elasticsearch monitoring metrics.

    Set xpack.monitoring.elasticsearch.collection.enabled to false on the production cluster.

    You can use the following API to change this setting:

    PUT _cluster/settings
    {
      "persistent": {
        "xpack.monitoring.elasticsearch.collection.enabled": false
      }
    }

    If Elasticsearch security features are enabled, you must have monitor cluster privileges to view the cluster settings and manage cluster privileges to change them.

  3. Install Metricbeat on each node.
  4. Enable the Elasticsearch X-Pack module in Metricbeat on each node.

    For example, to enable the default configuration in the modules.d directory, run the following command:

    metricbeat modules enable elasticsearch-xpack

    For more information, see Specify which modules to run and Elasticsearch module.

  5. Configure the Elasticsearch X-Pack module in Metricbeat on each node.

    The modules.d/elasticsearch-xpack.yml file contains the following settings:

      - module: elasticsearch
        metricsets:
          - ccr
          - cluster_stats
          - index
          - index_recovery
          - index_summary
          - ml_job
          - node_stats
          - shard
        period: 10s
        hosts: ["http://localhost:9200"]
        #username: "user"
        #password: "secret"
        xpack.enabled: true

    By default, the module collects Elasticsearch monitoring metrics from http://localhost:9200. If that host and port number are not correct, you must update the hosts setting. If you configured Elasticsearch to use encrypted communications, you must access it via HTTPS. For example, use a hosts setting like https://localhost:9200.

    If Elastic security features are enabled, you must also provide a user ID and password so that Metricbeat can collect metrics successfully:

    1. Create a user on the production cluster that has the remote_monitoring_collector built-in role. Alternatively, use the remote_monitoring_user built-in user.
    2. Add the username and password settings to the Elasticsearch module configuration file.
  6. Optional: Disable the system module in Metricbeat.

    By default, the system module is enabled. The information it collects, however, is not shown on the Monitoring page in Kibana. Unless you want to use that information for other purposes, run the following command:

    metricbeat modules disable system
  7. Identify where to send the Elasticsearch monitoring data and supply the necessary security information.

    Add the following settings in the Metricbeat configuration file (metricbeat.yml):

    output.elasticsearch:
      hosts: ["MONITORING_ELASTICSEARCH_URL"] 
      username: cloud_monitoring_agent 
      password: MONITORING_AGENT_PASSWORD 

    Replace MONITORING_ELASTICSEARCH_URL with the appropriate URL for ESMS, which was provided by the Elastic support team.

    The Elastic support team creates this user in ESMS and grants it the remote_monitoring_agent built-in role.

    Replace MONITORING_AGENT_PASSWORD with the value provided to you by the Elastic support team.

  8. Start Metricbeat.
  9. Verify that your monitoring data exists in ESMS.

    Open Kibana in your web browser. Use the Kibana URL and the administrator user ID that was provided to you by the Elastic support team. View the Elasticsearch metrics on the Stack Monitoring page.

    If you do not see your metrics yet, see Troubleshooting monitoring features.

Collecting monitoring data about Kibana

edit

There are two methods for sending monitoring data about Kibana to ESMS. You can send it directly to ESMS by using Metricbeat or you can route it through exporters on the production cluster.

To use Metricbeat:

  1. Disable the default collection of Kibana monitoring metrics.

    Add the following setting in the Kibana configuration file (kibana.yml):

    xpack.monitoring.kibana.collection.enabled: false

    Leave the xpack.monitoring.enabled set to its default value (true).

    For more information, see Monitoring settings in Kibana.

  2. Start Kibana.
  3. Ensure that the xpack.monitoring.collection.enabled setting is true on each node in the production cluster.
  4. Install Metricbeat on the same server as Kibana.
  5. Enable the Kibana X-Pack module in Metricbeat.

    For example, to enable the default configuration in the modules.d directory, run the following command:

    metricbeat modules enable kibana-xpack

    For more information, see Specify which modules to run and Kibana module.

  6. Configure the Kibana X-Pack module in Metricbeat.

    The modules.d/kibana-xpack.yml file contains the following settings:

    - module: kibana
      metricsets:
        - stats
      period: 10s
      hosts: ["localhost:5601"]
      #basepath: ""
      #username: "user"
      #password: "secret"
      xpack.enabled: true

    By default, the module collects Kibana monitoring metrics from localhost:5601. If that host and port number are not correct, you must update the hosts setting. If you configured Kibana to use encrypted communications, you must access it via HTTPS. For example, use a hosts setting like https://localhost:5601.

    If the Elastic security features are enabled, you must also provide a user ID and password so that Metricbeat can collect metrics successfully:

    1. Create a user on the production cluster that has the remote_monitoring_collector built-in role. Alternatively, use the remote_monitoring_user built-in user.
    2. Add the username and password settings to the Kibana module configuration file.
  7. Optional: Disable the system module in Metricbeat.

    By default, the system module is enabled. The information it collects, however, is not shown on the Monitoring page in Kibana. Unless you want to use that information for other purposes, run the following command:

    metricbeat modules disable system
  8. Identify where to send the Kibana monitoring data and supply the necessary security information.

    Add the following settings in the Metricbeat configuration file (metricbeat.yml):

    output.elasticsearch:
      hosts: ["MONITORING_ELASTICSEARCH_URL"] 
      username: cloud_monitoring_agent 
      password: MONITORING_AGENT_PASSWORD 

    Replace MONITORING_ELASTICSEARCH_URL with the appropriate URL for ESMS, which was provided by the Elastic support team.

    The Elastic support team creates this user in ESMS and grants it the remote_monitoring_agent built-in role.

    Replace MONITORING_AGENT_PASSWORD with the value provided to you by the Elastic support team.

  9. Start Metricbeat.
  10. Verify that your monitoring data exists in ESMS.

    Open Kibana in your web browser. Use the Kibana URL and the administrator user ID that was provided to you by the Elastic support team. View the Kibana metrics on the Stack Monitoring page.

    If you do not see your metrics yet, see Troubleshooting monitoring features.

Collecting monitoring data about Beats

edit

There are two methods for sending monitoring data about Beats to ESMS. You can send it directly to ESMS by using Metricbeat or you can route it through exporters on the production cluster.

For example, to use Metricbeat to monitor Packetbeat:

  1. Enable the HTTP endpoint to allow external collection of monitoring data:

    Add the following setting in the Packetbeat configuration file (packetbeat.yml):

    http.enabled: true

    By default, metrics are exposed on port 5066. If you need to monitor multiple Beats shippers running on the same server, set http.port to expose metrics for each shipper on a different port number:

    http.port: 5067
  2. Disable the default collection of Packetbeat monitoring metrics.

    Add the following setting in the Packetbeat configuration file (packetbeat.yml):

    monitoring.enabled: false
  3. Start Packetbeat.
  4. Install Metricbeat on the same server as Packetbeat. If you already have Metricbeat installed on the server, skip this step.
  5. Enable the beat-xpack module in Metricbeat.

    For example, to enable the default configuration in the modules.d directory, run the following command, using the correct command syntax for your OS:

    metricbeat modules enable beat-xpack

    For more information, see Specify which modules to run and beat module.

  6. Configure the beat-xpack module in Metricbeat.

    The modules.d/beat-xpack.yml file contains the following settings:

    - module: beat
      metricsets:
        - stats
        - state
      period: 10s
      hosts: ["http://localhost:5066"]
      #username: "user"
      #password: "secret"
      xpack.enabled: true

    Set the hosts, username, and password settings as required by your environment. For other module settings, it’s recommended that you accept the defaults.

    By default, the module collects Packetbeat monitoring data from localhost:5066. If you exposed the metrics on a different host or port when you enabled the HTTP endpoint, update the hosts setting.

    To monitor multiple Beats agents or APM Server instances, specify a list of hosts, for example:

    hosts: ["http://localhost:5066","http://localhost:5067","http://localhost:5068"]

    If you configured Packetbeat to use encrypted communications, you must access it via HTTPS. For example, use a hosts setting like https://localhost:5066.

    If the Elastic security features are enabled, you must also provide a user ID and password so that Metricbeat can collect metrics successfully:

    1. Create a user on the production cluster that has the remote_monitoring_collector built-in role. Alternatively, if it’s available in your environment, use the remote_monitoring_user built-in user.
    2. Add the username and password settings to the beat module configuration file.
  7. Optional: Disable the system module in the Metricbeat.

    By default, the system module is enabled. The information it collects, however, is not shown on the Stack Monitoring page in Kibana. Unless you want to use that information for other purposes, run the following command:

    metricbeat modules disable system
  8. Identify where to send the monitoring data and supply the necessary security information.

    Add the following settings in the Metricbeat configuration file (metricbeat.yml):

    output.elasticsearch:
      hosts: ["MONITORING_ELASTICSEARCH_URL"] 
      username: cloud_monitoring_agent 
      password: MONITORING_AGENT_PASSWORD 

    Replace MONITORING_ELASTICSEARCH_URL with the appropriate URL for ESMS, which was provided by the Elastic support team.

    The Elastic support team creates this user in ESMS and grants it the remote_monitoring_agent built-in role.

    Replace MONITORING_AGENT_PASSWORD with the value provided to you by the Elastic support team.

  9. Start Metricbeat.
  10. Verify that your monitoring data exists in ESMS.

    Open Kibana in your web browser. Use the Kibana URL and the administrator user ID that was provided to you by the Elastic support team. View the Beats metrics on the Stack Monitoring page.

    If you do not see your metrics yet, see Troubleshooting monitoring features.

For more information about monitoring Beats, see: