Skip to content

Provides common notification commands for the randomhost/icinga package

License

Notifications You must be signed in to change notification settings

randomhost/icinga-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

randomhost/icinga-notification

This package provides a set of common notification commands to a accompany the randomhost/icinga package.

Usage

NotifyMyAndroid is currently the only available notification plugin but more will follow in the future.

NotifyMyAndroid

Sends notifications using NotifyMyAndroid.

Usage example

<?php
namespace randomhost\Icinga\Notification;

require_once '/path/to/vendor/autoload.php';

use randomhost\NotifyMyAndroid\Client as NmaClient;

$nmaClient = new NmaClient();

$notification = new NotifyMyAndroid($nmaClient);
$notification->setOptions(
    getopt(
        $notification->getShortOptions(),
        $notification->getLongOptions()
    )
);
$notification->run();

echo $notification->getMessage();
exit($notification->getCode());

This will instantiate the NotifyMyAndroid notification plugin and send a push notification to the NMA API key provided on the command line.

Command line parameters

Parameter Description
--type Notification type
--service Service name
--host Host name
--address Host address
--state Service state
--time Notification time
--output Check plugin output
--apikey NotifyMyAndroid API key

License

See LICENSE.txt for full license details.

About

Provides common notification commands for the randomhost/icinga package

Topics

Resources

License

Stars

Watchers

Forks

Languages