mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Revert switch to metric system 7e0a33e4
This commit is contained in:
parent
782c813887
commit
32d620ccf3
@ -19,10 +19,11 @@
|
|||||||
# env.apikey XYZ
|
# env.apikey XYZ
|
||||||
|
|
||||||
location=$(printf '%s' "${0#*_}" | tr '_' '=')
|
location=$(printf '%s' "${0#*_}" | tr '_' '=')
|
||||||
query_string="${location}&appid=${apikey}&units=metric"
|
query_string="${location}&appid=${apikey}"
|
||||||
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}")
|
||||||
|
KELVIN_BIAS=273
|
||||||
|
|
||||||
CITY=$( expr "$OWAPI" : '.*\<city.*name=\"\(.*\)\"><coord.*' )
|
CITY=$( expr "$OWAPI" : '.*\<city.*name=\"\(.*\)\"><coord.*' )
|
||||||
|
|
||||||
@ -35,6 +36,7 @@ then
|
|||||||
graph_category sensors
|
graph_category sensors
|
||||||
graph_info This graph show the temperature in ${CITY}
|
graph_info This graph show the temperature in ${CITY}
|
||||||
temp_avg.label avg
|
temp_avg.label avg
|
||||||
|
temp_avg.cdef temp_avg,$KELVIN_BIAS,-
|
||||||
|
|
||||||
multigraph $plugin_name.temp
|
multigraph $plugin_name.temp
|
||||||
graph_title Temperature in ${CITY}
|
graph_title Temperature in ${CITY}
|
||||||
@ -42,8 +44,11 @@ then
|
|||||||
graph_category sensors
|
graph_category sensors
|
||||||
graph_info This graph show the temperature in ${CITY}
|
graph_info This graph show the temperature in ${CITY}
|
||||||
temp_avg.label avg
|
temp_avg.label avg
|
||||||
|
temp_avg.cdef temp_avg,$KELVIN_BIAS,-
|
||||||
temp_min.label min
|
temp_min.label min
|
||||||
|
temp_min.cdef temp_min,$KELVIN_BIAS,-
|
||||||
temp_max.label max
|
temp_max.label max
|
||||||
|
temp_max.cdef temp_max,$KELVIN_BIAS,-
|
||||||
|
|
||||||
multigraph $plugin_name.humidity
|
multigraph $plugin_name.humidity
|
||||||
graph_title Humidity in ${CITY}
|
graph_title Humidity in ${CITY}
|
||||||
@ -51,14 +56,14 @@ then
|
|||||||
graph_category sensors
|
graph_category sensors
|
||||||
graph_args --upper-limit 100 --lower-limit 0
|
graph_args --upper-limit 100 --lower-limit 0
|
||||||
graph_info This graph show the humidity in ${CITY}
|
graph_info This graph show the humidity in ${CITY}
|
||||||
humi.label humidity
|
field_humidity.label humidity
|
||||||
|
|
||||||
multigraph $plugin_name.pressure
|
multigraph $plugin_name.pressure
|
||||||
graph_title Pressure in ${CITY}
|
graph_title Pressure in ${CITY}
|
||||||
graph_vlabel hPa
|
graph_vlabel hPa
|
||||||
graph_category sensors
|
graph_category sensors
|
||||||
graph_info This graph show the pressure in ${CITY}
|
graph_info This graph show the pressure in ${CITY}
|
||||||
press.label pressure
|
field_pressure.label pressure
|
||||||
|
|
||||||
multigraph $plugin_name.wind_speed
|
multigraph $plugin_name.wind_speed
|
||||||
graph_title Wind Speed in ${CITY}
|
graph_title Wind Speed in ${CITY}
|
||||||
@ -101,10 +106,10 @@ cat <<- EOF
|
|||||||
temp_max.value $TEMP_MAX
|
temp_max.value $TEMP_MAX
|
||||||
|
|
||||||
multigraph $plugin_name.humidity
|
multigraph $plugin_name.humidity
|
||||||
humi.value $HUMIDITY
|
field_humidity.value $HUMIDITY
|
||||||
|
|
||||||
multigraph $plugin_name.pressure
|
multigraph $plugin_name.pressure
|
||||||
press.value $PRESSURE
|
field_pressure.value $PRESSURE
|
||||||
|
|
||||||
multigraph $plugin_name.wind_speed
|
multigraph $plugin_name.wind_speed
|
||||||
speed.value $WD_SPEED
|
speed.value $WD_SPEED
|
||||||
|
Loading…
Reference in New Issue
Block a user