grafana / mimir

Grafana Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus.
https://grafana.com/oss/mimir/
GNU Affero General Public License v3.0
4.06k stars 516 forks source link

mimirtool: invalid character 'e' in literal true (expecting 'r') #6941

Open PavelPikat opened 9 months ago

PavelPikat commented 9 months ago

Describe the bug

I self-host Mimir in AKS with AlertManager enabled. I am trying to update its alertmanager config using mimirtool from Windows 10. I downloaded mimir executable, configured environment variables for URL, basic auth & tenantId, and run a command from official docs - https://grafana.com/docs/mimir/latest/manage/tools/mimirtool/

.\mimirtool.exe alertmanager load .\test.yaml

Content of the test.yaml is also from the official docs:

route:
  receiver: "example_receiver"
  group_by: ["example_groupby"]
receivers:
  - name: "example_receiver"

mimirtool then returns this error:

mimirtool.exe: error: POST request to https://<hostname>/alertmanager/api/v1/alerts failed: server returned HTTP status: 400 Bad Request, body: "{\"status\":\"error\",\"errorType\":\"bad_data\",\"error\":\"invalid character 'e' in literal true (expecting 'r')\"}", try --help

I have checked encoding - the file is UTF-8 without BOM.

Environment

dimitarvdimitrov commented 9 months ago

I couldn't reproduce this with the darwin-arm64 build of mimirtool 2.10.5. It would be useful if someone on windows can reproduce this.

sagarwala commented 3 months ago

@PavelPikat I am getting the same error. Were you able to solve it ?