Can you provide me with a hint how to comment out lines in Kibana Dev Tools console? I am interested in comment syntax.
How to write comments in Kibana console?
15.1k Views Asked by ludgo At
4
There are 4 best solutions below
0
On
You can comment out one line at a time by using #. For instance:
# This is a search command
GET /_search
{
"query": {
"match_all": {}
}
}
0
On
Kibana 8.6 definitely supports // (double slash) as a way of commenting a line and leaving a text comment right inside a query:
GET edge-rsas-access-prod/_search?size=0
{
"query": {
"range": {
"@timestamp": {
"lt": "now-1d/d" // setting a timeframe
}
}
}
}
1
On
If you were to comment out a line or lines, you could add /* */, for example, /* "field": "statType.keyword" */
GET /exercise-index/_search
{
"_source": {
"includes": ["content"]
},
"query": {
"exists": {"field": "inclination"}
},
"aggs": {
"location": {
"terms": {
"field": "location"
/* "size": 10 */
}
}
}
}
at the query above, we commented out a line in agg with /* */.
PS:
- The syntax check will fail after you add
/* */on a line, but it does not affect the query. - After add
/* */, you need to remove comma at the line before to meet the json syntax.
Kibana dev tools does not support the comment within the query.
However, you can use
#before or after the query or in-between queries to write a comment.