Monitoring Flux #405
-
Hi, I hope it's ok to post here, I'm trying to monitor Flux using Google managed prometheus in GKE. The flux docs have a set of instructions for deploying another prometheus stack which I think ultimately comes down to deploying a custom PodMonitor resource. I naively tried changing the apiVersion and kind on the manifest and trying to install it but of course that didn't work :( Can anyone suggest what the manifest ought to look like based on this hacked version:
Sorry for the n00b question, I've not worked with prometheus before. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @heretic098, Apologies for the delayed response. So However, you should be able to modify your resource to look something like: apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
name: flux-system
namespace: flux-system
labels:
app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring
spec:
selector:
matchExpressions:
- key: app
operator: In
values:
- helm-controller
- source-controller
- kustomize-controller
- notification-controller
- image-automation-controller
- image-reflector-controller
endpoints:
- port: http-prom
interval: 30s I've never used Flux, so I may not have the |
Beta Was this translation helpful? Give feedback.
-
Hi @pintohutch , that does indeed apply and create a PodMonitoring resource in the flux-system namespace. I'll keep an eye on it and see if any metrics appear in GCP managed prometheus. Fingers crossed. Thank you for your assistance, |
Beta Was this translation helpful? Give feedback.
Hi @heretic098,
Apologies for the delayed response. So
PodMonitoring
as a different API spec from the prometheus-operatorPodMonitor
, which is why you're facing this issue (e.g. there's nonamespaceSelector
inPodMonitoring
).However, you should be able to modify your resource to look something like: