pabloromeo/clusterplex

how to let prometheus know there are metrics to be scanned

Closed this issue · 2 comments

I got this working in my cluster. But prometheus doesn't seem to see the metrics. I even added the annotations and still not seeing it. Is there something specific that is needed to get prom to pick up the metrics. I tested and can get to the /metrics page.

Hi! Is this on kubernetes or swarm?
In the case of Kubernetes, I do it through a ServiceMonitor.
For example:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    app.kubernetes.io/name: clusterplex-orchestrator
    app.kubernetes.io/part-of: clusterplex
    release: kube-prometheus-stack
  name: clusterplex-orchestrator-monitor
  namespace: monitoring
spec:
  endpoints:
  - path: /metrics
    port: orchestrator
    scheme: http
    interval: 60s
  jobLabel: clusterplex-orchestrator
  namespaceSelector:
    matchNames:
    - plex-system
  selector:
    matchLabels:
      app.kubernetes.io/name: clusterplex-orchestrator
      app.kubernetes.io/part-of: clusterplex

When I had it running in Docker Swarm I believe I manually registered the orchestrator within Prometheus' config.

This issue is stale because it has been open for 30 days with no activity.