# ES rally benchmarking for existing cluster on AWS

**URL:** <https://discuss.elastic.co/t/es-rally-benchmarking-for-existing-cluster-on-aws/250182>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [September 28, 2020, 12:27pm UTC](https://discuss.elastic.co/t/es-rally-benchmarking-for-existing-cluster-on-aws/250182 "2020-09-28T12:27:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![naga2](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@naga2](https://discuss.elastic.co/u/naga2)\
**Post date:** [September 28, 2020, 12:27pm UTC](https://discuss.elastic.co/t/es-rally-benchmarking-for-existing-cluster-on-aws/250182/1 "2020-09-28T12:27:01Z")

</div>

I want to benchmark Elastic cluster which was on AWS with ES Rally on local machine.  
I got the below error when tried with following benchmarking command.  
Input:  
esrally --track=data --target-hosts= [cluster public ip]:9200 --pipeline=benchmark-only --offline  
Output:  
'''  
usage: esrally [-h] [--version] [--advanced-config] [--assume-defaults]  
[--distribution-version DISTRIBUTION\_VERSION]  
[--runtime-jdk RUNTIME\_JDK]  
[--track-repository TRACK\_REPOSITORY | --track-path TRACK\_PATH]  
[--track-revision TRACK\_REVISION]  
[--team-repository TEAM\_REPOSITORY]  
[--team-revision TEAM\_REVISION] [--offline]  
[--race-id RACE\_ID] [--pipeline PIPELINE]  
[--revision REVISION] [--track TRACK]  
[--track-params TRACK\_PARAMS] [--challenge CHALLENGE]  
[--team-path TEAM\_PATH] [--car CAR] [--car-params CAR\_PARAMS]  
[--elasticsearch-plugins ELASTICSEARCH\_PLUGINS]  
[--plugin-params PLUGIN\_PARAMS] [--target-hosts TARGET\_HOSTS]  
[--load-driver-hosts LOAD\_DRIVER\_HOSTS]  
[--client-options CLIENT\_OPTIONS]  
[--on-error {continue,abort}] [--telemetry TELEMETRY]  
[--telemetry-params TELEMETRY\_PARAMS]  
[--distribution-repository DISTRIBUTION\_REPOSITORY]  
[--include-tasks INCLUDE\_TASKS | --exclude-tasks EXCLUDE\_TASKS]  
[--user-tag USER\_TAG] [--report-format {markdown,csv}]  
[--show-in-report {available,all-percentiles,all}]  
[--report-file REPORT\_FILE] [--preserve-install] [--test-mode]  
[--enable-driver-profiling] [--quiet]  
[--kill-running-processes]  
{race,race-async,list,info,create-track,generate,compare,configure,download,install,start,stop}  
...  
esrally: error: argument subcommand: invalid choice: '[cluster public ip]:9200' (choose from 'race', 'race-async', 'list', 'info', 'create-track', 'generate', 'compare', 'configure', 'download', 'install', 'start', 'stop')  
'''

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 29, 2020, 10:01am UTC](https://discuss.elastic.co/t/es-rally-benchmarking-for-existing-cluster-on-aws/250182/2 "2020-09-29T10:01:03Z")

</div>

> [@naga2](#):
>
> esrally: error: argument subcommand: invalid choice: '[cluster public ip]:9200' (choose from 'race', 'race-async', 'list', 'info', 'create-track', 'generate', 'compare', 'configure', 'download', 'install', 'start', 'stop')

The last line states the problem, that you are missing a subcommand. Did you copy that command from the documentation, so we might need to fix it..

---

<div class="post-metadata">

**Author:** ![naga2](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@naga2](https://discuss.elastic.co/u/naga2)\
**Post date:** [September 29, 2020, 10:14am UTC](https://discuss.elastic.co/t/es-rally-benchmarking-for-existing-cluster-on-aws/250182/3 "2020-09-29T10:14:35Z")

</div>

> [@naga2](#):
>
> esrally --track=data --target-hosts= [cluster public ip]:9200 --pipeline=benchmark-only --offline

**"esrally --track=data --target-hosts= [cluster public ip]:9200 --pipeline=benchmark-only --offline"**  
This is the command given as input  
can you please answer my query.

1. Is it possible to benchmark a cluster which was on AWS from the ES rally on local machine?  
If yes can please provide the exact pattern for benchmarking the cluster.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [September 29, 2020, 1:30pm UTC](https://discuss.elastic.co/t/es-rally-benchmarking-for-existing-cluster-on-aws/250182/4 "2020-09-29T13:30:40Z")

</div>

Hi,

you have a space character between the command line parameter name and the value for `--target-hosts`. I can reproduce this with (note the space character):

```auto
esrally --target-hosts= 127.0.0.1:9200 --pipeline=benchmark-only
usage: esrally [-h] [--version] [--advanced-config] [--assume-defaults] [--distribution-version DISTRIBUTION_VERSION] [--runtime-jdk RUNTIME_JDK]
               [--track-repository TRACK_REPOSITORY | --track-path TRACK_PATH] [--track-revision TRACK_REVISION] [--team-repository TEAM_REPOSITORY]
               [--team-revision TEAM_REVISION] [--offline] [--race-id RACE_ID] [--pipeline PIPELINE] [--revision REVISION] [--track TRACK] [--track-params TRACK_PARAMS]
               [--challenge CHALLENGE] [--team-path TEAM_PATH] [--car CAR] [--car-params CAR_PARAMS] [--elasticsearch-plugins ELASTICSEARCH_PLUGINS]
               [--plugin-params PLUGIN_PARAMS] [--target-hosts TARGET_HOSTS] [--load-driver-hosts LOAD_DRIVER_HOSTS] [--client-options CLIENT_OPTIONS]
               [--on-error {continue,continue-on-non-fatal,abort}] [--telemetry TELEMETRY] [--telemetry-params TELEMETRY_PARAMS]
               [--distribution-repository DISTRIBUTION_REPOSITORY] [--include-tasks INCLUDE_TASKS | --exclude-tasks EXCLUDE_TASKS] [--user-tag USER_TAG]
               [--report-format {markdown,csv}] [--show-in-report {available,all-percentiles,all}] [--report-file REPORT_FILE] [--preserve-install] [--test-mode]
               [--enable-driver-profiling] [--quiet] [--kill-running-processes]
               {race,list,info,create-track,generate,compare,configure,download,install,start,stop} ...
esrally: error: argument subcommand: invalid choice: '127.0.0.1:9200' (choose from 'race', 'list', 'info', 'create-track', 'generate', 'compare', 'configure', 'download', 'install', 'start', 'stop')

```

So please remove the space character and you should be fine. A couple of related notes:

- I assume that you do **not** benchmark over the Internet but rather have a separate EC2 instance deployed that is in the same region as your Elasticsearch cluster. Otherwise it is likely you get bogus results because you'll saturate the uplink of your Internet connection instead of Elasticsearch.
- If that cluster is publicly reachable I suggest to [turn on TLS encryption](https://www.elastic.co/guide/en/elasticsearch/reference/current/ssl-tls.html) and setup [basic authentication](https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-up-authentication.html).

For tips how to avoid common benchmarking pitfalls you can check our blog post [Seven Tips for Better Elasticsearch Benchmarks](https://www.elastic.co/blog/seven-tips-for-better-elasticsearch-benchmarks).

Happy benchmarking!

Daniel

---

<div class="post-metadata">

**Author:** ![naga2](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@naga2](https://discuss.elastic.co/u/naga2)\
**Post date:** [September 30, 2020, 6:50am UTC](https://discuss.elastic.co/t/es-rally-benchmarking-for-existing-cluster-on-aws/250182/5 "2020-09-30T06:50:39Z")

</div>

Thanks @danielmitterdorfer This helped me.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 28, 2020, 6:50am UTC](https://discuss.elastic.co/t/es-rally-benchmarking-for-existing-cluster-on-aws/250182/6 "2020-10-28T06:50:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
