updated integer usage on range

pull/1345/head
Scott Anderson 2020-08-19 10:10:17 -06:00
parent 435e52742a
commit eb4b37da1d
6 changed files with 36 additions and 39 deletions

View File

@ -31,21 +31,21 @@ range(start: -15m, stop: now())
### start
The earliest time to include in results.
Results **include** points that match the specified start time.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
_**Data type:** Duration | Time_
_**Data type:** Duration | Time | Integer_
### stop
The latest time to include in results.
Results **exclude** points that match the specified stop time.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Defaults to `now()`.
_**Data type:** Duration | Time_
_**Data type:** Duration | Time | Integer_
{{% note %}}
Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/types#timestamp-format).
@ -56,20 +56,27 @@ Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/ty
###### Time range relative to now
```js
from(bucket:"example-bucket")
|> range(start:-12h)
|> range(start: -12h)
// ...
```
###### Relative time range
```js
from(bucket:"example-bucket")
|> range(start:-12h, stop: -15m)
|> range(start: -12h, stop: -15m)
// ...
```
###### Absolute time range
```js
from(bucket:"example-bucket")
|> range(start:2018-05-22T23:30:00Z, stop: 2018-05-23T00:00:00Z)
|> range(start: 2018-05-22T23:30:00Z, stop: 2018-05-23T00:00:00Z)
// ...
```
###### Absolute time range with Unix timestamps
```js
from(bucket:"example-bucket")
|> range(start: 1527031800, stop: 1527033600)
// ...
```

View File

@ -35,20 +35,18 @@ _**Data type:** String_
### start
The earliest time to include in results.
Results **include** points that match the specified start time.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`..
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
_**Data type:** Duration | Time | Integer_
### stop
The latest time to include in results.
Results **exclude** points that match the specified stop time.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
Defaults to `now()`.
_**Data type:** Duration | Time | Integer_

View File

@ -38,20 +38,18 @@ _**Data type:** String_
### start
The earliest time to include in results.
Results **include** points that match the specified start time.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
_**Data type:** Duration | Time | Integer_
### stop
The latest time to include in results.
Results **exclude** points that match the specified stop time.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
Defaults to `now()`.
_**Data type:** Duration | Time | Integer_

View File

@ -32,19 +32,17 @@ monitor.from(
### start
The earliest time to include in results.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
_**Data type:** Duration | Time | Integer_
### stop
The latest time to include in results.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
Defaults to `now()`.
_**Data type:** Duration | Time | Integer_

View File

@ -31,19 +31,17 @@ monitor.logs(
### start
The earliest time to include in results.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
_**Data type:** Duration | Time | Integer_
### stop
The latest time to include in results.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
Defaults to `now()`.
_**Data type:** Duration | Time | Integer_

View File

@ -55,19 +55,17 @@ _**Data type:** String_
### start
<span class="req">Required</span> Earliest time to include in results.
Results **include** points that match the specified start time.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Integers are nanosecond Unix timestamps.
_**Data type:** Duration | Time | Integer_
### stop
Latest time to include in results.
Results **exclude** points that match the specified stop time.
Use a relative duration or absolute time.
For example, `-1h` or `2019-08-28T22:00:00Z`.
Integers are nanosecond Unix timestamps.
Use a relative duration, absolute time, or integer (Unix timestamp in seconds).
For example, `-1h`, `2019-08-28T22:00:00Z`, or `1567029600`.
Durations are relative to `now()`.
Defaults to `now()`.