Hi All,
An application accepts the request from the user and updates the .json file in path /etc/prometheus/target.json and Prometheus refresh interval is 5min.
I'm sending two post requests one by one with target information in a 2-3min difference, I could see in service discovery only the latest target is updated and in Prometheus issue is coming as
"level=error ts=2018-06-21T08:20:01.914472896Z caller=file.go:321 component="discovery manager scrape" discovery=file msg="Error reading file" path=/etc/prometheus/config/target.json err="unexpected end of JSON input"
"
I checked using JSON validator, .json file is valid.
please help why this issue is coming or what can be the reason.