Can you show the content of your /etc/prometheus/federate_sd.json file?
The error suggests to me that you are putting a number where you need a
string, for example
{"labels": {"foo": 123}}
where it should be
{"labels": {"foo": "123"}}
On Saturday 3 February 2024 at 16:03:02 UTC Edwin Vasquez wrote:
> The issue is happening on Prometheus version: *2.49.1*
>
> I'm getting the following error on Prometheus federation:
>
> ts=2024-02-03T13:30:14.209Z caller=file.go:343 level=error
> component="discovery manager scrape" discovery=file config=nrp-federation
> msg="Error reading file" path=/etc/prometheus/federate_sd.json err="json:
> cannot unmarshal number into Go struct field .labels of type
> model.LabelValue"
>
> *It is not happening on my old instance (with version 2.29.2)*. One
> thing I have noticed that if the generated federation JSON file has json
> objects that are not properly arrange, the error occurs.
>
> Any thoughts?
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/a2f69af9-d6c5-4358-81b2-2f65a124b07an%40googlegroups.com.