danihodovic / celery-exporter

A Prometheus exporter for Celery metrics
MIT License
399 stars 87 forks source link

run failed maybe caused by environment variable #165

Open jaxsong opened 1 year ago

jaxsong commented 1 year ago

Is there some special environment variable caused run failed with reason

2022-10-11 09:09:28.632 | ERROR    | src.exporter:run:255 - celery-exporter exception '[Errno 2] No such file or directory: '/home/app/gauge_all_1.db'', retrying in 0 seconds.

here is my run config

apiVersion: apps/v1
kind: Deployment
metadata:
  name: celery-exporter
  annotations:
    reloader.stakater.com/auto: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: celery-exporter
  template:
    metadata:
      labels:
        app: celery-exporter
      annotations:
        prometheus.io/scrape: "true"
    spec:
      containers:
      - name: celery-exporter
        image: danihodovic/celery-exporter:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 9808
            name: metrics
            protocol: TCP
        args: ["--broker-url=redis://zeno-redis:6379/0"]
        envFrom:
          - configMapRef:
              name: my-config-map
        resources:
          requests:
            memory: 400Mi
          limits:
            memory: 800Mi

after I removed field envFrom , it worked

danihodovic commented 1 year ago

What's in my-config-map?

pb-dod commented 1 year ago

I ran into this too because I had PROMETHEUS_MULTIPROC_DIR set. You'll need to unset that env var or create the directory it's using.