Logz.io · Arazzo Workflow

Logz.io Metrics Explore And Query

Version 1.0.0

Discover label names, list matching series, then run an instant PromQL query.

1 workflow 1 source API 1 provider
View Spec View on GitHub ObservabilityLoggingMetricsTracingSIEMELKElasticsearchOpenSearchPrometheusGrafanaOpenTelemetryAIOpsCloud ObservabilityManaged ELKCost ManagementArazzoWorkflows

Provider

logz-io

Workflows

explore-metrics
List label names, list matching series, then run an instant query.
Retrieves label names, lists series matching a selector, and evaluates an instant PromQL query.
3 steps inputs: apiToken, end, matchSelector, promQuery, start outputs: result, seriesData
1
listLabelNames
GetLabelNames
Retrieve all label names over the supplied time window to discover what can be queried.
2
listSeries
GetSeriesByLabels
List the time series that match the supplied selector within the time window.
3
instantQuery
GetInstantQuery
Evaluate the supplied Prometheus expression query at a single point in time.

Source API Descriptions

Arazzo Workflow Specification

logz-io-metrics-explore-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Logz.io Metrics Explore And Query
  summary: Discover label names, list matching series, then run an instant PromQL query.
  description: >-
    Explores a metrics account from the top down before querying. The workflow
    lists available label names over a time window, lists the time series that
    match a supplied selector, then evaluates an instant Prometheus expression
    query at a point in time. Every step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: logzioApi
  url: ../openapi/logz-io-api-openapi.yml
  type: openapi
workflows:
- workflowId: explore-metrics
  summary: List label names, list matching series, then run an instant query.
  description: >-
    Retrieves label names, lists series matching a selector, and evaluates an
    instant PromQL query.
  inputs:
    type: object
    required:
    - apiToken
    - start
    - end
    - matchSelector
    - promQuery
    properties:
      apiToken:
        type: string
        description: Logz.io API token sent in the X-API-TOKEN header.
      start:
        type: string
        description: Start timestamp (RFC3339 or Unix) for label and series lookups.
      end:
        type: string
        description: End timestamp (RFC3339 or Unix) for label and series lookups.
      matchSelector:
        type: string
        description: Prometheus series selector, e.g. up or {job="api"}.
      promQuery:
        type: string
        description: Prometheus expression query string to evaluate at an instant.
  steps:
  - stepId: listLabelNames
    description: >-
      Retrieve all label names over the supplied time window to discover what
      can be queried.
    operationId: GetLabelNames
    parameters:
    - name: X-API-TOKEN
      in: header
      value: $inputs.apiToken
    - name: start
      in: query
      value: $inputs.start
    - name: end
      in: query
      value: $inputs.end
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      labelStatus: $response.body#/status
  - stepId: listSeries
    description: >-
      List the time series that match the supplied selector within the time
      window.
    operationId: GetSeriesByLabels
    parameters:
    - name: X-API-TOKEN
      in: header
      value: $inputs.apiToken
    - name: match[]
      in: query
      value: $inputs.matchSelector
    - name: start
      in: query
      value: $inputs.start
    - name: end
      in: query
      value: $inputs.end
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      seriesData: $response.body#/data
  - stepId: instantQuery
    description: >-
      Evaluate the supplied Prometheus expression query at a single point in
      time.
    operationId: GetInstantQuery
    parameters:
    - name: X-API-TOKEN
      in: header
      value: $inputs.apiToken
    - name: query
      in: query
      value: $inputs.promQuery
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      result: $response.body#/data/result
  outputs:
    seriesData: $steps.listSeries.outputs.seriesData
    result: $steps.instantQuery.outputs.result