GithubHelp home page GithubHelp logo

check_meteoalarm's Introduction

check_meteoalarm

This is a Nagios plugin written in PHP to look for weather alerts on the site http://www.meteoalarm.eu. The plugin checks a specific region, which is entered as the full URL of the region as an argument to the script.

The script is released under GNU GPL and hence I can take no responsibility for the correctness of the script. It might not work as expected and should not be be used as a critical tool for weather alerts.

Requirements

PHP version 5 or higher with cURL. To install these packages on Debian/Ubuntu enter sudo apt-get install php5-cli php5-curl. That should be enough to get the script running.

Usage

./check_meteoalarm.php [FULL URL]

For example

./check_meteoalarm.php http://www.meteoalarm.eu/en_UK/0/0/SE002-Sk%E5ne.html

Note that the URL must be the english version (en_UK), otherwise the script can't regex for the correct strings. You can change language on the bottom of the site. Otherwise the direct URL for the english site is http://www.meteoalarm.eu/en_UK/0/0/EU-Europa:.html

Usage within Nagios (on Debian systems)

Step 1: Place the script in /usr/lib/nagios/plugins/

Step 2: Create the following snippet in /etc/nagios3/commands.cfg

define command{
    command_name	check_meteoalarm
	command_line	/usr/lib/nagios/plugins/check_meteoalarm.php $ARG1$
}

Step 3: Create a service definition for a region, for example in your localhost in /etc/nagios3/conf.d/localhost_nagios2.cfg

define service{
    use                             generic-service
    host_name                       localhost
    service_description             Meteoalarm Skane
    check_interval                  15
    retry_interval                  3
    check_command                   check_meteoalarm!'http://www.meteoalarm.eu/en_UK/0/0/SE002-Sk%E5ne.html'
    }

check_meteoalarm's People

Contributors

jackbenny avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.