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

History query failed: error="failed to run a range query Prometheus for alerts: bad_data: invalid parameter \"start\" #6253

Open
bimax opened this issue Oct 10, 2024 · 1 comment

Comments

@bimax
Copy link

bimax commented Oct 10, 2024

Hello,

I am running karma in a docker:
docker run -p 8080:8080 -v $(pwd)/karma-config/karma.yaml:/etc/karma/karma.yaml ghcr.io/prymitive/karma:latest --config.file=/etc/karma/karma.yaml

Versions:
karma: latest
Alertmanager: 0.27.0
Prometheus: 2.50.1 in dc1 and 2.42.0 in dc2

with a config file:

alertmanager:
  interval: 2m
  servers:
    - name: ams.monitoring-system
      uri: https://alertmanager.k8s-dc1.domain.net
      readonly: false
      proxy: false
    - name: ams.prod
      uri: https://alertmanager-prod.k8s-dc1.domain.net
      readonly: false
      proxy: false
    - name: sjc.monitoring-system
      uri: https://alertmanager.k8s-dc2.domain.net
      readonly: false
      proxy: false
    - name: sjc.prod
      uri: https://alertmanager-prod.k8s-dc2.domain.net
      readonly: false
      proxy: false
alertAcknowledgement:
  enabled: true
  duration: 15m0s
  author: karma
  comment: ACK! This alert was acknowledged using karma on %NOW%

And I see batch of errors in the logs:

level=error msg="History query failed" error="failed to run a range query Prometheus for alerts: bad_data: invalid parameter \"start\": cannot parse \"\" to a valid timestamp" labels={"alertname":"KubeQuotaFullyUsed","namespace":"son-qa"} uri=http://prometheus.k8s-dc2.domain.net worker=2
level=error msg="History query failed" error="failed to run a range query Prometheus for alerts: bad_data: invalid parameter \"start\": cannot parse \"\" to a valid timestamp" labels={"alertname":"KubeQuotaFullyUsed","container":"kube-state-metrics","endpoint":"http","namespace":"haproxy-ingress","prometheus":"monitoring-system/kps-kube-prometheus-stack-prometheus","resource":"services.loadbalancers","retention":"2y","service":"kps-kube-state-metrics","severity":"info","target":"slack-internal"} uri=http://prometheus.k8s-dc1.domain.net worker=30
...

Not sure what is wrong with it. Can you please advice.

@jhuspek
Copy link

jhuspek commented Oct 26, 2024

Hi, I had a same issue. The problem was that karma wanted to access prometheus via http and catches redirect to https. So the solution was to add a rewrite rule to replace http with https.

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

2 participants