From 15b593365fe4a5734e8914597e9c71322217ef75 Mon Sep 17 00:00:00 2001 From: jartigag <33371871+jartigag@users.noreply.github.com> Date: Mon, 19 Oct 2020 19:17:30 +0200 Subject: [PATCH] Docs: Make tables formatting more consistent (#28164) * Make the documentation tables formatting more consistent * Suggestions incorporated --- docs/sources/datasources/azuremonitor.md | 46 ++++----- docs/sources/datasources/cloudmonitoring.md | 26 ++--- docs/sources/datasources/cloudwatch.md | 54 +++++------ docs/sources/datasources/elasticsearch.md | 34 +++---- docs/sources/datasources/graphite.md | 46 ++++----- docs/sources/datasources/influxdb.md | 64 ++++++------- docs/sources/datasources/jaeger.md | 18 ++-- docs/sources/datasources/loki.md | 8 +- docs/sources/datasources/mssql.md | 94 +++++++++--------- docs/sources/datasources/mysql.md | 94 +++++++++--------- docs/sources/datasources/opentsdb.md | 26 ++--- docs/sources/datasources/postgres.md | 100 ++++++++++---------- docs/sources/datasources/prometheus.md | 52 +++++----- docs/sources/datasources/zipkin.md | 18 ++-- 14 files changed, 340 insertions(+), 340 deletions(-) diff --git a/docs/sources/datasources/azuremonitor.md b/docs/sources/datasources/azuremonitor.md index 346a7570077..37df276e380 100644 --- a/docs/sources/datasources/azuremonitor.md +++ b/docs/sources/datasources/azuremonitor.md @@ -133,17 +133,17 @@ The Azure Monitor data source Plugin provides the following queries you can spec | Name | Description | | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| _Subscriptions()_ | Returns a list of subscriptions. | -| _ResourceGroups()_ | Returns a list of resource groups. | -| _ResourceGroups(12345678-aaaa-bbbb-cccc-123456789aaa)_ | Returns a list of resource groups for a specified subscription. | -| _Namespaces(aResourceGroup)_ | Returns a list of namespaces for the specified resource group. | -| _Namespaces(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup)_ | Returns a list of namespaces for the specified resource group and subscription. | -| _ResourceNames(aResourceGroup, aNamespace)_ | Returns a list of resource names. | -| _ResourceNames(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace)_ | Returns a list of resource names for a specified subscription. | -| _MetricNamespace(aResourceGroup, aNamespace, aResourceName)_ | Returns a list of metric namespaces. | -| _MetricNamespace(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace, aResourceName)_ | Returns a list of metric namespaces for a specified subscription. | -| _MetricNames(aResourceGroup, aNamespace, aResourceName)_ | Returns a list of metric names. | -| _MetricNames(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace, aResourceName)_ | Returns a list of metric names for a specified subscription. | +| `Subscriptions()` | Returns a list of subscriptions. | +| `ResourceGroups()` | Returns a list of resource groups. | +| `ResourceGroups(12345678-aaaa-bbbb-cccc-123456789aaa)` | Returns a list of resource groups for a specified subscription. | +| `Namespaces(aResourceGroup)` | Returns a list of namespaces for the specified resource group. | +| `Namespaces(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup)` | Returns a list of namespaces for the specified resource group and subscription. | +| `ResourceNames(aResourceGroup, aNamespace)` | Returns a list of resource names. | +| `ResourceNames(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace)` | Returns a list of resource names for a specified subscription. | +| `MetricNamespace(aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric namespaces. | +| `MetricNamespace(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric namespaces for a specified subscription. | +| `MetricNames(aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric names. | +| `MetricNames(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup, aNamespace, aResourceName)` | Returns a list of metric names for a specified subscription. | Examples: @@ -212,8 +212,8 @@ Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentatio | Name | Description | | ---------------------------------- | ------------------------------------------------------------ | -| _AppInsightsMetricNames()_ | Returns a list of metric names. | -| _AppInsightsGroupBys(aMetricName)_ | Returns a list of "group bys" for the specified metric name. | +| `AppInsightsMetricNames()` | Returns a list of metric names. | +| `AppInsightsGroupBys(aMetricName)` | Returns a list of "group bys" for the specified metric name. | Examples: @@ -327,22 +327,22 @@ types of template variables. | Name | Description | | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| _workspaces()_ | Returns a list of workspaces for the default subscription. | -| _workspaces(12345678-aaaa-bbbb-cccc-123456789aaa)_ | Returns a list of workspaces for the specified subscription (the parameter can be quoted or unquoted). | +| `workspaces()` | Returns a list of workspaces for the default subscription. | +| `workspaces(12345678-aaaa-bbbb-cccc-123456789aaa)` | Returns a list of workspaces for the specified subscription (the parameter can be quoted or unquoted). | Example variable queries: | Query | Description | | --------------------------------------------------------------------------------------- | --------------------------------------------------------- | -| _subscriptions()_ | Returns a list of Azure subscriptions | -| _workspaces()_ | Returns a list of workspaces for default subscription | -| _workspaces("12345678-aaaa-bbbb-cccc-123456789aaa")_ | Returns a list of workspaces for a specified subscription | -| _workspaces("$subscription")_ | With template variable for the subscription parameter | -| _workspace("myWorkspace").Heartbeat \| distinct Computer_ | Returns a list of Virtual Machines | -| _workspace("$workspace").Heartbeat \| distinct Computer_ | Returns a list of Virtual Machines with template variable | -| _workspace("$workspace").Perf \| distinct ObjectName_ | Returns a list of objects from the Perf table | -| _workspace("$workspace").Perf \| where ObjectName == "$object" \| distinct CounterName_ | Returns a list of metric names from the Perf table | +| `subscriptions()` | Returns a list of Azure subscriptions | +| `workspaces()` | Returns a list of workspaces for default subscription | +| `workspaces("12345678-aaaa-bbbb-cccc-123456789aaa")` | Returns a list of workspaces for a specified subscription | +| `workspaces("$subscription")` | With template variable for the subscription parameter | +| `workspace("myWorkspace").Heartbeat \| distinct Computer` | Returns a list of Virtual Machines | +| `workspace("$workspace").Heartbeat \| distinct Computer` | Returns a list of Virtual Machines with template variable | +| `workspace("$workspace").Perf \| distinct ObjectName` | Returns a list of objects from the Perf table | +| `workspace("$workspace").Perf \| where ObjectName == "$object" \| distinct CounterName` | Returns a list of metric names from the Perf table | diff --git a/docs/sources/datasources/cloudmonitoring.md b/docs/sources/datasources/cloudmonitoring.md index f9fca017452..496d3f9a093 100644 --- a/docs/sources/datasources/cloudmonitoring.md +++ b/docs/sources/datasources/cloudmonitoring.md @@ -30,9 +30,9 @@ Grafana ships with built-in support for Google Cloud Monitoring. Just add it as | Name | Description | | --------------------- | ------------------------------------------------------------------------------------- | -| _Name_ | The data source name. This is how you refer to the data source in panels and queries. | -| _Default_ | Default data source means that it will be pre-selected for new panels. | -| _Service Account Key_ | Service Account Key File for a GCP Project. Instructions below on how to create it. | +| `Name` | The data source name. This is how you refer to the data source in panels and queries. | +| `Default` | Default data source means that it will be pre-selected for new panels. | +| `Service Account Key` | Service Account Key File for a GCP Project. Instructions below on how to create it. | ## Authentication @@ -241,16 +241,16 @@ Variable of the type _Query_ allows you to query Google Cloud Monitoring for var | Name | Description | | -------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| _Metric Types_ | Returns a list of metric type names that are available for the specified service. | -| _Labels Keys_ | Returns a list of keys for `metric label` and `resource label` in the specified metric. | -| _Labels Values_ | Returns a list of values for the label in the specified metric. | -| _Resource Types_ | Returns a list of resource types for the specified metric. | -| _Aggregations_ | Returns a list of aggregations (cross series reducers) for the specified metric. | -| _Aligners_ | Returns a list of aligners (per series aligners) for the specified metric. | -| _Alignment periods_ | Returns a list of all alignment periods that are available in Google Cloud Monitoring query editor in Grafana | -| _Selectors_ | Returns a list of selectors that can be used in SLO (Service Level Objectives) queries | -| _SLO Services_ | Returns a list of Service Monitoring services that can be used in SLO queries | -| _Service Level Objectives (SLO)_ | Returns a list of SLO's for the specified SLO service | +| `Metric Types` | Returns a list of metric type names that are available for the specified service. | +| `Labels Keys` | Returns a list of keys for `metric label` and `resource label` in the specified metric. | +| `Labels Values` | Returns a list of values for the label in the specified metric. | +| `Resource Types` | Returns a list of resource types for the specified metric. | +| `Aggregations` | Returns a list of aggregations (cross series reducers) for the specified metric. | +| `Aligners` | Returns a list of aligners (per series aligners) for the specified metric. | +| `Alignment periods` | Returns a list of all alignment periods that are available in Google Cloud Monitoring query editor in Grafana | +| `Selectors` | Returns a list of selectors that can be used in SLO (Service Level Objectives) queries | +| `SLO Services` | Returns a list of Service Monitoring services that can be used in SLO queries | +| `Service Level Objectives (SLO)` | Returns a list of SLO's for the specified SLO service | ### Using variables in queries diff --git a/docs/sources/datasources/cloudwatch.md b/docs/sources/datasources/cloudwatch.md index b12ac226616..1aa011a44f7 100644 --- a/docs/sources/datasources/cloudwatch.md +++ b/docs/sources/datasources/cloudwatch.md @@ -27,14 +27,14 @@ build dashboards or use Explore with CloudWatch metrics and CloudWatch Logs. | Name | Description | | -------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| _Name_ | The data source name. This is how you refer to the data source in panels and queries. | -| _Default_ | Default data source means that it will be pre-selected for new panels. | -| _Default Region_ | Used in query editor to set region (can be changed on per query basis) | -| _Custom Metrics namespace_ | Specify the CloudWatch namespace of Custom metrics | -| _Authentication Provider_ | Specify the authentication method. | -| _Credentials Profile Name_ | If you use "Credentials file" for _Authentication Provider_, optionally specify a non-default profile. | -| _Assume Role ARN_ | Optionally specify the ARN of a role to assume. | -| _External ID_ | If you are assuming a role in another account, that has been created with an external ID, specify the external ID here. | +| `Name` | The data source name. This is how you refer to the data source in panels and queries. | +| `Default` | Default data source means that it will be pre-selected for new panels. | +| `Default Region` | Used in query editor to set region (can be changed on per query basis) | +| `Custom Metrics namespace` | Specify the CloudWatch namespace of Custom metrics | +| `Auth Provider` | Specify the provider to get credentials. | +| `Credentials` profile name | Specify the name of the profile to use (if you use `~/.aws/credentials` file), leave blank for default. | +| `Assume Role Arn` | Specify the ARN of the role to assume | +| `External ID` | If you are assuming a role in another account, that has been created with an external ID, specify the external ID here. | ## Authentication @@ -258,15 +258,15 @@ Read more about the available dimensions in the [CloudWatch Metrics and Dimensio | Name | Description | | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| _regions()_ | Returns a list of all AWS regions | -| _namespaces()_ | Returns a list of namespaces CloudWatch support. | -| _metrics(namespace, [region])_ | Returns a list of metrics in the namespace. (specify region or use "default" for custom metrics) | -| _dimension_\__keys(namespace)_ | Returns a list of dimension keys in the namespace. | -| _dimension_\__values(region, namespace, metric, dimension_\__key, [filters])_ | Returns a list of dimension values matching the specified `region`, `namespace`, `metric`, `dimension_key` or you can use dimension `filters` to get more specific result as well. | -| _ebs_\__volume_\__ids(region, instance_\__id)_ | Returns a list of volume ids matching the specified `region`, `instance_id`. | -| _ec2_\__instance_\__attribute(region, attribute_\__name, filters)_ | Returns a list of attributes matching the specified `region`, `attribute_name`, `filters`. | -| _resource_\__arns(region, resource_\__type, tags)_ | Returns a list of ARNs matching the specified `region`, `resource_type` and `tags`. | -| _statistics()_ | Returns a list of all the standard statistics | +| `regions()` | Returns a list of all AWS regions | +| `namespaces()` | Returns a list of namespaces CloudWatch support. | +| `metrics(namespace, [region])` | Returns a list of metrics in the namespace. (specify region or use "default" for custom metrics) | +| `dimension_\__keys(namespace)` | Returns a list of dimension keys in the namespace. | +| `dimension_\__values(region, namespace, metric, dimension_\__key, [filters])` | Returns a list of dimension values matching the specified `region`, `namespace`, `metric`, `dimension_key` or you can use dimension `filters` to get more specific result as well. | +| `ebs_\__volume_\__ids(region, instance_\__id)` | Returns a list of volume ids matching the specified `region`, `instance_id`. | +| `ec2_\__instance_\__attribute(region, attribute_\__name, filters)` | Returns a list of attributes matching the specified `region`, `attribute_name`, `filters`. | +| `resource_\__arns(region, resource_\__type, tags)` | Returns a list of ARNs matching the specified `region`, `resource_type` and `tags`. | +| `statistics()` | Returns a list of all the standard statistics | For details about the metrics CloudWatch provides, please refer to the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html). @@ -276,14 +276,14 @@ Example dimension queries which will return list of resources for individual AWS | Query | Service | | -------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -| _dimension_\__values(us-east-1,AWS/ELB,RequestCount,LoadBalancerName)_ | ELB | -| _dimension_\__values(us-east-1,AWS/ElastiCache,CPUUtilization,CacheClusterId)_ | ElastiCache | -| _dimension_\__values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)_ | RedShift | -| _dimension_\__values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)_ | RDS | -| _dimension_\__values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)_ | S3 | -| _dimension_\__values(us-east-1,CWAgent,disk_\__used_\__percent,device,{"InstanceId":"\$instance_\__id"})_ | CloudWatch Agent | -| _resource_\__arns(eu-west-1,elasticloadbalancing:loadbalancer,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})_ | ELB | -| _resource_\__arns(eu-west-1,ec2:instance,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})_ | EC2 | +| `dimension_\__values(us-east-1,AWS/ELB,RequestCount,LoadBalancerName)` | ELB | +| `dimension_\__values(us-east-1,AWS/ElastiCache,CPUUtilization,CacheClusterId)` | ElastiCache | +| `dimension_\__values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)` | RedShift | +| `dimension_\__values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)` | RDS | +| `dimension_\__values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)` | S3 | +| `dimension_\__values(us-east-1,CWAgent,disk_\__used_\__percent,device,{"InstanceId":"\$instance_\__id"})` | CloudWatch Agent | +| `resource_\__arns(eu-west-1,elasticloadbalancing:loadbalancer,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | ELB | +| `resource_\__arns(eu-west-1,ec2:instance,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | EC2 | ## ec2_instance_attribute examples @@ -381,7 +381,7 @@ It's now possible to configure data sources using config files with Grafana's pr Here are some provisioning examples for this data source. -### Using AWS SDK Default +### Using AWS SDK (default) ```yaml apiVersion: 1 @@ -393,7 +393,7 @@ datasources: defaultRegion: eu-west-2 ``` -### Using credentials profile name (non-default) +### Using credentials' profile name (non-default) ```yaml apiVersion: 1 diff --git a/docs/sources/datasources/elasticsearch.md b/docs/sources/datasources/elasticsearch.md index f54c46cf198..4367b114166 100644 --- a/docs/sources/datasources/elasticsearch.md +++ b/docs/sources/datasources/elasticsearch.md @@ -26,10 +26,10 @@ visualize logs or metrics stored in Elasticsearch. You can also annotate your gr | Name | Description | | --------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| *Name* | The data source name. This is how you refer to the data source in panels and queries. | -| *Default* | Default data source means that it will be pre-selected for new panels. | -| *Url* | The HTTP protocol, IP, and port of your Elasticsearch server. | -| *Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | +| `Name` | The data source name. This is how you refer to the data source in panels and queries. | +| `Default` | Default data source means that it will be pre-selected for new panels. | +| `Url` | The HTTP protocol, IP, and port of your Elasticsearch server. | +| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated. @@ -113,9 +113,9 @@ You can control the name for time series via the `Alias` input field. | Pattern | Description | | -------------------- | ------------------------------------------------- | -| *{{term fieldname}}* | replaced with value of a term group by | -| *{{metric}}* | replaced with metric name (ex. Average, Min, Max) | -| *{{field}}* | replaced with the metric field name | +| `{{term fieldname}}` | replaced with value of a term group by | +| `{{metric}}` | replaced with metric name (ex. Average, Min, Max) | +| `{{field}}` | replaced with the metric field name | ## Pipeline metrics @@ -138,9 +138,9 @@ The Elasticsearch data source supports two types of queries you can use in the * | Query | Description | | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| *{"find": "fields", "type": "keyword"}* | Returns a list of field names with the index type `keyword`. | -| *{"find": "terms", "field": "@hostname", "size": 1000}* | Returns a list of values for a field using term aggregation. Query will use current dashboard time range as time range for query. | -| *{"find": "terms", "field": "@hostname", "query": ''}* | Returns a list of values for a field using term aggregation and a specified lucene query filter. Query will use current dashboard time range as time range for query. | +| `{"find": "fields", "type": "keyword"}` | Returns a list of field names with the index type `keyword`. | +| `{"find": "terms", "field": "@hostname", "size": 1000}` | Returns a list of values for a field using term aggregation. Query will use current dashboard time range as time range for query. | +| `{"find": "terms", "field": "@hostname", "query": ''}` | Returns a list of values for a field using term aggregation and a specified lucene query filter. Query will use current dashboard time range as time range for query. | There is a default size limit of 500 on terms queries. Set the size property in your query to set a custom limit. You can use other variables inside the query. Example query definition for a variable named `$host`. @@ -185,13 +185,13 @@ Example dashboard: queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index for annotation events. -| Name | Description | -| -------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| Query | You can leave the search query blank or specify a lucene query. | -| Time | The name of the time field, needs to be date field. | -| Time End | Optional name of the time end field needs to be date field. If set, then annotations will be marked as a region between time and time-end. | -| Text | Event description field. | -| Tags | Optional field name to use for event tags (can be an array or a CSV string). | +| Name | Description | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `Query` | You can leave the search query blank or specify a lucene query. | +| `Time` | The name of the time field, needs to be date field. | +| `Time End` | Optional name of the time end field needs to be date field. If set, then annotations will be marked as a region between time and time-end. | +| `Text` | Event description field. | +| `Tags` | Optional field name to use for event tags (can be an array or a CSV string). | ## Querying Logs (BETA) diff --git a/docs/sources/datasources/graphite.md b/docs/sources/datasources/graphite.md index 6113aea9259..9a74c278c27 100644 --- a/docs/sources/datasources/graphite.md +++ b/docs/sources/datasources/graphite.md @@ -23,22 +23,22 @@ Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instruct To access Graphite settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Graphite data source. -Name | Description ------------- | ------------- -Name | The data source name. This is how you refer to the data source in panels and queries. -Default | Default data source means that it will be pre-selected for new panels. -URL | The HTTP protocol, IP, and port of your graphite-web or graphite-api install. -Access | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. -Auth | Refer to [Authentication]({{< relref "../auth/_index.md" >}}) for more information. -Basic Auth | Enable basic authentication to the data source. -User | User name for basic authentication. -Password | Password for basic authentication. -Custom HTTP Headers | Click **Add header** to add a custom HTTP header. -Header | Enter the custom header name. -Value | Enter the custom header value. -Graphite details | -Version | Select your version of Graphite. -Type | Select your type of Graphite. +Name | Description +--------------------- | ------------- +`Name` | The data source name. This is how you refer to the data source in panels and queries. +`Default` | Default data source means that it will be pre-selected for new panels. +`URL` | The HTTP protocol, IP, and port of your graphite-web or graphite-api install. +`Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. +`Auth` | Refer to [Authentication]({{< relref "../auth/_index.md" >}}) for more information. +`Basic Auth` | Enable basic authentication to the data source. +`User` | User name for basic authentication. +`Password` | Password for basic authentication. +`Custom HTTP Headers` | Click **Add header** to add a custom HTTP header. +`Header` | Enter the custom header name. +`Value` | Enter the custom header value. +`Graphite details` | +`Version` | Select your version of Graphite. +`Type` | Select your type of Graphite. Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else is stated. @@ -129,13 +129,13 @@ For more information, refer to [Variables and templates]({{< relref "../variable Graphite 1.1 introduced tags and Grafana added support for Graphite queries with tags in version 5.0. To create a variable using tag values, use the Grafana functions `tags` and `tag_values`. -Query | Description ------------- | ------------- -tags() | Returns all tags. -tags(server=~backend\*) | Returns only tags that occur in series matching the filter expression. -tag_values(server) | Return tag values for the specified tag. -tag_values(server, server=~backend\*) | Returns filtered tag values that occur for the specified tag in series matching those expressions. -tag_values(server, server=~backend\*, app=~${apps:regex}) | Multiple filter expressions and expressions can contain other variables. +Query | Description +----------------------------------------------------------- | ------------- +`tags()` | Returns all tags. +`tags(server=~backend\*)` | Returns only tags that occur in series matching the filter expression. +`tag_values(server)` | Return tag values for the specified tag. +`tag_values(server, server=~backend\*)` | Returns filtered tag values that occur for the specified tag in series matching those expressions. +`tag_values(server, server=~backend\*, app=~${apps:regex})` | Multiple filter expressions and expressions can contain other variables. For more details, see the [Graphite docs on the autocomplete API for tags](http://graphite.readthedocs.io/en/latest/tags.html#auto-complete-support). diff --git a/docs/sources/datasources/influxdb.md b/docs/sources/datasources/influxdb.md index e66a2b973f3..4e53a76155f 100644 --- a/docs/sources/datasources/influxdb.md +++ b/docs/sources/datasources/influxdb.md @@ -27,16 +27,16 @@ Grafana ships with a feature-rich data source plugin for InfluxDB. The plugin in ### InfluxQL (classic InfluxDB query) -Name | Description ------------- | ------------- -*Name* | The data source name. This is how you refer to the data source in panels and queries. -*Default* | Default data source means that it will be pre-selected for new panels. -*URL* | The HTTP protocol, IP address and port of your InfluxDB API (InfluxDB API port is by default 8086) -*Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. -*Database* | Name of your InfluxDB database -*User* | Name of your database user -*Password* | Database user's password -*HTTP mode* | How to query the database (`GET` or `POST` HTTP verb). The `POST` verb allows heavy queries that would return an error using the `GET` verb. Default is `GET`. +Name | Description +----------- | ------------- +`Name` | The data source name. This is how you refer to the data source in panels and queries. +`Default` | Default data source means that it will be pre-selected for new panels. +`URL` | The HTTP protocol, IP address and port of your InfluxDB API (InfluxDB API port is by default 8086) +`Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. +`Database` | Name of your InfluxDB database +`User` | Name of your database user +`Password` | Database user's password +`HTTP mode` | How to query the database (`GET` or `POST` HTTP verb). The `POST` verb allows heavy queries that would return an error using the `GET` verb. Default is `GET`. Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated. @@ -53,16 +53,16 @@ A lower limit for the auto group by time interval. Recommended to be set to writ This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported: -Identifier | Description +Identifier | Description ------------ | ------------- -`y` | year -`M` | month -`w` | week -`d` | day -`h` | hour -`m` | minute -`s` | second -`ms` | millisecond +`y` | year +`M` | month +`w` | week +`d` | day +`h` | hour +`m` | minute +`s` | second +`ms` | millisecond ## Query Editor @@ -128,12 +128,12 @@ change the option `Format As` to `Table` if you want to show raw data in the `Ta The client supports Flux running on InfluxDB 1.8+. See [1.8 compatibility](https://github.com/influxdata/influxdb-client-go/#influxdb-18-api-compatibility) for more information and connection details. -Name | Description ------------- | ------------- -*URL* | The HTTP protocol, IP address and port of your InfluxDB API (InfluxDB 2.0 API port is by default 9999) -*Organization* | The [Influx organization](https://v2.docs.influxdata.com/v2.0/organizations/) that will be used for Flux queries. This is also used to for the `v.organization` query macro -*Token* | The authentication token used for Flux queries. With Influx 2.0, use the [influx authentication token to function](https://v2.docs.influxdata.com/v2.0/security/tokens/create-token/). For influx 1.8, the token is `username:password` -*Default Bucket* | The [Influx bucket](https://v2.docs.influxdata.com/v2.0/organizations/buckets/) that will be used for the `v.defaultBucket` macro in Flux queries +Name | Description +---------------- | ------------- +`URL` | The HTTP protocol, IP address and port of your InfluxDB API (InfluxDB 2.0 API port is by default 9999) +`Organization` | The [Influx organization](https://v2.docs.influxdata.com/v2.0/organizations/) that will be used for Flux queries. This is also used to for the `v.organization` query macro +`Token` | The authentication token used for Flux queries. With Influx 2.0, use the [influx authentication token to function](https://v2.docs.influxdata.com/v2.0/security/tokens/create-token/). For influx 1.8, the token is `username:password` +`Default Bucket` | The [Influx bucket](https://v2.docs.influxdata.com/v2.0/organizations/buckets/) that will be used for the `v.defaultBucket` macro in Flux queries You can use the [Flux query and scripting language](https://www.influxdata.com/products/flux/). Grafana's Flux query editor is a text editor for raw Flux queries with Macro support. @@ -142,13 +142,13 @@ You can use the [Flux query and scripting language](https://www.influxdata.com/p The macros support copying and pasting from [Chronograph](https://www.influxdata.com/time-series-platform/chronograf/). -Macro example | Description ------------- | ------------- -*`v.timeRangeStart`* | Will be replaced by the start of the currently active time selection. For example, *2020-06-11T13:31:00Z* -*`v.timeRangeEnd`* | Will be replaced by the end of the currently active time selection. For example, *2020-06-11T14:31:00Z* -*`v.windowPeriod`* | Will be replaced with an interval string compatible with Flux that corresponds to Grafana's calculated interval based on the time range of the active time selection. For example, *5s* -*`v.defaultBucket`* | Will be replaced with the data source configuration's "Default Bucket" setting -*`v.organization`* | Will be replaced with the data source configuration's "Organization" setting +Macro example | Description +------------ | ------------- +`v.timeRangeStart` | Will be replaced by the start of the currently active time selection. For example, *2020-06-11T13:31:00Z* +`v.timeRangeEnd` | Will be replaced by the end of the currently active time selection. For example, *2020-06-11T14:31:00Z* +`v.windowPeriod` | Will be replaced with an interval string compatible with Flux that corresponds to Grafana's calculated interval based on the time range of the active time selection. For example, *5s* +`v.defaultBucket` | Will be replaced with the data source configuration's "Default Bucket" setting +`v.organization` | Will be replaced with the data source configuration's "Organization" setting For example, the following query will be interpolated as the query that follows it, with interval and time period values changing according to active time selection\): diff --git a/docs/sources/datasources/jaeger.md b/docs/sources/datasources/jaeger.md index 9b04de9a67b..7fb158924c0 100644 --- a/docs/sources/datasources/jaeger.md +++ b/docs/sources/datasources/jaeger.md @@ -18,15 +18,15 @@ Just add it as a data source and you are ready to query your traces in [Explore] ## Adding the data source To access Jaeger settings, click the **Configuration** (gear) icon, then click **Data Sources**, and then click **Jaeger**. -| Name | Description | -| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| _Name_ | The data source name. This is how you refer to the data source in panels, queries, and Explore. | -| _Default_ | Default data source means that it will be pre-selected for new panels. | -| _URL_ | The URL of the Jaeger instance, e.g., `http://localhost:16686` | -| _Access_ | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | -| _Basic Auth_ | Enable basic authentication to the Jaeger data source. | -| _User_ | User name for basic authentication. | -| _Password_ | Password for basic authentication. | +| Name | Description | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `Name` | The data source name. This is how you refer to the data source in panels, queries, and Explore. | +| `Default` | Default data source means that it will be pre-selected for new panels. | +| `URL` | The URL of the Jaeger instance, e.g., `http://localhost:16686` | +| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | +| `Basic Auth` | Enable basic authentication to the Jaeger data source. | +| `User` | User name for basic authentication. | +| `Password` | Password for basic authentication. | ## Query traces diff --git a/docs/sources/datasources/loki.md b/docs/sources/datasources/loki.md index 0219502e8a6..ad97af98be5 100644 --- a/docs/sources/datasources/loki.md +++ b/docs/sources/datasources/loki.md @@ -31,10 +31,10 @@ Just add it as a data source and you are ready to query your log data in [Explor | Name | Description | | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| _Name_ | The data source name. This is how you refer to the data source in panels, queries, and Explore. | -| _Default_ | Default data source means that it will be pre-selected for new panels. | -| _URL_ | The URL of the Loki instance, e.g., `http://localhost:3100` | -| _Maximum lines_ | Upper limit for number of log lines returned by Loki (default is 1000). Decrease if your browser is sluggish when displaying logs in Explore. | +| `Name` | The data source name. This is how you refer to the data source in panels, queries, and Explore. | +| `Default` | Default data source means that it will be pre-selected for new panels. | +| `URL` | The URL of the Loki instance, e.g., `http://localhost:3100` | +| `Maximum lines` | Upper limit for number of log lines returned by Loki (default is 1000). Decrease if your browser is sluggish when displaying logs in Explore. | ### Derived fields diff --git a/docs/sources/datasources/mssql.md b/docs/sources/datasources/mssql.md index 0816b1141d1..e81773ad736 100644 --- a/docs/sources/datasources/mssql.md +++ b/docs/sources/datasources/mssql.md @@ -25,18 +25,18 @@ Grafana ships with a built-in Microsoft SQL Server (MSSQL) data source plugin th ### Data source options -Name | Description ------------- | ------------- -*Name* | The data source name. This is how you refer to the data source in panels and queries. -*Default* | Default data source means that it will be pre-selected for new panels. -*Host* | The IP address/hostname and optional port of your MSSQL instance. If port is omitted, default 1433 will be used. -*Database* | Name of your MSSQL database. -*User* | Database user's login/username -*Password* | Database user's password -*Encrypt* | This option determines whether or to which extent a secure SSL TCP/IP connection will be negotiated with the server, default `false` (Grafana v5.4+). -*Max open* | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). -*Max idle* | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). -*Max lifetime* | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). +Name | Description +------------ | ------------- +`Name` | The data source name. This is how you refer to the data source in panels and queries. +`Default` | Default data source means that it will be pre-selected for new panels. +`Host` | The IP address/hostname and optional port of your MSSQL instance. If port is omitted, default 1433 will be used. +`Database` | Name of your MSSQL database. +`User` | Database user's login/username +`Password` | Database user's password +`Encrypt` | This option determines whether or to which extent a secure SSL TCP/IP connection will be negotiated with the server, default `false` (Grafana v5.4+). +`Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). +`Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). +`Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). ### Min time interval @@ -45,16 +45,16 @@ Recommended to be set to write frequency, for example `1m` if your data is writt This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported: -Identifier | Description +Identifier | Description ------------ | ------------- -`y` | year -`M` | month -`w` | week -`d` | day -`h` | hour -`m` | minute -`s` | second -`ms` | millisecond +`y` | year +`M` | month +`w` | week +`d` | day +`h` | hour +`m` | minute +`s` | second +`ms` | millisecond ### Database User Permissions (Important!) @@ -96,26 +96,26 @@ panel title, then edit. The editor allows you to define a SQL query to select da To simplify syntax and to allow for dynamic parts, like date range filters, the query can contain macros. -Macro example | Description ------------- | ------------- -*`$__time(dateColumn)`* | Will be replaced by an expression to rename the column to *time*. For example, *dateColumn as time* -*`$__timeEpoch(dateColumn)`* | Will be replaced by an expression to convert a DATETIME column type to Unix timestamp and rename it to *time*.
For example, *DATEDIFF(second, '1970-01-01', dateColumn) AS time* -*`$__timeFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name.
For example, *dateColumn BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:06:17Z'* -*`$__timeFrom()`* | Will be replaced by the start of the currently active time selection. For example, *'2017-04-21T05:01:17Z'* -*`$__timeTo()`* | Will be replaced by the end of the currently active time selection. For example, *'2017-04-21T05:06:17Z'* -*`$__timeGroup(dateColumn,'5m'[, fillvalue])`* | Will be replaced by an expression usable in GROUP BY clause. Providing a *fillValue* of *NULL* or *floating value* will automatically fill empty series in timerange with that value.
For example, *CAST(ROUND(DATEDIFF(second, '1970-01-01', time_column)/300.0, 0) as bigint)\*300*. -*`$__timeGroup(dateColumn,'5m', 0)`* | Same as above but with a fill parameter so missing points in that series will be added by grafana and 0 will be used as value. -*`$__timeGroup(dateColumn,'5m', NULL)`* | Same as above but NULL will be used as value for missing points. -*`$__timeGroup(dateColumn,'5m', previous)`* | Same as above but the previous value in that series will be used as fill value if no value has been seen yet NULL will be used (only available in Grafana 5.3+). -*`$__timeGroupAlias(dateColumn,'5m')`* | Will be replaced identical to $__timeGroup but with an added column alias (only available in Grafana 5.3+). -*`$__unixEpochFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name with times represented as Unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183* -*`$__unixEpochFrom()`* | Will be replaced by the start of the currently active time selection as Unix timestamp. For example, *1494410783* -*`$__unixEpochTo()`* | Will be replaced by the end of the currently active time selection as Unix timestamp. For example, *1494497183* -*`$__unixEpochNanoFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name with times represented as nanosecond timestamp. For example, *dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872* -*`$__unixEpochNanoFrom()`* | Will be replaced by the start of the currently active time selection as nanosecond timestamp. For example, *1494410783152415214* -*`$__unixEpochNanoTo()`* | Will be replaced by the end of the currently active time selection as nanosecond timestamp. For example, *1494497183142514872* -*`$__unixEpochGroup(dateColumn,'5m', [fillmode])`* | Same as $__timeGroup but for times stored as Unix timestamp (only available in Grafana 5.3+). -*`$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])`* | Same as above but also adds a column alias (only available in Grafana 5.3+). +Macro example | Description +------------------------------------------------------- | ------------- +`$__time(dateColumn)` | Will be replaced by an expression to rename the column to *time*. For example, *dateColumn as time* +`$__timeEpoch(dateColumn)` | Will be replaced by an expression to convert a DATETIME column type to Unix timestamp and rename it to *time*.
For example, *DATEDIFF(second, '1970-01-01', dateColumn) AS time* +`$__timeFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name.
For example, *dateColumn BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:06:17Z'* +`$__timeFrom()` | Will be replaced by the start of the currently active time selection. For example, *'2017-04-21T05:01:17Z'* +`$__timeTo()` | Will be replaced by the end of the currently active time selection. For example, *'2017-04-21T05:06:17Z'* +`$__timeGroup(dateColumn,'5m'[, fillvalue])` | Will be replaced by an expression usable in GROUP BY clause. Providing a *fillValue* of *NULL* or *floating value* will automatically fill empty series in timerange with that value.
For example, *CAST(ROUND(DATEDIFF(second, '1970-01-01', time_column)/300.0, 0) as bigint)\*300*. +`$__timeGroup(dateColumn,'5m', 0)` | Same as above but with a fill parameter so missing points in that series will be added by grafana and 0 will be used as value. +`$__timeGroup(dateColumn,'5m', NULL)` | Same as above but NULL will be used as value for missing points. +`$__timeGroup(dateColumn,'5m', previous)` | Same as above but the previous value in that series will be used as fill value if no value has been seen yet NULL will be used (only available in Grafana 5.3+). +`$__timeGroupAlias(dateColumn,'5m')` | Will be replaced identical to $__timeGroup but with an added column alias (only available in Grafana 5.3+). +`$__unixEpochFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name with times represented as Unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183* +`$__unixEpochFrom()` | Will be replaced by the start of the currently active time selection as Unix timestamp. For example, *1494410783* +`$__unixEpochTo()` | Will be replaced by the end of the currently active time selection as Unix timestamp. For example, *1494497183* +`$__unixEpochNanoFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name with times represented as nanosecond timestamp. For example, *dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872* +`$__unixEpochNanoFrom()` | Will be replaced by the start of the currently active time selection as nanosecond timestamp. For example, *1494410783152415214* +`$__unixEpochNanoTo()` | Will be replaced by the end of the currently active time selection as nanosecond timestamp. For example, *1494497183142514872* +`$__unixEpochGroup(dateColumn,'5m', [fillmode])` | Same as $__timeGroup but for times stored as Unix timestamp (only available in Grafana 5.3+). +`$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])` | Same as above but also adds a column alias (only available in Grafana 5.3+). We plan to add many more macros. If you have suggestions for what macros you would like to see, please [open an issue](https://github.com/grafana/grafana) in our GitHub repo. @@ -379,12 +379,12 @@ Read more about variable formatting options in the [Variables]({{< relref "../va **Columns:** -Name | Description ------------- | ------------- -time | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value. -timeend | Optional name of the end date/time field. Could be a column with a native SQL date/time data type or epoch value. (Grafana v6.6+) -text | Event description field. -tags | Optional field name to use for event tags as a comma separated string. +Name | Description +----------- | ------------- +`time` | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value. +`timeend` | Optional name of the end date/time field. Could be a column with a native SQL date/time data type or epoch value. (Grafana v6.6+) +`text` | Event description field. +`tags` | Optional field name to use for event tags as a comma separated string. **Example database tables:** diff --git a/docs/sources/datasources/mysql.md b/docs/sources/datasources/mysql.md index d8f426ac929..81327210ddb 100644 --- a/docs/sources/datasources/mysql.md +++ b/docs/sources/datasources/mysql.md @@ -25,17 +25,17 @@ Grafana ships with a built-in MySQL data source plugin that allows you to query ### Data source options -Name | Description ------------- | ------------- -*Name* | The data source name. This is how you refer to the data source in panels and queries. -*Default* | Default data source means that it will be pre-selected for new panels. -*Host* | The IP address/hostname and optional port of your MySQL instance. -*Database* | Name of your MySQL database. -*User* | Database user's login/username -*Password* | Database user's password -*Max open* | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). -*Max idle* | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). -*Max lifetime* | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours. This should always be lower than configured [wait_timeout](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout) in MySQL (Grafana v5.4+). +Name | Description +-------------- | ------------- +`Name` | The data source name. This is how you refer to the data source in panels and queries. +`Default` | Default data source means that it will be pre-selected for new panels. +`Host` | The IP address/hostname and optional port of your MySQL instance. +`Database` | Name of your MySQL database. +`User` | Database user's login/username +`Password` | Database user's password +`Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). +`Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). +`Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours. This should always be lower than configured [wait_timeout](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout) in MySQL (Grafana v5.4+). ### Min time interval @@ -44,16 +44,16 @@ Recommended to be set to write frequency, for example `1m` if your data is writt This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported: -Identifier | Description ------------- | ------------- -`y` | year -`M` | month -`w` | week -`d` | day -`h` | hour -`m` | minute -`s` | second -`ms` | millisecond +| Identifier | Description | +| ---------- | ----------- | +| `y` | year | +| `M` | month | +| `w` | week | +| `d` | day | +| `h` | hour | +| `m` | minute | +| `s` | second | +| `ms` | millisecond | ### Database User Permissions (Important!) @@ -127,26 +127,26 @@ You can switch to the raw query editor mode by clicking the hamburger icon and s To simplify syntax and to allow for dynamic parts, like date range filters, the query can contain macros. -Macro example | Description ------------- | ------------- -*`$__time(dateColumn)`* | Will be replaced by an expression to convert to a UNIX timestamp and rename the column to `time_sec`. For example, *UNIX_TIMESTAMP(dateColumn) as time_sec* -*`$__timeEpoch(dateColumn)`* | Will be replaced by an expression to convert to a UNIX timestamp and rename the column to `time_sec`. For example, *UNIX_TIMESTAMP(dateColumn) as time_sec* -*`$__timeFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name. For example, *dateColumn BETWEEN FROM_UNIXTIME(1494410783) AND FROM_UNIXTIME(1494410983)* -*`$__timeFrom()`* | Will be replaced by the start of the currently active time selection. For example, *FROM_UNIXTIME(1494410783)* -*`$__timeTo()`* | Will be replaced by the end of the currently active time selection. For example, *FROM_UNIXTIME(1494410983)* -*`$__timeGroup(dateColumn,'5m')`* | Will be replaced by an expression usable in GROUP BY clause. For example, *cast(cast(UNIX_TIMESTAMP(dateColumn)/(300) as signed)*300 as signed),* -*`$__timeGroup(dateColumn,'5m', 0)`* | Same as above but with a fill parameter so missing points in that series will be added by grafana and 0 will be used as value. -*`$__timeGroup(dateColumn,'5m', NULL)`* | Same as above but NULL will be used as value for missing points. -*`$__timeGroup(dateColumn,'5m', previous)`* | Same as above but the previous value in that series will be used as fill value if no value has been seen yet NULL will be used (only available in Grafana 5.3+). -*`$__timeGroupAlias(dateColumn,'5m')`* | Will be replaced identical to $__timeGroup but with an added column alias (only available in Grafana 5.3+). -*`$__unixEpochFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name with times represented as Unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183* -*`$__unixEpochFrom()`* | Will be replaced by the start of the currently active time selection as Unix timestamp. For example, *1494410783* -*`$__unixEpochTo()`* | Will be replaced by the end of the currently active time selection as Unix timestamp. For example, *1494497183* -*`$__unixEpochNanoFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name with times represented as nanosecond timestamp. For example, *dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872* -*`$__unixEpochNanoFrom()`* | Will be replaced by the start of the currently active time selection as nanosecond timestamp. For example, *1494410783152415214* -*`$__unixEpochNanoTo()`* | Will be replaced by the end of the currently active time selection as nanosecond timestamp. For example, *1494497183142514872* -*`$__unixEpochGroup(dateColumn,'5m', [fillmode])`* | Same as $__timeGroup but for times stored as Unix timestamp (only available in Grafana 5.3+). -*`$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])`* | Same as above but also adds a column alias (only available in Grafana 5.3+). +Macro example | Description +------------------------------------------------------ | ------------- +`$__time(dateColumn)` | Will be replaced by an expression to convert to a UNIX timestamp and rename the column to `time_sec`. For example, *UNIX_TIMESTAMP(dateColumn) as time_sec* +`$__timeEpoch(dateColumn)` | Will be replaced by an expression to convert to a UNIX timestamp and rename the column to `time_sec`. For example, *UNIX_TIMESTAMP(dateColumn) as time_sec* +`$__timeFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name. For example, *dateColumn BETWEEN FROM_UNIXTIME(1494410783) AND FROM_UNIXTIME(1494410983)* +`$__timeFrom()` | Will be replaced by the start of the currently active time selection. For example, *FROM_UNIXTIME(1494410783)* +`$__timeTo()` | Will be replaced by the end of the currently active time selection. For example, *FROM_UNIXTIME(1494410983)* +`$__timeGroup(dateColumn,'5m')` | Will be replaced by an expression usable in GROUP BY clause. For example, *cast(cast(UNIX_TIMESTAMP(dateColumn)/(300) as signed)*300 as signed),* +`$__timeGroup(dateColumn,'5m', 0)` | Same as above but with a fill parameter so missing points in that series will be added by grafana and 0 will be used as value. +`$__timeGroup(dateColumn,'5m', NULL)` | Same as above but NULL will be used as value for missing points. +`$__timeGroup(dateColumn,'5m', previous)` | Same as above but the previous value in that series will be used as fill value if no value has been seen yet NULL will be used (only available in Grafana 5.3+). +`$__timeGroupAlias(dateColumn,'5m')` | Will be replaced identical to $__timeGroup but with an added column alias (only available in Grafana 5.3+). +`$__unixEpochFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name with times represented as Unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183* +`$__unixEpochFrom()` | Will be replaced by the start of the currently active time selection as Unix timestamp. For example, *1494410783* +`$__unixEpochTo()` | Will be replaced by the end of the currently active time selection as Unix timestamp. For example, *1494497183* +`$__unixEpochNanoFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name with times represented as nanosecond timestamp. For example, *dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872* +`$__unixEpochNanoFrom()` | Will be replaced by the start of the currently active time selection as nanosecond timestamp. For example, *1494410783152415214* +`$__unixEpochNanoTo()` | Will be replaced by the end of the currently active time selection as nanosecond timestamp. For example, *1494497183142514872* +`$__unixEpochGroup(dateColumn,'5m', [fillmode])` | Same as $__timeGroup but for times stored as Unix timestamp (only available in Grafana 5.3+). +`$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])` | Same as above but also adds a column alias (only available in Grafana 5.3+). We plan to add many more macros. If you have suggestions for what macros you would like to see, please [open an issue](https://github.com/grafana/grafana) in our GitHub repo. @@ -377,12 +377,12 @@ WHERE $__timeFilter(native_date_time) ``` -Name | Description ------------- | ------------- -time | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value. -timeend | Optional name of the end date/time field. Could be a column with a native SQL date/time data type or epoch value. (Grafana v6.6+) -text | Event description field. -tags | Optional field name to use for event tags as a comma separated string. +Name | Description +----------- | ------------- +`time` | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value. +`timeend` | Optional name of the end date/time field. Could be a column with a native SQL date/time data type or epoch value. (Grafana v6.6+) +`text` | Event description field. +`tags` | Optional field name to use for event tags as a comma separated string. ## Alerting diff --git a/docs/sources/datasources/opentsdb.md b/docs/sources/datasources/opentsdb.md index 944a04910d5..e9994f312fe 100644 --- a/docs/sources/datasources/opentsdb.md +++ b/docs/sources/datasources/opentsdb.md @@ -25,12 +25,12 @@ Grafana ships with advanced support for OpenTSDB. | Name | Description | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- | -| *Name* | The data source name. This is how you refer to the data source in panels and queries. | -| *Default* | Default data source means that it will be pre-selected for new panels. | -| *Url* | The HTTP protocol, ip and port of you opentsdb server (default port is usually 4242) | -| *Access* | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | -| *Version* | Version = opentsdb version, either <=2.1 or 2.2 | -| *Resolution* | Metrics from opentsdb may have datapoints with either second or millisecond resolution. | +| `Name` | The data source name. This is how you refer to the data source in panels and queries. | +| `Default` | Default data source means that it will be pre-selected for new panels. | +| `Url` | The HTTP protocol, ip and port of you opentsdb server (default port is usually 4242) | +| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | +| `Version` | Version = opentsdb version, either <=2.1 or 2.2 | +| `Resolution` | Metrics from opentsdb may have datapoints with either second or millisecond resolution. | ## Query editor @@ -65,11 +65,11 @@ When using OpenTSDB with a template variable of `query` type you can use followi | Query | Description | | --------------------------- | --------------------------------------------------------------------------------- | -| *metrics(prefix)* | Returns metric names with specific prefix (can be empty) | -| *tag_names(cpu)* | Returns tag names (i.e. keys) for a specific cpu metric | -| *tag_values(cpu, hostname)* | Returns tag values for metric cpu and tag key hostname | -| *suggest_tagk(prefix)* | Returns tag names (i.e. keys) for all metrics with specific prefix (can be empty) | -| *suggest_tagv(prefix)* | Returns tag values for all metrics with specific prefix (can be empty) | +| `metrics(prefix)` | Returns metric names with specific prefix (can be empty) | +| `tag_names(cpu)` | Returns tag names (i.e. keys) for a specific cpu metric | +| `tag_values(cpu, hostname)` | Returns tag values for metric cpu and tag key hostname | +| `suggest_tagk(prefix)` | Returns tag names (i.e. keys) for all metrics with specific prefix (can be empty) | +| `suggest_tagv(prefix)` | Returns tag values for all metrics with specific prefix (can be empty) | If you do not see template variables being populated in `Preview of values` section, you need to enable `tsd.core.meta.enable_realtime_ts` in the OpenTSDB server settings. Also, to populate metadata of @@ -83,8 +83,8 @@ Some examples are mentioned below to make nested template queries work successfu | Query | Description | | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| *tag_values(cpu, hostname, env=$env)* | Return tag values for cpu metric, selected env tag value and tag key hostname | -| *tag_values(cpu, hostname, env=$env, region=$region)* | Return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname | +| `tag_values(cpu, hostname, env=$env)` | Return tag values for cpu metric, selected env tag value and tag key hostname | +| `tag_values(cpu, hostname, env=$env, region=$region)` | Return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname | For details on OpenTSDB metric queries, check out the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html) diff --git a/docs/sources/datasources/postgres.md b/docs/sources/datasources/postgres.md index 63ef8646ea7..b7d9af94fa1 100644 --- a/docs/sources/datasources/postgres.md +++ b/docs/sources/datasources/postgres.md @@ -23,20 +23,20 @@ Grafana ships with a built-in PostgreSQL data source plugin that allows you to q ### Data source options -Name | Description ------------- | ------------- -*Name* | The data source name. This is how you refer to the data source in panels and queries. -*Default* | Default data source means that it will be pre-selected for new panels. -*Host* | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and will cause errors. -*Database* | Name of your PostgreSQL database. -*User* | Database user's login/username -*Password* | Database user's password -*SSL Mode* | This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. -*Max open* | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). -*Max idle* | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). -*Max lifetime* | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). -*Version* | This option determines which functions are available in the query builder (only available in Grafana 5.3+). -*TimescaleDB* | TimescaleDB is a time-series database built as a PostgreSQL extension. If enabled, Grafana will use `time_bucket` in the `$__timeGroup` macro and display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). +Name | Description +-------------- | ------------- +`Name` | The data source name. This is how you refer to the data source in panels and queries. +`Default` | Default data source means that it will be pre-selected for new panels. +`Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and will cause errors. +`Database` | Name of your PostgreSQL database. +`User` | Database user's login/username +`Password` | Database user's password +`SSL Mode` | This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. +`Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). +`Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). +`Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). +`Version` | This option determines which functions are available in the query builder (only available in Grafana 5.3+). +`TimescaleDB` | TimescaleDB is a time-series database built as a PostgreSQL extension. If enabled, Grafana will use `time_bucket` in the `$__timeGroup` macro and display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). ### Min time interval @@ -45,16 +45,16 @@ Recommended to be set to write frequency, for example `1m` if your data is writt This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported: -Identifier | Description ------------- | ------------- -`y` | year -`M` | month -`w` | week -`d` | day -`h` | hour -`m` | minute -`s` | second -`ms` | millisecond +| Identifier | Description | +| ---------- | ----------- | +| `y` | year | +| `M` | month | +| `w` | week | +| `d` | day | +| `h` | hour | +| `m` | minute | +| `s` | second | +| `ms` | millisecond | ### Database user permissions (Important!) @@ -138,26 +138,26 @@ You can switch to the raw query editor mode by clicking the hamburger icon and s Macros can be used within a query to simplify syntax and allow for dynamic parts. -Macro example | Description ------------- | ------------- -*`$__time(dateColumn)`* | Will be replaced by an expression to rename the column to `time`. For example, *dateColumn as time* -*`$__timeSec(dateColumn)`* | Will be replaced by an expression to rename the column to `time` and converting the value to Unix timestamp. For example, *extract(epoch from dateColumn) as time* -*`$__timeFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name. For example, *dateColumn BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:06:17Z'* -*`$__timeFrom()`* | Will be replaced by the start of the currently active time selection. For example, *'2017-04-21T05:01:17Z'* -*`$__timeTo()`* | Will be replaced by the end of the currently active time selection. For example, *'2017-04-21T05:06:17Z'* -*`$__timeGroup(dateColumn,'5m')`* | Will be replaced by an expression usable in a GROUP BY clause. For example, *(extract(epoch from dateColumn)/300)::bigint\*300* -*`$__timeGroup(dateColumn,'5m', 0)`* | Same as above but with a fill parameter so missing points in that series will be added by Grafana and 0 will be used as the value. -*`$__timeGroup(dateColumn,'5m', NULL)`* | Same as above but NULL will be used as value for missing points. -*`$__timeGroup(dateColumn,'5m', previous)`* | Same as above but the previous value in that series will be used as fill value. If no value has been seen yet, NULL will be used (only available in Grafana 5.3+). -*`$__timeGroupAlias(dateColumn,'5m')`* | Will be replaced with an expression identical to $__timeGroup, but with an added column alias (only available in Grafana 5.3+). -*`$__unixEpochFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name with times represented as Unix timestamps. For example, *dateColumn >= 1494410783 AND dateColumn <= 1494497183* -*`$__unixEpochFrom()`* | Will be replaced by the start of the currently active time selection as Unix timestamp. For example, *1494410783* -*`$__unixEpochTo()`* | Will be replaced by the end of the currently active time selection as Unix timestamp. For example, *1494497183* -*`$__unixEpochNanoFilter(dateColumn)`* | Will be replaced by a time range filter using the specified column name with times represented as nanosecond timestamps. For example, *dateColumn >= 1494410783152415214 AND dateColumn <= 1494497183142514872* -*`$__unixEpochNanoFrom()`* | Will be replaced by the start of the currently active time selection as nanosecond timestamp. For example, *1494410783152415214* -*`$__unixEpochNanoTo()`* | Will be replaced by the end of the currently active time selection as Unix timestamp. For example, *1494497183142514872* -*`$__unixEpochGroup(dateColumn,'5m', [fillmode])`* | Same as $__timeGroup, but for times stored as Unix timestamp (only available in Grafana 5.3+). -*`$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])`* | Same as above, but also adds a column alias (only available in Grafana 5.3+). +Macro example | Description +------------------------------------------------------ | ------------- +`$__time(dateColumn)` | Will be replaced by an expression to convert to a UNIX timestamp and rename the column to `time_sec`. For example, *UNIX_TIMESTAMP(dateColumn) as time_sec* +`$__timeEpoch(dateColumn)` | Will be replaced by an expression to convert to a UNIX timestamp and rename the column to `time_sec`. For example, *UNIX_TIMESTAMP(dateColumn) as time_sec* +`$__timeFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name. For example, *dateColumn BETWEEN FROM_UNIXTIME(1494410783) AND FROM_UNIXTIME(1494410983)* +`$__timeFrom()` | Will be replaced by the start of the currently active time selection. For example, *FROM_UNIXTIME(1494410783)* +`$__timeTo()` | Will be replaced by the end of the currently active time selection. For example, *FROM_UNIXTIME(1494410983)* +`$__timeGroup(dateColumn,'5m')` | Will be replaced by an expression usable in GROUP BY clause. For example, *cast(cast(UNIX_TIMESTAMP(dateColumn)/(300) as signed)*300 as signed),* +`$__timeGroup(dateColumn,'5m', 0)` | Same as above but with a fill parameter so missing points in that series will be added by grafana and 0 will be used as value. +`$__timeGroup(dateColumn,'5m', NULL)` | Same as above but NULL will be used as value for missing points. +`$__timeGroup(dateColumn,'5m', previous)` | Same as above but the previous value in that series will be used as fill value if no value has been seen yet NULL will be used (only available in Grafana 5.3+). +`$__timeGroupAlias(dateColumn,'5m')` | Will be replaced identical to $__timeGroup but with an added column alias (only available in Grafana 5.3+). +`$__unixEpochFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name with times represented as Unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183* +`$__unixEpochFrom()` | Will be replaced by the start of the currently active time selection as Unix timestamp. For example, *1494410783* +`$__unixEpochTo()` | Will be replaced by the end of the currently active time selection as Unix timestamp. For example, *1494497183* +`$__unixEpochNanoFilter(dateColumn)` | Will be replaced by a time range filter using the specified column name with times represented as nanosecond timestamp. For example, *dateColumn > 1494410783152415214 AND dateColumn < 1494497183142514872* +`$__unixEpochNanoFrom()` | Will be replaced by the start of the currently active time selection as nanosecond timestamp. For example, *1494410783152415214* +`$__unixEpochNanoTo()` | Will be replaced by the end of the currently active time selection as nanosecond timestamp. For example, *1494497183142514872* +`$__unixEpochGroup(dateColumn,'5m', [fillmode])` | Same as $__timeGroup but for times stored as Unix timestamp (only available in Grafana 5.3+). +`$__unixEpochGroupAlias(dateColumn,'5m', [fillmode])` | Same as above but also adds a column alias (only available in Grafana 5.3+). We plan to add many more macros. If you have suggestions for what macros you would like to see, please [open an issue](https://github.com/grafana/grafana) in our GitHub repo. @@ -380,12 +380,12 @@ WHERE $__timeFilter(native_date_time) ``` -Name | Description ------------- | ------------- -time | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value. -timeend | Optional name of the time end field, needs to be date/time data type. If set, then annotations are marked as regions between time and time-end. (Grafana v6.6+) -text | Event description field. -tags | Optional field name to use for event tags as a comma separated string. +Name | Description +----------- | ------------- +`time` | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value. +`timeend` | Optional name of the end date/time field. Could be a column with a native SQL date/time data type or epoch value. (Grafana v6.6+) +`text` | Event description field. +`tags` | Optional field name to use for event tags as a comma separated string. ## Alerting diff --git a/docs/sources/datasources/prometheus.md b/docs/sources/datasources/prometheus.md index 2954ab34eb3..611edd13ee6 100644 --- a/docs/sources/datasources/prometheus.md +++ b/docs/sources/datasources/prometheus.md @@ -20,16 +20,16 @@ To access Prometheus settings, hover your mouse over the **Configuration** (gear | Name | Description | | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| _Name_ | The data source name. This is how you refer to the data source in panels and queries. | -| _Default_ | Default data source means that it will be pre-selected for new panels. | -| _Url_ | The URL of your Prometheus server, e.g. `http://prometheus.example.org:9090`. | -| _Access_ | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | -| _Basic Auth_ | Enable basic authentication to the Prometheus data source. | -| _User_ | User name for basic authentication. | -| _Password_ | Password for basic authentication. | -| _Scrape interval_ | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. | -| _Disable metrics lookup_ | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. | -| _Custom Query Parameters_ | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'. | +| `Name` | The data source name. This is how you refer to the data source in panels and queries. | +| `Default` | Default data source means that it will be pre-selected for new panels. | +| `Url` | The URL of your Prometheus server, e.g. `http://prometheus.example.org:9090`. | +| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | +| `Basic Auth` | Enable basic authentication to the Prometheus data source. | +| `User` | User name for basic authentication. | +| `Password` | Password for basic authentication. | +| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. | +| `Disable metrics lookup` | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. | +| `Custom Query Parameters` | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'. | ## Prometheus query editor @@ -44,14 +44,14 @@ Open a graph in edit mode by clicking the title > Edit (or by pressing `e` key w | Name | Description | | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| _Query expression_ | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). | -| _Legend format_ | Controls the name of the time series, using name or pattern. For example `{{hostname}}` is replaced with the label value for the label `hostname`. | -| _Min step_ | An additional lower limit for the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) and for the `$__interval` and `$__rate_interval` variables. The limit is absolute and not modified by the _Resolution_ setting. | -| _Resolution_ | `1/1` sets both the `$__interval` variable and the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) such that each pixel corresponds to one data point. For better performance, lower resolutions can be picked. `1/2` only retrieves a data point for every other pixel, and `1/10` retrieves one data point per 10 pixels. Note that both _Min time interval_ and _Min step_ limit the final value of `$__interval` and `step`. | -| _Metric lookup_ | Search for metric names in this input field. | -| _Format as_ | Switch between `Table`, `Time series`, or `Heatmap`. `Table` will only work in the Table panel. `Heatmap` is suitable for displaying metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. | -| _Instant_ | Perform an "instant" query, to return only the latest value that Prometheus has scraped for the requested time series. Instant queries return results much faster than normal range queries. Use them to look up label sets. | -| _Min time interval_ | This value multiplied by the denominator from the _Resolution_ setting sets a lower limit to both the `$__interval` variable and the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries). Defaults to _Scrape interval_ as set in the data source options. | +| `Query expression` | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). | +| `Legend format` | Controls the name of the time series, using name or pattern. For example `{{hostname}}` is replaced with the label value for the label `hostname`. | +| `Min step` | An additional lower limit for the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) and for the `$__interval` and `$__rate_interval` variables. The limit is absolute and not modified by the _Resolution_ setting. | +| `Resolution` | `1/1` sets both the `$__interval` variable and the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) such that each pixel corresponds to one data point. For better performance, lower resolutions can be picked. `1/2` only retrieves a data point for every other pixel, and `1/10` retrieves one data point per 10 pixels. Note that both _Min time interval_ and _Min step_ limit the final value of `$__interval` and `step`. | +| `Metric lookup` | Search for metric names in this input field. | +| `Format as` | Switch between `Table`, `Time series`, or `Heatmap`. `Table` will only work in the Table panel. `Heatmap` is suitable for displaying metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. | +| `Instant` | Perform an "instant" query, to return only the latest value that Prometheus has scraped for the requested time series. Instant queries return results much faster than normal range queries. Use them to look up label sets. | +| `Min time interval` | This value multiplied by the denominator from the _Resolution_ setting sets a lower limit to both the `$__interval` variable and the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries). Defaults to _Scrape interval_ as set in the data source options. | > **Note:** Grafana modifies the request dates for queries to align them with the dynamically calculated step. This ensures consistent display of metrics data, but it can result in a small gap of data at the right edge of a graph. @@ -70,9 +70,9 @@ To show a horizontal line across the whole graph, add a series override and sele | Name | Description | | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| _Query expression_ | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). | -| _Step_ | [`Step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries). Time units can be used here, for example: 5s, 1m, 3h, 1d, 1y. Default unit if no unit specified is `s` (seconds). | -| _Query type_ | `Range`, `Instant`, or `Both`. When running **Range query**, the result of the query is displayed in graph and table. Instant query returns only the latest value that Prometheus has scraped for the requested time series and it is displayed in the table. When **Both** is selected, both instant query and range query is run. Result of range query is displayed in graph and the result of instant query is displayed in the table. | +| `Query expression` | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). | +| `Step` | [`Step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries). Time units can be used here, for example: 5s, 1m, 3h, 1d, 1y. Default unit if no unit specified is `s` (seconds). | +| `Query type` | `Range`, `Instant`, or `Both`. When running **Range query**, the result of the query is displayed in graph and table. Instant query returns only the latest value that Prometheus has scraped for the requested time series and it is displayed in the table. When **Both** is selected, both instant query and range query is run. Result of range query is displayed in graph and the result of instant query is displayed in the table. | ## Templating @@ -90,11 +90,11 @@ provides the following functions you can use in the `Query` input field. | Name | Description | | -------------------------------- | ----------------------------------------------------------------------- | -| _label_\__names()_ | Returns a list of label names. | -| _label_\__values(label)_ | Returns a list of label values for the `label` in every metric. | -| _label_\__values(metric, label)_ | Returns a list of label values for the `label` in the specified metric. | -| _metrics(metric)_ | Returns a list of metrics matching the specified `metric` regex. | -| _query_\__result(query)_ | Returns a list of Prometheus query result for the `query`. | +| `label`\``names()` | Returns a list of label names. | +| `label`\``values(label)` | Returns a list of label values for the `label` in every metric. | +| `label`\``values(metric, label)` | Returns a list of label values for the `label` in the specified metric. | +| `metrics(metric)` | Returns a list of metrics matching the specified `metric` regex. | +| `query`\``result(query)` | Returns a list of Prometheus query result for the `query`. | For details of what _metric names_, _label names_ and _label values_ are please refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). diff --git a/docs/sources/datasources/zipkin.md b/docs/sources/datasources/zipkin.md index 59beb15a724..1a02e9d25fb 100644 --- a/docs/sources/datasources/zipkin.md +++ b/docs/sources/datasources/zipkin.md @@ -18,15 +18,15 @@ Just add it as a data source and you are ready to query your traces in [Explore] ## Adding the data source To access Zipkin settings, click the **Configuration** (gear) icon, then click **Data Sources**, and then click **Zipkin**. -| Name | Description | -| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| _Name_ | The data source name. This is how you refer to the data source in panels, queries, and Explore. | -| _Default_ | Default data source means that it will be pre-selected for new panels. | -| _URL_ | The URL of the Zipkin instance, e.g., `http://localhost:9411` | -| _Access_ | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | -| _Basic Auth_ | Enable basic authentication to the Zipkin data source. | -| _User_ | User name for basic authentication. | -| _Password_ | Password for basic authentication. | +| Name | Description | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `Name` | The data source name. This is how you refer to the data source in panels, queries, and Explore. | +| `Default` | Default data source means that it will be pre-selected for new panels. | +| `URL` | The URL of the Zipkin instance, e.g., `http://localhost:9411` | +| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | +| `Basic Auth` | Enable basic authentication to the Zipkin data source. | +| `User` | User name for basic authentication. | +| `Password` | Password for basic authentication. | ## Query traces