|
1 | 1 | --- |
2 | 2 | title: "Optimize Grafana dashboards with Elasticsearch index aliases" |
3 | | -description: > |
4 | | - Elasticsearch aliases can apply filters automatically to your queries. |
| 3 | +description: > |
| 4 | + Elasticsearch aliases can apply filters automatically to your queries. |
5 | 5 | Let's use it to speed up some Grafana dashboards." |
6 | 6 | tags: ["grafana", "elasticsearch"] |
7 | 7 | date: 2018-12-20T00:00:00+01:00 |
@@ -79,7 +79,7 @@ this detail is not important). The relevant section is the |
79 | 79 | } |
80 | 80 | ``` |
81 | 81 |
|
82 | | -We can see that Grafana is applying a |
| 82 | +We can see that Grafana is applying a |
83 | 83 | [Filtered Query](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/query-dsl-filtered-query.html). |
84 | 84 | One small detail is that whatever we put in our "Lucene query" input field will |
85 | 85 | be placed in the `query_string` section, as an extra *filter*. This is |
@@ -116,10 +116,10 @@ of how efficient ES/Lucene is. |
116 | 116 | ## Time to profile |
117 | 117 |
|
118 | 118 | At this point, there is not a lot of things that we can do, except profiling the |
119 | | -query. Kibana comes bundled with a |
| 119 | +query. Kibana comes bundled with a |
120 | 120 | [Search Profiler](https://www.elastic.co/guide/en/kibana/current/xpack-profiler.html) |
121 | 121 | with the basic version of X-pack. Putting the query in the profiler and hitting |
122 | | -the <kbd>Profile</kbd> button already provided a lot of insight: |
| 122 | +the {{< button >}}Profile{{< /button >}} button already provided a lot of insight: |
123 | 123 |
|
124 | 124 |  |
125 | 125 |
|
@@ -173,7 +173,7 @@ we can disregard for the sake of this article*. Of course, executing this over |
173 | 173 | { |
174 | 174 | "index" : "accesslogs-2018.12.10", |
175 | 175 | "valid" : true, |
176 | | - "explanation" : "#@timestamp:[1544315703107 TO 1544445303107] |
| 176 | + "explanation" : "#@timestamp:[1544315703107 TO 1544445303107] |
177 | 177 | #(+(header.senderId:www1 header.senderId:www2 ... )" |
178 | 178 | } |
179 | 179 | ] |
@@ -229,7 +229,7 @@ And check the internal query that ES will execute in the profiler: |
229 | 229 | "index" : "accesslogs-2018.12.10", |
230 | 230 | "valid" : true, |
231 | 231 | "explanation" : "(ConstantScore(+ |
232 | | - @timestamp:[1544315703107 TO 1544445303107] |
| 232 | + @timestamp:[1544315703107 TO 1544445303107] |
233 | 233 | +header.senderId:(www1 www2 ...)))^0.0" |
234 | 234 | } |
235 | 235 | ] |
@@ -270,7 +270,7 @@ Elasticsearch supports the use of |
270 | 270 | [*aliases*](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html). |
271 | 271 | This allows having a different name of referencing some index. Think on a pointer |
272 | 272 | to an actual index (very similar to a symbolic link). What is even more |
273 | | -powerful is that we can have |
| 273 | +powerful is that we can have |
274 | 274 | [*filtered aliases*](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html#filtered). |
275 | 275 |
|
276 | 276 | According to the documentation: |
|
0 commit comments