Grafana query data and transform data

Grafana series of articles, version: OOS v9.3.1

  1. Introduction and installation of Grafana
  2. Introduction to configuration parameters of Grafana monitoring large screen (1)
  3. Introduction to configuration parameters of Grafana monitoring large screen (2)
  4. Grafana monitors large-screen visualization charts
  5. Grafana query data and transform data

introduce

Grafana can support various types of data sources, provide a query editor corresponding to the data source, query through the data source and convert and visualize the obtained data.

The data sources supported by Grafana are:

  • Alertmanager: Support Prometheus, Cortex, Grafana Mimir (default)
  • AWS CloudWatch: Amazon's monitoring and management service
  • Azure Monitor: Microsoft's monitoring service
  • Elasticsearch
  • Google Cloud Monitoring
  • Graphite: open source monitoring tool, mainly used to collect infrastructure metrics
  • InfluxDB
  • Jaeger: Distributed Tracing Tool
  • Loki: An open source log aggregation system provided by Grafana
  • Microsoft SQL Server (MSSQL)
  • MySQL
  • OpenTSDB
  • PostgreSQL
  • Prometheus
  • Tempo: Distributed tracing tool provided by Grafana
  • Testdata: Time series database provided by Grafana for testing, which can provide test data
  • Zipkin

The data sources supported by the Enterprise Edition include: GitLab, Jira, etc.

query panel

insert image description here

The query panel consists of the following parts:

  • Data source selector: data source selector
  • Query options: used to configure the maximum value of data and query interval
  • Query inspector button: query inspector
  • Query editor list: list of query editors
  • Expressions: query expressions, supported operations are Math, Reduce, Resample, Classic condition, Threshold

Query result sharing:
Grafana supports multiple panels to share a query data, which is beneficial to improve the performance of the panel.
1. Create a new panel
2. Select Dashboard for Data source
3. Select the corresponding panel for Source

insert image description here

convert data

Grafana can process the data before the data is displayed on the panel.
1. Click the Transform tab.
2. Select the transformation type to use. Different transformation types have different configurations.
3. To add a transformation type, click Add transformation
4. Use the upper right corner to adjust The button can adjust the mode conversion

Supported conversion types:

  • Add field from calculation
    Use the original value to calculate the new field

  • Concatenate fields
    concatenate all fields to form a new field

  • Config from query results
    extracts fields from query results and applies them to another query

  • Convert field type
    converts the field to the specified field type

  • Create heatmap
    calculates the heatmap based on the source data

  • Extract fields
    analyze the fields in the content (JSON, labels, etc.)

  • Field lookup
    queries values ​​from external data sources, currently supports spatial data, and will support more in the future

  • Filter by name
    Filter data by regular or specified fields

  • Filter data by query
    filter data according to the query group

  • Filter data by values
    ​​determines whether to filter data based on data values

  • Group by
    is grouped according to the specified field, and the data of each group is calculated

  • Grouping to matrix
    combines three fields into one matrix

  • Histogram
    calculates a histogram from the input data

  • Join by field
    merges into one table based on related fields between two or more tables

  • Join by labels
    displays labeled results into tables joined by labels

  • Labels to fields
    groups series by time and returns labels or tags as fields. Used to display labeled time series in a table, where each label key becomes a separate column

  • Limit
    limits the number of data items displayed

  • Merge
    combines the results of multiple queries into one result

  • Organize fields
    allows users to reorder, hide or rename fields/columns, only available for a single query panel

  • Partition by values
    ​​differentiate by unique/enumerated values ​​in one or more fields

  • Prepare time series
    converts time series data to wide-long format

  • Reduce
    compressed fields

  • Rename by regex
    uses regular expressions and replacement patterns to rename parts of query results

  • Rows to fields
    converts rows to fields

  • Series to rows
    converts rows into separate fields

  • Sort by
    field sorting

  • Spatial operations
    apply spatial operations to query results

Other articles:

  1. Spring Boot Admin Reference Guide
  2. The problem that the SpringBoot Admin service is offline and does not display health information
  3. Loading of Spring Boot Admin2 @EnableAdminServer
  4. Detailed Explanation of Spring Boot Admin2 AdminServerAutoConfiguration
  5. Detailed Explanation of Spring Boot Admin2 Instance Status Monitoring
  6. Spring Boot Admin2 custom JVM monitoring notification
  7. Spring Boot Admin2 custom exception monitoring
  8. Spring Boot Admin monitoring indicators connected to Grafana visualization

Spring Security related articles:

  1. Definition and operation process of OAuth2
  2. Spring Security OAuth implements Gitee quick login
  3. Spring Security OAuth implements GitHub quick login
  4. Spring Security's filter chain mechanism
  5. Spring Security OAuth Client configuration loading source code analysis
  6. Detailed Explanation of Spring Security Built-in Filters
  7. Why are two OAuth2AuthorizationRequestRedirectFilter analysis loaded
  8. Spring Security custom authorization server practice
  9. Spring Security custom resource server practice
  10. Spring Security custom user information endpoint coexists with multiple login methods
  11. Spring Security password storage
  12. Anti-vulnerability attacks of Spring Security

Guess you like

Origin blog.csdn.net/weixin_40972073/article/details/128379173