Skip to content

Commit e9e3efe

Browse files
Add track parameter for query index pattern (elastic#57)
With this commit we introduce the track parameter `query_index_prefix` which determines the prefix of indices which are used in query benchmarks and set its default to the former value `elasticlogs_q`. Relates elastic#56
1 parent 5ea9c6d commit e9e3efe

11 files changed

+42
-41
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Note: In general, track parameters are only defined for a subset of the challeng
2828
| Parameter | Explanation | Type | Default Value |
2929
| --------- | ----------- | ---- | ------------- |
3030
| `record_raw_event_size` | Adds a new field `_raw_event_size` to the index which contains the size of the raw logging event in bytes. | `bool` | `False` |
31+
| `query_index_prefix` | Start of the index name(s) used in queries for this track. | `str` | `elasticlogs_q` |
3132

3233
Note: It is recommended to store any track parameters in a json file and pass them to Rally using `--track-params=./params-file.json`.
3334

@@ -126,18 +127,16 @@ The table below shows the track parameters that can be adjusted along with defau
126127
| `p2_bulk_indexing_clients` | Number of [clients](https://esrally.readthedocs.io/en/stable/track.html?highlight=number%20of%20clients#schedule) used to index during phase 2 | `int` | `16` |
127128
| `p2_bulk_size` | The [build-size](https://esrally.readthedocs.io/en/stable/track.html?highlight=number%20of%20clients#bulk) for the autogenerated events during phase 2 | `int` | `1000` |
128129
| `p2_ops` | Number of bulk indexing ops/s for phase 2. A value of `10` with `p2_bulk_size=10` throttles indexing to 10000 docs/s | `int` | `10` |
129-
| `index_alias` | Specifies default index alias. | `str` | `elasticlogs_q_write` |
130130
| `rollover_max_size` | Max index size condition for [rollover API](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html#indices-rollover-index) | `str` | `30gb` |
131131
| `rollover_max_age` | Max age condition for [rollover API](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html#indices-rollover-index) | `str` | `1d` |
132132
| `p2_query1_target_interval` | Frequency of execution (every N sec) of Kibana query: `kibana-traffic-country-dashboard_60m` | `int` | `30` |
133133
| `p2_query2_target_interval` | Frequency of execution (every N sec) of Kibana query: `kibana-discover_30m` | `int` | `30` |
134134
| `p2_query3_target_interval` | Frequency of execution (every N sec) of Kibana query: `kibana-traffic-dashboard_30m` | `int` | `30` |
135135
| `p2_query4_target_interval` | Frequency of execution (every N sec) of Kibana query: `kibana-content_issues-dashboard_30m"` | `int` | `30` |
136136
| `max_rolledover_indices` | Max amount of recently rolled over indices to retain | `int` | `20` |
137-
| `indices_delete_pattern` | pattern to use for matching and deleting old rolled over indices. See also suffix_separator. | `str` | `elasticlogs_q-*` |
138137
| `rolledover_indices_suffix_separator` | Separator for extracting suffix to help determining which rolled-over indices to delete | `str` | `-` |
139138

140-
The indices use the alias `elasticlogs_q_write` and start with `elasticlogs_q-000001`. As an example, for a cluster with rolled over indices: `elasticlogs-000001`, `elasticlogs-000002`, ... `000010` a value of `max_rolledover_indices=8` results to the removal of `elasticlogs-000001` and `elasticlogs-000002`.
139+
The indices use the alias `elasticlogs_q_write` (assuming the default value for `query_index_prefix`) and start with `elasticlogs_q-000001`. As an example, for a cluster with rolled over indices: `elasticlogs-000001`, `elasticlogs-000002`, ... `000010` a value of `max_rolledover_indices=8` results to the removal of `elasticlogs-000001` and `elasticlogs-000002`.
141140

142141
A value of `max_rolledover_indices=20` on a three node bare-metal cluster with the following specifications:
143142

eventdata/challenges/combined-indexing-and-querying.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
{
1010
"name": "combined-indexing-and-querying",
11-
"description": "This challenge simulates a set of Kibana queries against historical data (elasticlogs_q-* indices) as well as against the most recent data currently being indexed. It combined this with rate-limited indexing at varying levels. It assumes one of the challenges creating elasticlogs_q-* indices has been run.",
11+
"description": "This challenge simulates a set of Kibana queries against historical data ({{p_query_index_pattern}} indices) as well as against the most recent data currently being indexed. It combined this with rate-limited indexing at varying levels. It assumes one of the challenges creating {{p_query_index_pattern}} indices has been run.",
1212
"meta": {
1313
"benchmark_type": "indexing/querying",
1414
"target_kibana_queries_per_minute": 7

eventdata/challenges/elasticlogs-1bn-load.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "elasticlogs-1bn-load",
7-
"description": "Indexes 1bn (default) documents into elasticlogs_q-* indices. IDs are autogenerated by Elasticsearch, meaning there are no conflicts.",
7+
"description": "Indexes 1bn (default) documents into {{p_query_index_pattern}} indices. IDs are autogenerated by Elasticsearch, meaning there are no conflicts.",
88
"default": true,
99
"meta": {
1010
"client_count": {{ p_bulk_indexing_clients }},
@@ -23,10 +23,10 @@
2323
{
2424
"operation": {
2525
"operation-type": "create-index",
26-
"index": "elasticlogs_q-000001",
26+
"index": "{{p_query_index_prefix}}-000001",
2727
"body": {
2828
"aliases" : {
29-
"elasticlogs_q_write" : {}
29+
"{{p_query_index_write_alias}}" : {}
3030
}
3131
}
3232
}

eventdata/challenges/elasticlogs-continuous-index-and-query.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{% set p2_rate = (p2_ops * (p2_bulk_size | default(1000))) %}
99
{
1010
"name": "elasticlogs-continuous-index-and-query",
11-
"description": "Indexes 1bn (default) documents into elasticlogs_q-* indices. IDs are autogenerated by Elasticsearch, meaning there are no conflicts.",
11+
"description": "Indexes 1bn (default) documents into {{p_query_index_pattern}} indices. IDs are autogenerated by Elasticsearch, meaning there are no conflicts.",
1212
"meta": {
1313
"benchmark_type": "indexing"
1414
},
@@ -26,10 +26,10 @@
2626
"operation": {
2727
"name": "create_elasticlogs_q_write",
2828
"operation-type": "create-index",
29-
"index": "elasticlogs_q-000001",
29+
"index": "{{p_query_index_prefix}}-000001",
3030
"body": {
3131
"aliases" : {
32-
"elasticlogs_q_write" : {}
32+
"{{p_query_index_write_alias}}" : {}
3333
}
3434
}
3535
}
@@ -43,7 +43,7 @@
4343
"name": "index-append-elasticlogs_q_write-phase1",
4444
"operation": {
4545
"operation-type": "bulk",
46-
"index": "elasticlogs_q_write",
46+
"index": "{{p_query_index_write_alias}}",
4747
"param-source": "elasticlogs_bulk",
4848
"bulk-size": {{ p1_bulk_size | default(1000) | int }},
4949
"record_raw_event_size": {{p_record_raw_event_size}}
@@ -79,7 +79,7 @@
7979
"name": "index-append-elasticlogs_q_write-phase2",
8080
"operation": {
8181
"operation-type": "bulk",
82-
"index": "elasticlogs_q_write",
82+
"index": "{{p_query_index_write_alias}}",
8383
"param-source": "elasticlogs_bulk",
8484
"bulk-size": {{ p2_bulk_size | default(1000) | int }},
8585
"record_raw_event_size": {{p_record_raw_event_size}}

eventdata/challenges/elasticlogs-querying.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "elasticlogs-querying",
3-
"description": "This challenge simulates a set of Kibana queries against historical data (elasticlogs_q-* indices) without any indexing taking place for a period of 30 minutes. It assumes one of the challenges creating elasticlogs_q-* indices has been run.",
3+
"description": "This challenge simulates a set of Kibana queries against historical data ({{p_query_index_pattern}} indices) without any indexing taking place for a period of 30 minutes. It assumes one of the challenges creating {{p_query_index_pattern}} indices has been run.",
44
"meta": {
55
"benchmark_type": "querying",
66
"target_kibana_queries_per_minute": 5

eventdata/challenges/max-indexing-querying.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{
55
"name": "max-indexing-querying",
6-
"description": "Indexes documents as quickly as possible into elasticlogs_q-* indices, initially for 2 hiours without concurrent querying and then for 2 hours with querying. IDs are autogenerated by Elasticsearch, meaning there are no conflicts.",
6+
"description": "Indexes documents as quickly as possible into {{p_query_index_pattern}} indices, initially for 2 hours without concurrent querying and then for 2 hours with querying. IDs are autogenerated by Elasticsearch, meaning there are no conflicts.",
77
"meta": {
88
"client_count": {{ p_bulk_indexing_clients }},
99
"benchmark_type": "indexing"
@@ -21,10 +21,10 @@
2121
{
2222
"operation": {
2323
"operation-type": "create-index",
24-
"index": "elasticlogs_q-000001",
24+
"index": "{{p_query_index_prefix}}-000001",
2525
"body": {
2626
"aliases" : {
27-
"elasticlogs_q_write" : {}
27+
"{{p_query_index_write_alias}}" : {}
2828
}
2929
}
3030
}

eventdata/elasticlogs-index-template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% set p_disk_type = disk_type | default('ssd') | lower %}
22
{% set p_translog_sync = translog_sync | default('request') | lower %}
33
{
4-
"index_patterns": ["elasticlogs*"],
4+
"index_patterns": ["{{p_index_prefix}}*"],
55
"settings": {
66
"index.refresh_interval": "5s",
77
"index.codec": "best_compression",

eventdata/operations/indexing.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{# The following track-params are supported:
2-
index_alias: used by the `rollover_custom_alias` operation. Defaults to `elasticlogs_q_write`.
32
rollover_max_age: used by the `rollover_custom_alias` operation. Defaults to `1d`.
43
rollover_max_size: used by the `rollover_custom_alias` operation. Defaults to `30gb`.
5-
indices_delete_pattern: used by the `delete_rolledover_index_pattern` operation. Defaults to `elasticlogs_q-*`.
64
max_rolledover_indices: used by the `delete_rolledover_index_pattern` operation. Defaults to `20`.
75
rolledover_indices_suffix_separator: used by the `delete_rolledover_index_pattern` operation. Defaults to `-`.
86
#}
@@ -33,7 +31,7 @@ rolledover_indices_suffix_separator: used by the `delete_rolledover_index_patter
3331
"name": "index-append-1000-elasticlogs_q_write",
3432
"operation-type": "bulk",
3533
"param-source": "elasticlogs_bulk",
36-
"index": "elasticlogs_q_write",
34+
"index": "{{p_query_index_write_alias}}",
3735
"bulk-size": 1000,
3836
"record_raw_event_size": {{p_record_raw_event_size}}
3937
},
@@ -48,7 +46,7 @@ rolledover_indices_suffix_separator: used by the `delete_rolledover_index_patter
4846
{
4947
"name": "rollover_elasticlogs_q_write_100M",
5048
"operation-type": "rollover",
51-
"alias": "elasticlogs_q_write",
49+
"alias": "{{p_query_index_write_alias}}",
5250
"body": {
5351
"conditions": {
5452
"max_age": "1d",
@@ -70,7 +68,7 @@ rolledover_indices_suffix_separator: used by the `delete_rolledover_index_patter
7068
{
7169
"name": "rollover_elasticlogs_q_write_50M",
7270
"operation-type": "rollover",
73-
"alias": "elasticlogs_q_write",
71+
"alias": "{{p_query_index_write_alias}}",
7472
"body": {
7573
"conditions": {
7674
"max_age": "1d",
@@ -92,7 +90,7 @@ rolledover_indices_suffix_separator: used by the `delete_rolledover_index_patter
9290
{
9391
"name": "rollover_elasticlogs_q_write_10M",
9492
"operation-type": "rollover",
95-
"alias": "elasticlogs_q_write",
93+
"alias": "{{p_query_index_write_alias}}",
9694
"body": {
9795
"conditions": {
9896
"max_age": "1d",
@@ -114,7 +112,7 @@ rolledover_indices_suffix_separator: used by the `delete_rolledover_index_patter
114112
{
115113
"name": "rollover_elasticlogs_q_write_50gb",
116114
"operation-type": "rollover",
117-
"alias": "elasticlogs_q_write",
115+
"alias": "{{p_query_index_write_alias}}",
118116
"body": {
119117
"conditions": {
120118
"max_age": "1d",
@@ -125,7 +123,7 @@ rolledover_indices_suffix_separator: used by the `delete_rolledover_index_patter
125123
{
126124
"name": "rollover_custom_alias",
127125
"operation-type": "rollover",
128-
"alias": {{ index_alias | default("elasticlogs_q_write") | tojson }},
126+
"alias": "{{p_query_index_write_alias}}",
129127
"body": {
130128
"conditions": {
131129
"max_age": {{ rollover_max_age | default("1d") | tojson }},
@@ -141,7 +139,7 @@ rolledover_indices_suffix_separator: used by the `delete_rolledover_index_patter
141139
{
142140
"name": "deleteindex_elasticlogs_q-*",
143141
"operation-type": "delete-index",
144-
"index": "elasticlogs_q-*"
142+
"index": "{{p_query_index_pattern}}"
145143
},
146144
{
147145
"name": "deleteindex_elasticlogs",
@@ -151,7 +149,7 @@ rolledover_indices_suffix_separator: used by the `delete_rolledover_index_patter
151149
{
152150
"name": "delete_rolledover_index_pattern",
153151
"operation-type": "delete_indices",
154-
"index_pattern": {{ indices_delete_pattern | default("elasticlogs_q-*") | tojson }},
152+
"index_pattern": "{{ p_query_index_pattern }}",
155153
"max_indices": {{ max_rolledover_indices | default(20) | int | tojson }},
156154
"suffix_separator": {{ rolledover_indices_suffix_separator | default("-") | tojson }}
157155
}

eventdata/operations/querying.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"operation-type": "kibana",
104104
"param-source": "elasticlogs_kibana",
105105
"dashboard": "traffic",
106-
"index_pattern": "elasticlogs_q-*",
106+
"index_pattern": "{{p_query_index_pattern}}",
107107
"query_string": "query_string_lists/country_code_query_strings.json",
108108
"window_end": "START+25%,END",
109109
"window_length": "25%"
@@ -113,7 +113,7 @@
113113
"operation-type": "kibana",
114114
"param-source": "elasticlogs_kibana",
115115
"dashboard": "content_issues",
116-
"index_pattern": "elasticlogs_q-*",
116+
"index_pattern": "{{p_query_index_pattern}}",
117117
"query_string": "query_string_lists/country_code_query_strings.json",
118118
"window_end": "START+25%,END",
119119
"window_length": "25%"
@@ -123,7 +123,7 @@
123123
"operation-type": "kibana",
124124
"param-source": "elasticlogs_kibana",
125125
"dashboard": "traffic",
126-
"index_pattern": "elasticlogs_q-*",
126+
"index_pattern": "{{p_query_index_pattern}}",
127127
"query_string": "query_string_lists/country_code_query_strings.json",
128128
"window_end": "START+50%,END",
129129
"window_length": "50%"
@@ -133,7 +133,7 @@
133133
"operation-type": "kibana",
134134
"param-source": "elasticlogs_kibana",
135135
"dashboard": "content_issues",
136-
"index_pattern": "elasticlogs_q-*",
136+
"index_pattern": "{{p_query_index_pattern}}",
137137
"query_string": "query_string_lists/country_code_query_strings.json",
138138
"window_end": "START+50%,END",
139139
"window_length": "50%"
@@ -143,7 +143,7 @@
143143
"operation-type": "kibana",
144144
"param-source": "elasticlogs_kibana",
145145
"dashboard": "traffic",
146-
"index_pattern": "elasticlogs_q-*",
146+
"index_pattern": "{{p_query_index_pattern}}",
147147
"query_string": "query_string_lists/country_code_query_strings.json",
148148
"window_end": "START+75%,END",
149149
"window_length": "75%"
@@ -153,7 +153,7 @@
153153
"operation-type": "kibana",
154154
"param-source": "elasticlogs_kibana",
155155
"dashboard": "content_issues",
156-
"index_pattern": "elasticlogs_q-*",
156+
"index_pattern": "{{p_query_index_pattern}}",
157157
"query_string": "query_string_lists/country_code_query_strings.json",
158158
"window_end": "START+75%,END",
159159
"window_length": "75%"
@@ -163,7 +163,7 @@
163163
"operation-type": "kibana",
164164
"param-source": "elasticlogs_kibana",
165165
"dashboard": "traffic",
166-
"index_pattern": "elasticlogs_q-*",
166+
"index_pattern": "{{p_query_index_pattern}}",
167167
"query_string": ["*"],
168168
"window_end": "now",
169169
"window_length": "30m"
@@ -173,7 +173,7 @@
173173
"operation-type": "kibana",
174174
"param-source": "elasticlogs_kibana",
175175
"dashboard": "discover",
176-
"index_pattern": "elasticlogs_q-*",
176+
"index_pattern": "{{p_query_index_pattern}}",
177177
"query_string": "query_string_lists/country_code_query_strings.json",
178178
"window_end": "START+50%,END",
179179
"window_length": "50%"
@@ -183,7 +183,7 @@
183183
"operation-type": "kibana",
184184
"param-source": "elasticlogs_kibana",
185185
"dashboard": "discover",
186-
"index_pattern": "elasticlogs_q-*",
186+
"index_pattern": "{{p_query_index_pattern}}",
187187
"query_string": "query_string_lists/uncommon_ip_query_strings.json",
188188
"window_end": "START+50%,END",
189189
"window_length": "50%"
@@ -193,7 +193,7 @@
193193
"operation-type": "kibana",
194194
"param-source": "elasticlogs_kibana",
195195
"dashboard": "discover",
196-
"index_pattern": "elasticlogs_q-*",
196+
"index_pattern": "{{p_query_index_pattern}}",
197197
"query_string": "query_string_lists/country_code_query_strings.json",
198198
"window_end": "START+50%,END",
199199
"window_length": "50%"

eventdata/operations/stats.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fieldstats_elasticlogs_q-*",
33
"operation-type": "fieldstats",
4-
"index_pattern": "elasticlogs_q-*"
4+
"index_pattern": "{{p_query_index_pattern}}"
55
},
66
{
77
"name": "indicesstats_elasticlogs",
@@ -11,7 +11,7 @@
1111
{
1212
"name": "indicesstats_elasticlogs_q-*",
1313
"operation-type": "indicesstats",
14-
"index_pattern": "elasticlogs_q-*"
14+
"index_pattern": "{{p_query_index_pattern}}"
1515
},
1616
{
1717
"name": "indicesstats_elasticlogs_i-*",
@@ -21,7 +21,7 @@
2121
{
2222
"name": "indicesstats_elasticlogs_q_write",
2323
"operation-type": "indicesstats",
24-
"index_pattern": "elasticlogs_q_write"
24+
"index_pattern": "{{p_query_index_write_alias}}"
2525
},
2626
{
2727
"name": "indicesstats_elasticlogs_i_write",

eventdata/track.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22

33
{% set p_bulk_indexing_clients = (bulk_indexing_clients | default(8)) %}
44
{% set p_record_raw_event_size = record_raw_event_size | default(False) | tojson %}
5+
{% set p_index_prefix = index_prefix | default("elasticlogs") %}
6+
{% set p_query_index_prefix = query_index_prefix | default(p_index_prefix ~ "_q") %}
7+
{% set p_query_index_pattern = p_query_index_prefix ~ "-*" %}
8+
{% set p_query_index_write_alias = p_query_index_prefix ~ "_write" %}
59

610
{
711
"version": 2,
812
"description": "Track for simulating different aspects of event-based use cases.",
913
"templates": [
1014
{
1115
"name": "elasticlogs-index-template",
12-
"index-pattern": "elasticlogs*",
16+
"index-pattern": "{{p_index_prefix}}*",
1317
"delete-matching-indices": false,
1418
"template": "elasticlogs-index-template.json"
1519
}

0 commit comments

Comments
 (0)