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:
parent
edb7a1f991
commit
8893cfa8a1
1 changed files with 2 additions and 1 deletions
|
@ -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}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue