ribbybibby / s3_exporter

Exports Prometheus metrics about S3 buckets and objects
Apache License 2.0
104 stars 42 forks source link

unknown long flag --s3.endpoint-url #21

Closed Ahmadre closed 3 years ago

Ahmadre commented 3 years ago

We're deploying the s3_exporter on a managed kubernetes cluster and can't set a custom endpoint url:

s3_exporter: error: unknown long flag '--s3.endpoint-url region.domain.com', try --help

but it seems to exist: https://github.com/ribbybibby/s3_exporter/blob/44d5e401c6823b42cc77c2398d90b7fa5ce3e73d/s3_exporter.go#L173

Any idea?

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: s3-exporter
  namespace: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app: s3-exporter
  template:
    metadata: 
      labels:
        app: s3-exporter
    spec:
      containers:
        - name: s3-exporter
          image: ribbybibby/s3-exporter:latest
          command: ["/s3_exporter"]
          args: ["--s3.endpoint-url", "region.domain.com"]
          envFrom:
          - configMapRef:
              name: s3-exporter-config
ribbybibby commented 3 years ago

The entire string --s3.endpoint-url region.domain.com is being interpreted as a flag. Try args: ["--s3.endpoint-url=region.domain.com"] instead.

Ahmadre commented 3 years ago

The entire string --s3.endpoint-url region.domain.com is being interpreted as a flag. Try args: ["--s3.endpoint-url=region.domain.com"] instead.

It works 😭👏 thank you sooo much!