Supported Providers
Grafana Loki
Grafana Loki provider allows you to query logs from Grafana Loki.
Overview
Grafana Loki is a log aggregation system designed to store and query logs from all your applications and infrastructure. The easiest way to get started is with Grafana Cloud, our fully composable observability stack.
Authentication Parameters
The Grafana Loki provider requires the following authentication parameters:
Grafana Loki Host URL
: The URL of the Grafana Loki instance.Authentication Type
: The type of authentication to use. Supported values areNoAuth
,Basic
, andX-Scope-OrgID
.
NoAuth
- No additional parameters are required, only the
Grafana Loki Host URL
is required.
HTTP basic authentication
HTTP basic authentication - Username
: The username to use for HTTP basic authentication.HTTP basic authentication - Password
: The password to use for HTTP basic authentication.
X-Scope-OrgID
X-Scope-OrgID
: The organization ID to use for Grafana Loki Multi-tenancy support.
Connecting with the Grafana Loki provider
- Obtain the required authentication parameters.
- Add Grafana Loki provider to your keep account and configure with the above authentication parameters.
Querying Grafana Loki
The Grafana Loki provider allows you to query logs from Grafana Loki through the query
and query_range
types. The following are the parameters available for querying:
-
query
type:query
: The LogQL query to perform. Requests that do not use valid LogQL syntax will return errors.limit
: The max number of entries to return. It defaults to100
. Only applies to query types which produce a stream (log lines) response.time
: The evaluation time for the query as a nanosecond Unix epoch or another supported format. Defaults to now.direction
: Determines the sort order of logs. Supported values areforward
orbackward
. Defaults tobackward
.
-
query_range
type:query
: The LogQL query to perform.limit
: The max number of entries to return. It defaults to100
. Only applies to query types which produce a stream (log lines) response.start
: The start time for the query as a nanosecond Unix epoch or another supported format. Defaults to one hour ago. Loki returns results with timestamp greater or equal to this value.end
: The end time for the query as a nanosecond Unix epoch or another supported format. Defaults to now. Loki returns results with timestamp lower than this value.since
: Aduration
used to calculatestart
relative toend
. Ifend
is in the future,start
is calculated as this duration before now. Any value specified forstart
supersedes this parameter.step
: Query resolution step width induration
format or float number of seconds.duration
refers to Prometheus duration strings of the form[0-9]+[smhdwy]
. For example, 5m refers to a duration of 5 minutes. Defaults to a dynamic value based onstart
andend
. Only applies to query types which produce a matrix response.interval
: Only return entries at (or greater than) the specified interval, can be aduration
format or float number of seconds. Only applies to queries which produce a stream response. Not to be confused with step, see the explanation under Step versus interval.direction
: Determines the sort order of logs. Supported values areforward
orbackward
. Defaults tobackward
.