grafana.JPG
Improvement of this dashboard : https://grafana.com/grafana/dashboards/12359
Get your API key from https://www.iqair.com/dashboard/api
and replace <AIRVISUAL_API_KEY>
in config. Restart Telegraf or his container.
Please, remember - API Key valid for one year! After that time you need to get new one and update configs! And limit 10k request / month.
Also, for sure update urls
by list of cities you need, and don't forget to update dashboard queries related to your cities configuration.
Collector Configuration Details
[[inputs.http]]
urls = [
'https://api.airvisual.com/v2/city?city=Kyiv&state=Kyiv&country=Ukraine&key=<AIRVISUAL_API_KEY>',
'https://api.airvisual.com/v2/nearest_city?lat=50.444177&lon=30.165550&key=<AIRVISUAL_API_KEY>',
'https://api.airvisual.com/v2/city?city=Irpin&state=Kyiv&country=Ukraine&key=<AIRVISUAL_API_KEY>',
'https://api.airvisual.com/v2/city?city=Lviv&state=Lviv&country=Ukraine&key=<AIRVISUAL_API_KEY>',
'https://api.airvisual.com/v2/city?city=Odessa&state=Odessa&country=Ukraine&key=<AIRVISUAL_API_KEY>'
]
data_format = "json"
tag_keys = [ "data_location_coordinates_0", "data_location_coordinates_1", "data_country", "data_state", "data_city" ]
json_string_fields = [ "data_current_pollution_aqius", "data_current_pollution_aqicn" ]
json_time_key = "data_current_pollution_ts"
json_time_format = "2006-01-02T15:04:05Z07:00"
name_override = "airvisual"
### Limit 10k request / month by airvisual
interval = "1h"