unexpected end of JSON input

53 views
Skip to first unread message

akshay sharma

unread,
Dec 12, 2023, 8:49:13 AM12/12/23
to Prometheus Users
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.

Brian Candler

unread,
Dec 12, 2023, 12:00:22 PM12/12/23
to Prometheus Users
Please refer to the original thread at https://groups.google.com/g/prometheus-users/c/_O-vmByyq4I
Reply all
Reply to author
Forward
0 new messages