I am new to telegraf and json and I know this is easy but I was having difficulty figuring it out. I tried searching and it seems it is just too simple and I am not sure what I am missing (just experience with these systems). I have a sensor that is outputting json strings with some status formation but I dont know how to setup telegraf to output this info to influx. the json string is like this:
{“Status”:{“Module”:17,“FriendlyName”:“Eco_dht11”,“Topic”:“Eco_dht11”,“ButtonTopic”:“0”,“Power”:1,“PowerOnState”:3,“LedState”:1,“SaveData”:1,“SaveState”:1,“ButtonRetain”:0,“PowerRetain”:0}}
{“StatusPRM”:{“Baudrate”:115200,“GroupTopic”:“sonoffs”,“OtaUrl”:“sonoff”,“Uptime”:18,“Sleep”:0,“BootCount”:17,“SaveCount”:86,“SaveAddress”:“3F6000”}}
{“StatusFWR”:{“Version”:“5.10.0a”,“BuildDateTime”:“2017-12-17T00:05:41”,“Boot”:2,“Core”:“2_3_0”,“SDK”:“1.5.3(aec24ac9)”}}
{“StatusLOG”:{“SerialLog”:2,“WebLog”:2,“SysLog”:0,“LogHost”:"",“LogPort”:514,“SSId1”:“SSID1”,“SSId2”:“SSID2”,“TelePeriod”:300,“SetOption”:“00000109”}}
{“StatusMEM”:{“ProgramSize”:476,“Free”:544,“Heap”:23,“ProgramFlashSize”:4096,“FlashSize”:1024,“FlashMode”:2}}
{“StatusNET”:{“Hostname”:“Eco_dht11-5080”,“IPAddress”:“192.168.1.106”,“Gateway”:“192.168.1.1”,“Subnetmask”:“255.255.255.0”,“DNSServer”:“192.168.1.1”,“Mac”:“XX:XX:XX:XX:XX:XX”,“Webserver”:2,“WifiConfig”:2}}
{“StatusMQT”:{“MqttHost”:“192.168.1.6”,“MqttPort”:1883,“MqttClientMask”:“DVES_%06X”,“MqttClient”:“DVES_01D3D8”,“MqttUser”:"",“MAX_PACKET_SIZE”:512,“KEEPALIVE”:15}}
{“StatusTIM”:{“UTC”:“Mon Dec 18 16:06:23 2017”,“Local”:“Mon Dec 18 17:06:23 2017”,“StartDST”:“Sun Mar 26 02:00:00 2017”,“EndDST”:“Sun Oct 29 03:00:00 2017”,“Timezone”:1}}
{“StatusSNS”:{“Time”:“2017-12-18T17:06:23”,“DHT11”:{“Temperature”:71.6,“Humidity”:36.0},“TempUnit”:“F”}}
{“StatusSTS”:{“Time”:“2017-12-18T17:06:23”,“Uptime”:18,“Vcc”:3.210,“POWER”:“ON”,“Wifi”:{“AP”:1,“SSId”:“SSID1”,“RSSI”:64,“APMac”:“XX:XX:XX:XX:XX:XX”}}}
I don’t need all this to be exported but i would like to potentially export any of the fields. Also I want to ignore the time and let influx use its own timestamp.
How should I configure telegraf.conf?