Hi Guys,
I try to get some data into my InfluxDB through Telegraf. The data is from a p1 monitor application (which is called ‘p1 monitor’. P1 monitor has a couple of API calls which I cannot get to work into Telegraf. Obviously I am doing something wrong. Can somebody help me. Let me know if there is need for some extra information.
This is what I have in the telegraf.conf (indents are a little weird due to copying and pasting)
[[inputs.http]]
urls = [
"http://192.168.2.5/api/v1/powergas/day",
]
method = "GET"
data_format = "json"
Also:
[[inputs.httpjson]]
servers = [
"http://192.168.2.5/api/v1/smartmeter",
"http://192.168.2.5/api/v1/status",
"http://192.168.2.5/api/v1/powergas/day",
"http://192.168.2.5/api/v1/powergas/hour?limit=10&sort=asc&json=object&round=on&starttime=2018-01-03 12:03:55",
"192.168.2.5/api/v1/powergas/minute?limit=1",
"192.168.2.5/api/v1/powergas/minute?limit=1&json=object",
"192.168.2.5/api/v1"
]
method = "GET"
As you can see I tried some options already but everything is giving me errrors:
2019-12-13T18:14:55Z E! [inputs.httpjson] Error in plugin: must be an object or an array of objects
2019-12-13T18:14:55Z E! [inputs.httpjson] Error in plugin: must be an object or an array of objects
2019-12-13T18:14:55Z E! [inputs.http] Error in plugin: [url=http://192.168.2.5/api/v1/powergas/day]: must be an object or an array of objects
2019-12-13T18:14:55Z E! [inputs.httpjson] Error in plugin: must be an object or an array of objects
2019-12-13T18:14:55Z E! [inputs.http] Error in plugin: [url=http://192.168.2.5/api/v1/smartmeter]: must be an object or an array of objects
The json information I am trying to get looks like the following: