Metric query


As a tenant administrator or an editor, use the Metric query type to fetch the performance metrics data from BMC Helix Operations Management or BMC Helix Continuous Optimization.

This query type uses the PromQL or MetricsQL syntax.

This query requires the following data:

Examples for BMC Helix Operations Management

Here are a few examples of the Metric query type to fetch data from BMC Helix Operations Management:

Use case

Query

View the CPU utilization for a LINUX host, where the host name is hostA.bmc.com.

Utilization{hostname="hostA.bmc.com"}

View the available filesystem space on a device for the root file system, where the host name is hostB.bmc.com.

AvailableSpace{hostname="hostB.bmc.com", entityName="root"}

View the CPU utilization of the Kubernetes Namespace

label_replace({__name__="CPUUtilization",entityTypeId="K8S_NAMESPACE",entityName=~"$K8_Env@$Namespace"}, "Var1", "${1}", "entityName", "^.*@(.*)")

View the sum of the aggregate data of the metric name MEMmemVMUsed. If you have any host name, this query will return the aggregate data for both the entity and the host name

sum_over_time({__name__="MEMmemVMUsed",entityId="954c01b0-ed43-4b50-8dcc-cce56ce91ea5:NT_MEMORY:NT_MEMORY",entityTypeId="NT_MEMORY"}[1h])

View the sum of data points for the metric MEMmemVMUsed

sum({__name__="MEMmemVMUsed",entityId="954c01b0-ed43-4b50-8dcc-cce56ce91ea5:NT_MEMORY:NT_MEMORY",entityTypeId="NT_MEMORY"})


Examples for BMC Helix Continuous Optimization

Here are a few examples of the Metric query type to fetch data from BMC Helix Continuous Optimization:

Use case

Query

Visualization type

Output panel

View the memory utilization details for the Kubernetes cluster.

MEM_UTIL{enttype="sys:kubernetes:cluster", entname="$Cluster"} * 100

Gauge

dashboards_ex1.png


View the pod usage within the Kubernetes cluster.

(SUM(KPOD_NUM{entname="$Cluster"})/
SUM(KPOD_NUM_MAX{entname="$Cluster"}))*100

Gauge

dashboards_ex2.png


View the CPU and memory utilization details for Kubernetes nodes.

  • (CPU_UTIL{enttype="sys:kubernetes:node"})
  • (MEM_UTIL{enttype="sys:kubernetes:node"})

Table

dashboards_ex3.png


View the CPU usage trend for the Kubernetes cluster.

  • CPU_USED_NUM{enttype="sys:kubernetes:cluster", entname="$Cluster"} 
  • CPU_LIMIT{enttype="sys:kubernetes:cluster", entname="$Cluster"}
  • CPU_REQUEST{enttype="sys:kubernetes:cluster", entname="$Cluster"}
  • CPU_NUM{enttype="sys:kubernetes:cluster", entname="$Cluster"}

Time series

dashboards_ex4.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*