Skip to main content
Version: 2.34.0

Metrics

Aperture enables feeding custom metrics to the Aperture Controller's Prometheus instance by adding custom metric receivers into the OpenTelemetry Collector in the Aperture Policy. See configuration reference.

Configuring OpenTelemetry Collectors

For all the OpenTelemetry collectors, configuration can be passed using Environment variables in the Aperture Agent.

For example, environment variables for RabbitMQ can be passed as below:

policy:
resources:
infra_meters:
agent_group: default
rabbitmq:
per_agent_group: true
receivers:
rabbitmq:
endpoint: ${RABBITMQ_ENDPOINT}
username: ${RABBITMQ_USERNAME}
password: ${RABBITMQ_PASSWORD}
collection_interval: 1s

If you are installing the Aperture Agent on Kubernetes, you can use a Secret and a ConfigMap to pass environment variables to the Aperture Agent, as shown below:

apiVersion: v1
kind: ConfigMap
metadata:
name: rabbitmq
namespace: aperture-agent
data:
RABBITMQ_ENDPOINT: http://rabbitmq.rabbitmq.svc.cluster.local:15672
apiVersion: v1
kind: Secret
metadata:
name: rabbitmq-creds
namespace: aperture-agent
data:
RABBITMQ_USERNAME: <rabbitmq-username>
RABBITMQ_PASSWORD: <rabbitmq-password>

To use these Secret and ConfigMap during the Aperture Agent Installation, refer to them in the values.yaml file, as shown below:

agent:
extraEnvVarsSecret: "rabbitmq-creds"
extraEnvVarsCM: "rabbitmq"