Open
Description
When setting up the grafana-agent operator using the agent-operator.yaml template, podmonitor resources do not work. The reason they do not work, is missing configuration for podMonitorSelector and podMonitorNamespaceSelector.
Configuring the MetricsInstance as below fixes this issue:
apiVersion: monitoring.grafana.com/v1alpha1
kind: MetricsInstance
metadata:
labels:
agent: grafana-agent
name: grafana-agent-metrics
namespace: default
spec:
remoteWrite:
- basicAuth:
password:
key: password
name: dev-metrics-secret
username:
key: username
name: dev-metrics-secret
url: https://prometheus-prod-10-prod-us-central-0.grafana.net/api/prom/push
serviceMonitorNamespaceSelector: {}
serviceMonitorSelector:
matchLabels:
instance: primary
podMonitorNamespaceSelector: {}
podMonitorSelector:
matchLabels:
instance: primary
Can someone please fix this? This cost my team two days of time, and for some reason was even missed in a ticket we opened with GrafanaCloud support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment