Hey Brian,
You're awesome! You gave me a hint on what to check It's now working
perfectly! Now I need to figure out on how prometheus read the updates in
federate_sd.json without restarting the prometheus service. It seems
like `curl -X POST http://localhost:9090/-/reload` is not working. Note
that "--web.enable-lifecycle" is included in the docker compose YAML file.
Any thoughts?
On Sunday, February 4, 2024 at 12:13:14 AM UTC+8 Brian Candler wrote:
> 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/b6226b2b-9e82-461e-9498-a29726390c84n%40googlegroups.com.