randomhost/icinga-notification

Provides common notification commands for the randomhost/icinga package.

1.0.1 2025-08-02 12:12 UTC

This package is auto-updated.

Last update: 2025-08-02 12:13:21 UTC


README

Build Status

randomhost/icinga-notification

1. Purpose

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

2. Usage

CmDotCom is currently the only available notification plugin.

2.1. CM.com

Sends notifications using CM.com.

2.1.1. Usage Example

<?php

use randomhost\Icinga\Notification\CmDotCom\Factory;

include $_composer_autoload_path ?? __DIR__.'/../../vendor/autoload.php';

$notification = (new Factory())->getNotification();
$notification
    ->setOptions(
        getopt(
            $notification->getShortOptions(),
            $notification->getLongOptions()
        )
    )
    ->run()
;

echo $notification->getMessage();

exit($notification->getCode());

This will instantiate the CM.com notification plugin and send a text message to the phone number provided on the command line.

2.1.2. 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
--phone Phone number in international format (e.g. +12065550199)
--apikey CM.com API key

3. License

See LICENSE.txt for full license details.