anchor.diff:  For more information, see 
   {metricbeat-ref}/configuration-metricbeat.html[Specify which modules to run] and 
   {metricbeat-ref}/metricbeat-module-elasticsearch.html[{es} module]. 
  +
  +// end::enable-es-module[]
   --
   
  -.. Configure the {es} module in {metricbeat}. +
  +. Configure the {es} module in {metricbeat}. +
   +
   --
  -You must specify the following settings in the `modules.d/elasticsearch.yml` file:
  +For example, specify the following settings in the `modules.d/elasticsearch.yml`
  +file:
   
   [source,yaml]
   ----------------------------------
  
positive.code: 
  To learn about monitoring in general, see 
  {stack-ov}/xpack-monitoring.html[Monitoring the {stack}]. 
  
  . Enable the collection of monitoring data. Set 
  `xpack.monitoring.collection.enabled` to `true` on each node in the production 
  
negative.code:     - node_stats
      - shard
    period: 10s
    hosts: ["http://localhost:9200"] 
    #username: "user"
    #password: "secret"
    xpack.enabled: true 
  ----------------------------------
  
  By default, the module collects {es} monitoring metrics from
  `http://localhost:9200`. If that host and port number are not correct, you must
  update the `hosts` setting. If you configured {es} to use encrypted
  communications, you must access it via HTTPS. For example, use a `hosts` setting like `https://localhost:9200`.
  // end::configure-es-module[]
  
  // tag::remote-monitoring-user[]
  If Elastic {security-features} are enabled, you must also provide a user ID 
  and password so that {metricbeat} can collect metrics successfully: 
  
  .. Create a user on the production cluster that has the 
  {stack-ov}/built-in-roles.html[`remote_monitoring_collector` built-in role]. 
  Alternatively, use the {stack-ov}/built-in-users.html[`remote_monitoring_user` built-in user].
  
  .. Add the `username` and `password` settings to the {es} module configuration 
  file.
  // end::remote-monitoring-user[]
  --
  
  . Identify where to send the monitoring data. +
  +
  --
  TIP: In production environments, we strongly recommend using a separate cluster 
  