Canvas server functions
editCanvas server functions
editThese functions can only execute on the server. This may be for performance or security reasons, or because the function uses an API only available on the Kibana server. If the expression is executing in the browser, it will transfer to the server when it hits one of these functions.
A * denotes a required argument.
demodata
editA mock data set that includes project CI times with usernames, countries, and run phases.
Accepts: filter
Argument | Type | Description |
---|---|---|
Unnamed (Alias: |
string |
The name of the demo data set to use (default: |
Returns: datatable
esdocs
editQueries Elasticsearch and gets back raw documents. Specify the fields you want to receive, especially if you are asking for a lot of rows.
Accepts: filter
Argument | Type | Description |
---|---|---|
index |
string |
Specify an index pattern, for example, "logstash-*" (default is |
Unnamed (Aliases: |
string |
A Lucene query string (default: |
sort |
string |
Sort directions as "field, direction", for example, "@timestamp, desc" or "bytes, asc" |
fields |
string |
Comma separated list of fields. Fewer fields will perform better |
metaFields |
string |
Comma separated list of meta fields, for example, "_index,_type" |
count |
number |
The number of docs to pull back. Smaller numbers perform better (default: |
Returns: datatable
escount
editQueries Elasticsearch for a count of the number of hits matching a query.
Accepts: filter
Argument | Type | Description |
---|---|---|
index |
string |
Specify an index pattern, for example, "logstash-*" (default: |
Unnamed (Alias: |
string |
A Lucene query string (default: |
Returns: number
essql
editSpecifies an Elasticsearch SQL.
Accepts: filter
Argument | Type | Description |
---|---|---|
Unnamed* (Alias: |
string |
An SQL query |
count |
number |
The default is |
Returns: datatable
pointseries
editTurns a datatable into a point series model. Currently Canvas differentiates measure from dimensions by looking for a Tiny Math function. If you enter a TinyMath expression in your argument, Canvas treats that argument as a measure. Otherwise, it is a dimension. Dimensions are combined to create unique keys. Measures are then deduplicated by those keys using the specified TinyMath function.
Accepts: datatable
Argument | Type | Description |
---|---|---|
x |
string |
The values along the X-axis |
y |
string |
The values along the Y-axis |
color |
string |
An expression to use in determining the mark’s color |
size |
string |
For elements that support it, the size of the marks |
text |
string |
For use in charts that support it, the text to show in the mark |
Returns: pointseries
server
editForces the interpreter to return to the server.
Accepts: Anything or nothing
Returns: Depends on your input and arguments
timelion
editUses Timelion to extract one or more time series from many sources.
Accepts: filter
Argument | Type | Description |
---|---|---|
Unnamed (Aliases: |
string |
A Timelion query (default: |
interval |
string |
Bucket interval for the time series (default: |
from |
any |
Elasticsearch date math string for the start of the time range (default: |
to |
any |
Elasticsearch date math string for the end of the time range (default: |
timezone |
any |
Time zone for the time range (default: |
Returns: datatable