tsdb: update query and annotation editor help texts for postgres

In addition to closing #11578
This commit is contained in:
Marcus Efraimsson 2018-04-16 23:56:14 +02:00
parent 69d1330ae9
commit 3a5d1f4594
No known key found for this signature in database
GPG Key ID: EBFE0FB04612DD4A
2 changed files with 8 additions and 8 deletions

View File

@ -28,12 +28,12 @@ An annotation is an event that is overlaid on top of graphs. The query can have
Macros:
- $__time(column) -> column as "time"
- $__timeEpoch -> extract(epoch from column) as "time"
- $__timeFilter(column) -> column ≥ to_timestamp(1492750877) AND column ≤ to_timestamp(1492750877)
- $__unixEpochFilter(column) -> column > 1492750877 AND column < 1492750877
- $__timeFilter(column) -> column BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:01:17Z'
- $__unixEpochFilter(column) -> column >= 1492750877 AND column <= 1492750877
Or build your own conditionals using these macros which just return the values:
- $__timeFrom() -> to_timestamp(1492750877)
- $__timeTo() -> to_timestamp(1492750877)
- $__timeFrom() -> '2017-04-21T05:01:17Z'
- $__timeTo() -> '2017-04-21T05:01:17Z'
- $__unixEpochFrom() -> 1492750877
- $__unixEpochTo() -> 1492750877
</pre>

View File

@ -48,8 +48,8 @@ Table:
Macros:
- $__time(column) -&gt; column as "time"
- $__timeEpoch -&gt; extract(epoch from column) as "time"
- $__timeFilter(column) -&gt; extract(epoch from column) BETWEEN 1492750877 AND 1492750877
- $__unixEpochFilter(column) -&gt; column &gt; 1492750877 AND column &lt; 1492750877
- $__timeFilter(column) -&gt; column BETWEEN '2017-04-21T05:01:17Z' AND '2017-04-21T05:01:17Z'
- $__unixEpochFilter(column) -&gt; column &gt;= 1492750877 AND column &lt;= 1492750877
- $__timeGroup(column,'5m') -&gt; (extract(epoch from column)/300)::bigint*300 AS time
Example of group by and order by with $__timeGroup:
@ -61,8 +61,8 @@ GROUP BY time
ORDER BY time
Or build your own conditionals using these macros which just return the values:
- $__timeFrom() -&gt; to_timestamp(1492750877)
- $__timeTo() -&gt; to_timestamp(1492750877)
- $__timeFrom() -&gt; '2017-04-21T05:01:17Z'
- $__timeTo() -&gt; '2017-04-21T05:01:17Z'
- $__unixEpochFrom() -&gt; 1492750877
- $__unixEpochTo() -&gt; 1492750877
</pre>