Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_openweathermap
0.0.4
2018-02-03
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
Apache
36530
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Until / if we get a general purpose API key by owm.org, you might need to register for a (free) API key on their website and supply it as a plugin parameter.
For more info see: http://openweathermap.org/faq#error401
root@yourhost:/yournagioscontribdir# ./check_openweathermap.pl
usage: ./check_openweathermap.pl [api-key]
locationstring is usually 'townname,countrytld' (ie. Wuerzburg,de or London,uk),
but can be id= as well.
wantedinfo is either 'all' or one of the following:
sys-country,sys-sunrise,sys-sunset (in epoch time)
weather-main (ie. 'Clouds'), weather-description (ie. 'Broken clouds'), clouds-all (ie. '68' percent)
main-temp,main-humidity,main-pressure,main-temp_min,main-temp_max,wind-speed,wind-gust,wind-deg (just the stated)
name (name of location), coord-lat (latitude of location), coord-lon (longitude of location), id (id of weatherstation)
perfdata is being created with all available data, all the time.
if you are getting an error, you probably need a (supposedly free) API key.
see here for more info: http://openweathermap.org/faq#error401
## NAGIOS COMMANDS SETUP
define command{
command_name check_openweathermap
command_line $USER1$/contrib/check_openweathermap.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
}
## NAGIOS SERVICE SETUP
define service{
name owm-service
use local-service
normal_check_interval 10
retry_check_interval 5
register 0
}
define service{
use owm-service ; or owm-service-pnp, if you have pnp4nagios integrated and use that templatename
host_name yourhost
service_description Weather myplace
check_command check_openweathermap!London,uk!name,temp-current,humidity-current,wind-current,clouds,pressure-current
}
For the pnp4nagios related files (check_command entry as well as the graph-template), check the archive you got this script in.
check_openweathermap v0.0.3 is licensed under Creative Commons Attribution-ShareAlike 4.0 Unported License.
There is no warranty of any kind, explicit or implied, for anything this software does or does not do.
(c) 2013-2017 by Frederic Krueger / igetspam@bigfoot.com
usage: ./check_openweathermap.pl
locationstring is usually 'townname,countrytld' (ie. Wuerzburg,de or London,uk),
but can be id=
wantedinfo is either 'all' or one of the following:
sys-country,sys-sunrise,sys-sunset (in epoch time)
weather-main (ie. 'Clouds'), weather-description (ie. 'Broken clouds'), clouds-all (ie. '68' percent)
main-temp,main-humidity,main-pressure,main-temp_min,main-temp_max,wind-speed,wind-gust,wind-deg (just the stated)
name (name of location), coord-lat (latitude of location), coord-lon (longitude of location), id (id of weatherstation)
perfdata is being created with all available data, all the time.
if you are getting an error, you probably need a (supposedly free) API key.
see here for more info: http://openweathermap.org/faq#error401
## NAGIOS COMMANDS SETUP
define command{
command_name check_openweathermap
command_line $USER1$/contrib/check_openweathermap.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
}
## NAGIOS SERVICE SETUP
define service{
name owm-service
use local-service
normal_check_interval 10
retry_check_interval 5
register 0
}
define service{
use owm-service ; or owm-service-pnp, if you have pnp4nagios integrated and use that templatename
host_name yourhost
service_description Weather myplace
check_command check_openweathermap!London,uk!name,temp-current,humidity-current,wind-current,clouds,pressure-current
}
For the pnp4nagios related files (check_command entry as well as the graph-template), check the archive you got this script in.
check_openweathermap v0.0.3 is licensed under Creative Commons Attribution-ShareAlike 4.0 Unported License.
There is no warranty of any kind, explicit or implied, for anything this software does or does not do.
(c) 2013-2017 by Frederic Krueger / igetspam@bigfoot.com
Reviews (1)
byrm, October 14, 2015
Works like a charm!
Since 09.10.2015 you need an API-Key.
Adjust the URL in Line 32 and 33 with "&APPID=".
You need to obtain a key by registering at openweathermap.org
Maybe Plugin Author can register and obtain a Key for FOSS?
Since 09.10.2015 you need an API-Key.
Adjust the URL in Line 32 and 33 with "&APPID=".
You need to obtain a key by registering at openweathermap.org
Maybe Plugin Author can register and obtain a Key for FOSS?
Owner's reply
Finally got around to fixing the plugin. Also, the "all" feature now actually works, and some sanitization around http errors was included. A general purpose API key has been requested, and maybe we get lucky. Until then, use an account of your own on their site. Cheers! :)