Is it possible to shorten / give an alias to Timelion query?

Hi,

i am using ELK GA 5.0.0. In my Timelion, I have a query like below;

.es(index=mylogsA-*, timefield=time, q='action:ActionA|ActionB|ActionC|ActionD|ActionE|ActionF|ActionG|ActionH|ActionI|ActionJ|ActionK|ActionL|ActionM|ActionN|Action)|ActionP|ActionQ|ActionR',metric=count).divide(.es(index=mylogsA-*, timefield=time, q='action:ActionY|ActionZ',metric=count)).color(#F00).points(radius=3, weight=1)

This creates a long query display in the chart, and scroll bar appear below. On hovering the chart, the count get displayed along with q, which is not always convenient to see. Is there any way to give an alias, or similar mechanism, so that in my chart, it will be like q=myquery?

Thanks in advance.

Hi @elasticcloud,

while there is currently no way to alias the query in the query bar, you can use the .label() function of your series to influence the name of the query in the legend, e.g. .label("myquery"). It even supports regex capture groups for dynamic labels.

@weltenwort this is exactly what I was looking for. Thanks :slight_smile:

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