Skip to content

Instantly share code, notes, and snippets.


David Howland dhowland

  • United States
View GitHub Profile
dhowland /
Last active Apr 9, 2021
Telegraf config for AmbientWeather API

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 for help if you don't have your keys.

The measurement name can be set to anything you want with the name_override parameter.

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