The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/dashboard-schemas/transformations/CalculateField.cue

39 lines
1.1 KiB

package transformations
// Add field from calculation.
#CalculateField: {
// Transformation ID.
id: string | *"calculateField"
// Configuration options.
options: {
// The name of your new field. If you leave this blank, then the field will
// be named to match the calculation.
alias: string
// Binary options.
binary: {
// Field or number for left side of equation.
left: string
// Field or number for right side of equation.
right: string
// Operator.
operator: string | *"+"
// Calculation to use.
reducer: string | *"sum"
}
// 'reduceRow' - apply selected calculation on each row of selected fields
// independently.
// 'binary' - apply basic math operation(sum, multiply, etc) on values in a
// single row from two selected fields.
mode: *"reduceRow" | "binary"
// Reduce options.
reduce: {
// Calculation to use.
reducer: string
// Fields to include in calculation.
include: [...string]
}
// Hide all other fields and display only your calculated field in the
// visualization.
replaceFields: bool | *false
}
}