1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

Add missing apiid in URL

This commit is contained in:
kaliko 2017-05-29 13:50:38 +02:00
parent edb7a1f991
commit 8893cfa8a1

View file

@ -16,9 +16,10 @@
## From Oct 9 2015 OpenWeather needs you to register and get an APIKEY ## From Oct 9 2015 OpenWeather needs you to register and get an APIKEY
# include this key by setting 'env.apikey' in munin plugin config, i.e.: # include this key by setting 'env.apikey' in munin plugin config, i.e.:
# [openweather_*] # [openweather_*]
# env.apikey XYZ # env.owapikey XYZ
query_string=$(printf '%s' "${0#*_}" | tr '_' '=') query_string=$(printf '%s' "${0#*_}" | tr '_' '=')
query_string="$query_string&appid=$owapikey"
plugin_name=$( basename $0 ) plugin_name=$( basename $0 )
OWAPI=$( curl -s "http://api.openweathermap.org/data/2.5/weather?mode=xml&${query_string}") OWAPI=$( curl -s "http://api.openweathermap.org/data/2.5/weather?mode=xml&${query_string}")