pabloromeo / clusterplex

ClusterPlex is an extended version of Plex, which supports distributed Workers across a cluster to handle transcoding requests.
MIT License
452 stars 35 forks source link

how to let prometheus know there are metrics to be scanned #191

Closed cranky-coder closed 1 year ago

cranky-coder commented 1 year ago

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.

pabloromeo commented 1 year ago

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.

github-actions[bot] commented 1 year ago

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