loki
grafonnet.query.loki
Index
fn new(datasource, expr)fn withDatasource(value)fn withEditorMode(value)fn withExpr(value)fn withHide(value=true)fn withInstant(value=true)fn withLegendFormat(value)fn withMaxLines(value)fn withQueryType(value)fn withRange(value=true)fn withRefId(value)fn withResolution(value)fn withStep(value)obj datasource
Fields
fn new
new(datasource, expr)
PARAMETERS:
- datasource (
string) - expr (
string)
Creates a new loki query target for panels.
fn withDatasource
withDatasource(value)
PARAMETERS:
- value (
string)
Set the datasource for this query.
fn withEditorMode
withEditorMode(value)
PARAMETERS:
- value (
string)- valid values:
"code","builder"
- valid values:
fn withExpr
withExpr(value)
PARAMETERS:
- value (
string)
The LogQL query.
fn withHide
withHide(value=true)
PARAMETERS:
- value (
boolean)- default value:
true
- default value:
If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
fn withInstant
withInstant(value=true)
PARAMETERS:
- value (
boolean)- default value:
true
- default value:
@deprecated, now use queryType.
fn withLegendFormat
withLegendFormat(value)
PARAMETERS:
- value (
string)
Used to override the name of the series.
fn withMaxLines
withMaxLines(value)
PARAMETERS:
- value (
integer)
Used to limit the number of log rows returned.
fn withQueryType
withQueryType(value)
PARAMETERS:
- value (
string)
Specify the query flavor TODO make this required and give it a default
fn withRange
withRange(value=true)
PARAMETERS:
- value (
boolean)- default value:
true
- default value:
@deprecated, now use queryType.
fn withRefId
withRefId(value)
PARAMETERS:
- value (
string)
A unique identifier for the query within the list of targets. In server side expressions, the refId is used as a variable name to identify results. By default, the UI will assign A->Z; however setting meaningful names may be useful.
fn withResolution
withResolution(value)
PARAMETERS:
- value (
integer)
@deprecated, now use step.
fn withStep
withStep(value)
PARAMETERS:
- value (
string)
Used to set step value for range queries.
obj datasource
fn datasource.withType
datasource.withType(value)
PARAMETERS:
- value (
string)
The plugin type-id
fn datasource.withUid
datasource.withUid(value)
PARAMETERS:
- value (
string)
Specific datasource instance