Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alertmanager gives "thanos: error: unknown long flag '--config.file'" #5182

Open
smhakcan opened this issue Jan 16, 2025 · 0 comments
Open

Comments

@smhakcan
Copy link

Hi, Everyone.
I install prometheus kube-stack with helm by argocd but alertmanager give this error "thanos: error: unknown long flag '--config.file'"
I couln't fix this. Could anybody help me pls I will share my conf in blow:

spec:
  automountServiceAccountToken: true
  containers:
    - args:
        - '--config.file=/etc/alertmanager/config_out/alertmanager.env.yaml'
        - '--storage.path=/alertmanager'
        - '--data.retention=336h'
        - '--cluster.listen-address='
        - '--web.listen-address=:9093'
        - '--web.external-url=http://alermanager.svc/'
        - '--web.route-prefix=/'
        - '--cluster.label=prometheus-stack/kube-stack-alertmanager'
        - >-
          --cluster.peer=alertmanager-kube-stack-alertmanager-0.alertmanager-operated:9094
        - '--cluster.reconnect-timeout=5m'
        - '--web.config.file=/etc/alertmanager/web_config/web-config.yaml'
      env:
        - name: POD_IP
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: status.podIP
      image: local.registry/prometheus/alertmanager:v0.27.0
      imagePullPolicy: IfNotPresent
      livenessProbe:
        failureThreshold: 10
        httpGet:
          path: /-/healthy
          port: http-web
          scheme: HTTP
        periodSeconds: 10
        successThreshold: 1
        timeoutSeconds: 3
      name: alertmanager
      ports:
        - containerPort: 9093
          name: http-web
          protocol: TCP
        - containerPort: 9094
          name: mesh-tcp
          protocol: TCP
        - containerPort: 9094
          name: mesh-udp
          protocol: UDP
      readinessProbe:
        failureThreshold: 10
        httpGet:
          path: /-/ready
          port: http-web
          scheme: HTTP
        initialDelaySeconds: 3
        periodSeconds: 5
        successThreshold: 1
        timeoutSeconds: 3
      resources:
        requests:
          memory: 200Mi
      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop:
            - ALL
        readOnlyRootFilesystem: true
      terminationMessagePath: /dev/termination-log
      terminationMessagePolicy: FallbackToLogsOnError
      volumeMounts:
        - mountPath: /etc/alertmanager/config
          name: config-volume
        - mountPath: /etc/alertmanager/config_out
          name: config-out
          readOnly: true
        - mountPath: /etc/alertmanager/certs
          name: tls-assets
          readOnly: true
        - mountPath: /alertmanager
          name: alertmanager-kube-stack-alertmanager-db
          subPath: alertmanager-db
        - mountPath: /etc/alertmanager/web_config/web-config.yaml
          name: web-config
          readOnly: true
          subPath: web-config.yaml
    - args:
        - '--listen-address=:8080'
        - '--reload-url=http://127.0.0.1:9093/-/reload'
        - '--config-file=/etc/alertmanager/config/alertmanager.yaml.gz'
        - >-
          --config-envsubst-file=/etc/alertmanager/config_out/alertmanager.env.yaml
        - '--watched-dir=/etc/alertmanager/config'
      command:
        - /bin/prometheus-config-reloader
      env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: SHARD
          value: '-1'
      image: >-
        local.registry/prometheus-operator/prometheus-config-reloader:v0.76.1
      imagePullPolicy: IfNotPresent
      name: config-reloader
      ports:
        - containerPort: 8080
          name: reloader-web
          protocol: TCP
      resources: {}
      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop:
            - ALL
        readOnlyRootFilesystem: true
      terminationMessagePath: /dev/termination-log
      terminationMessagePolicy: FallbackToLogsOnError
      volumeMounts:
        - mountPath: /etc/alertmanager/config
          name: config-volume
          readOnly: true
        - mountPath: /etc/alertmanager/config_out
          name: config-out
  dnsPolicy: ClusterFirst
  initContainers:
    - args:
        - '--watch-interval=0'
        - '--listen-address=:8081'
        - '--config-file=/etc/alertmanager/config/alertmanager.yaml.gz'
        - >-
          --config-envsubst-file=/etc/alertmanager/config_out/alertmanager.env.yaml
        - '--watched-dir=/etc/alertmanager/config'
      command:
        - /bin/prometheus-config-reloader
      env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: SHARD
          value: '-1'
      image: >-
        local.registry/prometheus-operator/prometheus-config-reloader:v0.76.1
      imagePullPolicy: IfNotPresent
      name: init-config-reloader
      ports:
        - containerPort: 8081
          name: reloader-web
          protocol: TCP
      resources: {}
      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop:
            - ALL
        readOnlyRootFilesystem: true
      terminationMessagePath: /dev/termination-log
      terminationMessagePolicy: FallbackToLogsOnError
      volumeMounts:
        - mountPath: /etc/alertmanager/config
          name: config-volume
          readOnly: true
        - mountPath: /etc/alertmanager/config_out
          name: config-out
  restartPolicy: Always
  schedulerName: default-scheduler
  securityContext:
    fsGroup: 2000
    runAsGroup: 2000
    runAsNonRoot: true
    runAsUser: 1000
    seccompProfile:
      type: RuntimeDefault
  serviceAccount: kube-stack-alertmanager
  serviceAccountName: kube-stack-alertmanager
  terminationGracePeriodSeconds: 120
  volumes:
    - name: config-volume
      secret:
        defaultMode: 420
        secretName: alertmanager-kube-stack-alertmanager-generated
    - name: tls-assets
      projected:
        defaultMode: 420
        sources:
          - secret:
              name: alertmanager-kube-stack-alertmanager-tls-assets-0
    - emptyDir:
        medium: Memory
      name: config-out
    - name: web-config
      secret:
        defaultMode: 420
        secretName: alertmanager-kube-stack-alertmanager-web-config

updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
name: alertmanager-kube-stack-alertmanager-db
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Gi

@smhakcan smhakcan changed the title alermanager gives "thanos: error: unknown long flag '--config.file'" alertmanager gives "thanos: error: unknown long flag '--config.file'" Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant