How to configure UMA agent with Prometheus extension to scrap specific metrics from Prometheus?
search cancel

How to configure UMA agent with Prometheus extension to scrap specific metrics from Prometheus?

book

Article ID: 372818

calendar_today

Updated On:

Products

DX Application Performance Management

Issue/Introduction

The UMA agent with Prometheus extension installed on the same host where is Prometheus is located (ex: http://<hostname>: <port>). Prometheus collects metrics from  other (ex :Quadient) product. If this metrics needs to pass to DX OI then the only way is over this over APM UMA agent. So below are the  steps on how to configure UMA to collect these "custom" metrics. where as the mentioned metrics are visible in Prometheus.

Environment

 UMA Agent 24.1

Resolution

Prometheus Importer Custom Promql for standalone apmia.

**************************************************************************

For prometheus Importer running from apmia, follow below procedure to add custom promqls.

  • Create a file say k8s-memory.yaml in extensions/PrometheusImporter/config location

           Content of the file similar to any existing files like k8s-node.yaml,k8s-pod.yaml like below

  

version: 1.0

type: PrometheusImporter

metadata:

    name: memory_metrics

metrics:

- promql: sum(container_memory_usage_bytes{container_name!="POD",container_name!=""}) by (container_name, namespace, pod_name)

   apm_metric_path: (type)|Clusters|Test|(namespace_type)|(namespace)|Pods|(pod)|Containers|(container):Memory Usage

- promql: 100 * (sum(rate(container_cpu_usage_seconds_total{container_name!="POD",container_name!=""}[10m])) by (container_name, namespace, pod_name) / sum(container_spec_cpu_quota{container_name!="POD",container_name!=""} / container_spec_cpu_period{container_name!="POD",container_name!=""}) by (container_name, namespace, pod_name))

   apm_metric_path: (type)|Clusters|Test|(namespace_type)|(namespace)|Pods|(pod)|Containers|(container):CPU Utilization

  • Edit bundle.properties and add above created file name for  the parameter ca.apm.prometheus.metric.importer.endpoint.prometheus.config.files
  • Restart apmia


For Customs PROMQLs from Uma see below link

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/dx-apm-agents/SaaS/Universal-Monitoring-Agent/Prometheus/APM-Infrastructure-Agent-Prometheus-Metric-Ingestion-Support/custom-promql-metric-ingestion-through-prometheus-server-url-.html

 

Please note : We can not use any wildcards or regulars ,we need to configure them manually.