Hi,
I have an application running, which is accepting the post request to add targets in the path /etc/prometheus/config/target.json.
Currently, I'm posting 2-3 targets using curl to the application which in turn adds to the Prometheus path, post is happening in a time difference of 2-3 minutes.
In Prometheus UI, I could see it is adding only one target or can see only one target in service discovery, but I have added 3 targets.
could see some errors in Prometheus:
ts=2023-12-12T10:27:15.936Z caller=file.go:343 level=error component="discovery manager scrape" discovery=file config=ne-federation msg="Error reading file" path=/etc/prometheus/config/targets.json err="unexpected end of JSON input"
ts=2023-12-12T10:35:50.707Z caller=file.go:343 level=error component="discovery manager scrape" discovery=file config=ne-federation msg="Error reading file" path=/etc/prometheus/config/argets.json err="unexpected end of JSON input"
I checked the JSON file using JSON validator, it's perfectly valid.
can you please help with what could be the issue?