This is the most straightforward config for parsing the Ambient Weather API into a time series database with Telegraf. I use InfluxDB to store the data and Grafana to view the data.
Note that this is not a complete Telegraf config. What follows is a fragment that you would add to the bottom of your telegraf.conf file. You must set up Influx yourself.
You MUST replace the
xxxxxxxx strings in the
urls parameter with your personal Application key and API key. See https://www.ambientweather.com/api.html for help if you don't have your keys.
The measurement name can be set to anything you want with the
The devices endpoint gives data for all weather stations associated with your account, but this config simply takes the first one. This is done with the
json_query = "0.lastData" line. Other devices could be selected by changing the
0 to another number. Properly handling multiple weather stations is too complex for any sane config of the http plugin for Telegraf. Hard