// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.ccr.follow({
  index: "server-metrics-follower",
  wait_for_active_shards: 1,
  remote_cluster: "leader",
  leader_index: "server-metrics",
});
console.log(response);
----
