Hello,
I want add a variable on timelion request like
$myvar=1,.es(index="filebeat-*",q='netflow.egress_interface:'+$myvar ,metric="[...]
What is the correct syntax please ?
Hello,
I want add a variable on timelion request like
$myvar=1,.es(index="filebeat-*",q='netflow.egress_interface:'+$myvar ,metric="[...]
What is the correct syntax please ?
Hi @Bruno1,
Timelion variables are described here:
Just to reiterate the issue, variables are not formally supported but simple, string variables should work.
Hello
NOK
$interface=1,.es(index="filebeat-*",q=netflow.egress_interface:$interface,metric="sum:network.bytes",
OK
.es(index="filebeat-*",q=netflow.egress_interface:1,metric="sum:network.bytes",
Why this don't works ?
Edit :
I want to stress that variables are not formally implemented.
They're in the grammar and the runner, but they're intentionally omitted from the tutorial as the implementation is minimal and incomplete. There's no string concatenation, no arrays, they can't be used across charts, and lots of other lacking functionality. I don't recommend using them as I may decide to drop them.
Timelion variables have to be strings, if the value for egress_interface has to be numeric that could be why it isn't working.
Thanks for your reply
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.