Skip to content

testData

grafonnet.query.testData

Subpackages

Index

Fields

fn withAlias

withAlias(value)

PARAMETERS:

  • value (string)

fn withChannel

withChannel(value)

PARAMETERS:

  • value (string)

Used for live query

fn withCsvContent

withCsvContent(value)

PARAMETERS:

  • value (string)

fn withCsvFileName

withCsvFileName(value)

PARAMETERS:

  • value (string)

fn withCsvWave

withCsvWave(value)

PARAMETERS:

  • value (array)

fn withCsvWaveMixin

withCsvWaveMixin(value)

PARAMETERS:

  • value (array)

fn withDatasource

withDatasource(value)

PARAMETERS:

  • value (string)

Set the datasource for this query.

fn withDropPercent

withDropPercent(value)

PARAMETERS:

  • value (number)

Drop percentage (the chance we will lose a point 0-100)

fn withErrorType

withErrorType(value)

PARAMETERS:

  • value (string)
    • valid values: "frontend_exception", "frontend_observable", "server_panic"

Possible enum values: - "frontend_exception" - "frontend_observable" - "server_panic"

fn withFlamegraphDiff

withFlamegraphDiff(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

fn withHide

withHide(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

true if query is disabled (ie should not be returned to the dashboard) NOTE: this does not always imply that the query should not be executed since the results from a hidden query may be used as the input to other queries (SSE etc)

fn withIntervalMs

withIntervalMs(value)

PARAMETERS:

  • value (number)

Interval is the suggested duration between time points in a time series query. NOTE: the values for intervalMs is not saved in the query model. It is typically calculated from the interval required to fill a pixels in the visualization

fn withLabels

withLabels(value)

PARAMETERS:

  • value (string)

fn withLevelColumn

withLevelColumn(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

fn withLines

withLines(value)

PARAMETERS:

  • value (integer)

fn withMax

withMax(value)

PARAMETERS:

  • value (number)

fn withMaxDataPoints

withMaxDataPoints(value)

PARAMETERS:

  • value (integer)

MaxDataPoints is the maximum number of data points that should be returned from a time series query. NOTE: the values for maxDataPoints is not saved in the query model. It is typically calculated from the number of pixels visible in a visualization

fn withMin

withMin(value)

PARAMETERS:

  • value (number)

fn withNodes

withNodes(value)

PARAMETERS:

  • value (object)

fn withNodesMixin

withNodesMixin(value)

PARAMETERS:

  • value (object)

fn withNoise

withNoise(value)

PARAMETERS:

  • value (number)

fn withPoints

withPoints(value)

PARAMETERS:

  • value (array)

fn withPointsMixin

withPointsMixin(value)

PARAMETERS:

  • value (array)

fn withPulseWave

withPulseWave(value)

PARAMETERS:

  • value (object)

fn withPulseWaveMixin

withPulseWaveMixin(value)

PARAMETERS:

  • value (object)

fn withQueryType

withQueryType(value)

PARAMETERS:

  • value (string)

QueryType is an optional identifier for the type of query. It can be used to distinguish different types of queries.

fn withRawFrameContent

withRawFrameContent(value)

PARAMETERS:

  • value (string)

fn withRefId

withRefId(value)

PARAMETERS:

  • value (string)

RefID is the unique identifier of the query, set by the frontend call.

fn withResultAssertions

withResultAssertions(value)

PARAMETERS:

  • value (object)

Optionally define expected query result behavior

fn withResultAssertionsMixin

withResultAssertionsMixin(value)

PARAMETERS:

  • value (object)

Optionally define expected query result behavior

fn withScenarioId

withScenarioId(value)

PARAMETERS:

  • value (string)
    • valid values: "annotations", "arrow", "csv_content", "csv_file", "csv_metric_values", "datapoints_outside_range", "exponential_heatmap_bucket_data", "flame_graph", "grafana_api", "linear_heatmap_bucket_data", "live", "logs", "manual_entry", "no_data_points", "node_graph", "predictable_csv_wave", "predictable_pulse", "random_walk", "random_walk_table", "random_walk_with_error", "raw_frame", "server_error_500", "simulation", "slow_query", "streaming_client", "table_static", "trace", "usa", "variables-query"

Possible enum values: - "annotations" - "arrow" - "csv_content" - "csv_file" - "csv_metric_values" - "datapoints_outside_range" - "exponential_heatmap_bucket_data" - "flame_graph" - "grafana_api" - "linear_heatmap_bucket_data" - "live" - "logs" - "manual_entry" - "no_data_points" - "node_graph" - "predictable_csv_wave" - "predictable_pulse" - "random_walk" - "random_walk_table" - "random_walk_with_error" - "raw_frame" - "server_error_500" - "simulation" - "slow_query" - "streaming_client" - "table_static" - "trace" - "usa" - "variables-query"

fn withSeriesCount

withSeriesCount(value)

PARAMETERS:

  • value (integer)

fn withSim

withSim(value)

PARAMETERS:

  • value (object)

fn withSimMixin

withSimMixin(value)

PARAMETERS:

  • value (object)

fn withSpanCount

withSpanCount(value)

PARAMETERS:

  • value (integer)

fn withSpread

withSpread(value)

PARAMETERS:

  • value (number)

fn withStartValue

withStartValue(value)

PARAMETERS:

  • value (number)

fn withStream

withStream(value)

PARAMETERS:

  • value (object)

fn withStreamMixin

withStreamMixin(value)

PARAMETERS:

  • value (object)

fn withStringInput

withStringInput(value)

PARAMETERS:

  • value (string)

common parameter used by many query types

fn withTimeRange

withTimeRange(value)

PARAMETERS:

  • value (object)

TimeRange represents the query range NOTE: unlike generic /ds/query, we can now send explicit time values in each query NOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly

fn withTimeRangeMixin

withTimeRangeMixin(value)

PARAMETERS:

  • value (object)

TimeRange represents the query range NOTE: unlike generic /ds/query, we can now send explicit time values in each query NOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly

fn withUsa

withUsa(value)

PARAMETERS:

  • value (object)

fn withUsaMixin

withUsaMixin(value)

PARAMETERS:

  • value (object)

fn withWithNil

withWithNil(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

obj datasource

fn datasource.withApiVersion

datasource.withApiVersion(value)

PARAMETERS:

  • value (string)

The apiserver version

fn datasource.withType

datasource.withType(value)

PARAMETERS:

  • value (string)

The datasource plugin type

fn datasource.withUid

datasource.withUid(value)

PARAMETERS:

  • value (string)

Datasource UID (NOTE: name in k8s)

obj nodes

fn nodes.withCount

nodes.withCount(value)

PARAMETERS:

  • value (integer)

fn nodes.withSeed

nodes.withSeed(value)

PARAMETERS:

  • value (integer)

fn nodes.withType

nodes.withType(value)

PARAMETERS:

  • value (string)
    • valid values: "random", "random edges", "response_medium", "response_small", "feature_showcase"

Possible enum values: - "random" - "random edges" - "response_medium" - "response_small" - "feature_showcase"

obj pulseWave

fn pulseWave.withOffCount

pulseWave.withOffCount(value)

PARAMETERS:

  • value (integer)

fn pulseWave.withOffValue

pulseWave.withOffValue(value)

PARAMETERS:

  • value (number)

fn pulseWave.withOnCount

pulseWave.withOnCount(value)

PARAMETERS:

  • value (integer)

fn pulseWave.withOnValue

pulseWave.withOnValue(value)

PARAMETERS:

  • value (number)

fn pulseWave.withTimeStep

pulseWave.withTimeStep(value)

PARAMETERS:

  • value (integer)

obj resultAssertions

fn resultAssertions.withMaxFrames

resultAssertions.withMaxFrames(value)

PARAMETERS:

  • value (integer)

Maximum frame count

fn resultAssertions.withType

resultAssertions.withType(value)

PARAMETERS:

  • value (string)
    • valid values: "", "timeseries-wide", "timeseries-long", "timeseries-many", "timeseries-multi", "directory-listing", "table", "numeric-wide", "numeric-multi", "numeric-long", "log-lines"

Type asserts that the frame matches a known type structure. Possible enum values: - "" - "timeseries-wide" - "timeseries-long" - "timeseries-many" - "timeseries-multi" - "directory-listing" - "table" - "numeric-wide" - "numeric-multi" - "numeric-long" - "log-lines"

fn resultAssertions.withTypeVersion

resultAssertions.withTypeVersion(value)

PARAMETERS:

  • value (array)

TypeVersion is the version of the Type property. Versions greater than 0.0 correspond to the dataplane contract documentation https://grafana.github.io/dataplane/contract/.

fn resultAssertions.withTypeVersionMixin

resultAssertions.withTypeVersionMixin(value)

PARAMETERS:

  • value (array)

TypeVersion is the version of the Type property. Versions greater than 0.0 correspond to the dataplane contract documentation https://grafana.github.io/dataplane/contract/.

obj sim

fn sim.withConfig

sim.withConfig(value)

PARAMETERS:

  • value (object)

fn sim.withConfigMixin

sim.withConfigMixin(value)

PARAMETERS:

  • value (object)

fn sim.withKey

sim.withKey(value)

PARAMETERS:

  • value (object)

fn sim.withKeyMixin

sim.withKeyMixin(value)

PARAMETERS:

  • value (object)

fn sim.withLast

sim.withLast(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

fn sim.withStream

sim.withStream(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

obj sim.key

fn sim.key.withTick
sim.key.withTick(value)

PARAMETERS:

  • value (number)
fn sim.key.withType
sim.key.withType(value)

PARAMETERS:

  • value (string)
fn sim.key.withUid
sim.key.withUid(value)

PARAMETERS:

  • value (string)

obj stream

fn stream.withBands

stream.withBands(value)

PARAMETERS:

  • value (integer)

fn stream.withNoise

stream.withNoise(value)

PARAMETERS:

  • value (number)

fn stream.withSpeed

stream.withSpeed(value)

PARAMETERS:

  • value (number)

fn stream.withSpread

stream.withSpread(value)

PARAMETERS:

  • value (number)

fn stream.withType

stream.withType(value)

PARAMETERS:

  • value (string)
    • valid values: "fetch", "logs", "signal", "traces"

Possible enum values: - "fetch" - "logs" - "signal" - "traces"

fn stream.withUrl

stream.withUrl(value)

PARAMETERS:

  • value (string)

obj timeRange

fn timeRange.withFrom

timeRange.withFrom(value="now-6h")

PARAMETERS:

  • value (string)
    • default value: "now-6h"

From is the start time of the query.

fn timeRange.withTo

timeRange.withTo(value="now")

PARAMETERS:

  • value (string)
    • default value: "now"

To is the end time of the query.

obj usa

fn usa.withFields

usa.withFields(value)

PARAMETERS:

  • value (array)

fn usa.withFieldsMixin

usa.withFieldsMixin(value)

PARAMETERS:

  • value (array)

fn usa.withMode

usa.withMode(value)

PARAMETERS:

  • value (string)

fn usa.withPeriod

usa.withPeriod(value)

PARAMETERS:

  • value (string)

fn usa.withStates

usa.withStates(value)

PARAMETERS:

  • value (array)

fn usa.withStatesMixin

usa.withStatesMixin(value)

PARAMETERS:

  • value (array)