@HB9VQQ
It’s working on my machine. I ran it using a file as input and then switched to the URL. Both cases ran.
Halfway through this thread we switched from [[inputs.http]]
to [[inputs.file]]
which I didn’t catch until testing on my machine. The conf file is:
data_format = "json_v2"
[[inputs.http.json_v2]]
measurement_name = "SWPC"
[[inputs.http.json_v2.object]]
path = "@this"
and the tail end of the output measurements produced is:
SWPC,host=dd5890180e41,url=https://services.swpc.noaa.gov/json/solar-cycle/predicted-solar-cycle.json low_ssn=0,predicted_f10.7=67.8,high_f10.7=76.8,low_f10.7=67.7,time-tag="2040-06",predicted_ssn=0.1,high_ssn=10.1 1658075170000000000
SWPC,host=dd5890180e41,url=https://services.swpc.noaa.gov/json/solar-cycle/predicted-solar-cycle.json time-tag="2040-07",predicted_ssn=0,high_ssn=9,low_ssn=0,predicted_f10.7=67.73,high_f10.7=8,low_f10.7=67.7 1658075170000000000
SWPC,host=dd5890180e41,url=https://services.swpc.noaa.gov/json/solar-cycle/predicted-solar-cycle.json predicted_f10.7=67.73,high_f10.7=8,low_f10.7=67.7,time-tag="2040-08",predicted_ssn=0,high_ssn=9,low_ssn=0 1658075170000000000
SWPC,host=dd5890180e41,url=https://services.swpc.noaa.gov/json/solar-cycle/predicted-solar-cycle.json low_ssn=0,predicted_f10.7=67.73,high_f10.7=8,low_f10.7=67.7,time-tag="2040-09",predicted_ssn=0,high_ssn=9 1658075170000000000
SWPC,host=dd5890180e41,url=https://services.swpc.noaa.gov/json/solar-cycle/predicted-solar-cycle.json predicted_ssn=0,high_ssn=9,low_ssn=0,predicted_f10.7=67.73,high_f10.7=8,low_f10.7=67.7,time-tag="2040-10" 1658075170000000000
SWPC,host=dd5890180e41,url=https://services.swpc.noaa.gov/json/solar-cycle/predicted-solar-cycle.json low_f10.7=67.7,time-tag="2040-11",predicted_ssn=0,high_ssn=9,low_ssn=0,predicted_f10.7=67.73,high_f10.7=8 1658075170000000000
SWPC,host=dd5890180e41,url=https://services.swpc.noaa.gov/json/solar-cycle/predicted-solar-cycle.json high_f10.7=8,low_f10.7=67.7,time-tag="2040-12",predicted_ssn=0,high_ssn=9,low_ssn=0,predicted_f10.7=67.73 1658075170000000000
2022-07-17T16:26:15Z D! [agent] Stopping service inputs
2022-07-17T16:26:15Z D! [agent] Input channel closed
2022-07-17T16:26:15Z I! [agent] Hang on, flushing any cached metrics before shutdown
2022-07-17T16:26:15Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2022-07-17T16:26:15Z I! [agent] Stopping running outputs