Install And Configure

Step 1

Download and Configure Android OTR ServerAlarms Nagios Client

Step 2

Click Ok to go to Accounts Management View

Step 3

Click on top right + button to add account.

Click on +Server button to add your account.

After successfully verify your Nagios Server account with your Nagios Server, account will be added in the list. Account list will show Server's Notification Group Key, Notification Status and Status.

Step 4

By default account is not Selected. You need to select account to display hosts and services details in the app. Tap on the Account

Step 5

Add IOS Push Notification and Android FCM Notification

  1. Download Script from following PHP Script File

https://github.com/asuknath/Nagios-Status-JSON/blob/master/otrnagiosclient.php

  1. Upload File to Nagios's Plugin Folder

    /usr/local/nagios/libexec/

  2. Make otrnagiosclient.php file executable using following command. chmod +x otrnagiosclient.php

  3. Edit commands.cfg and add following two commands. Get Group Key from Account using and replace YOURGROUPKEY with it.

define command{
    command_name    sm-host-push-notify
    command_line    /usr/local/nagios/libexec/otrnagiosclient.php $HOSTNAME$ YOURGROUPKEY HOST $HOSTSTATE$
}

define command{
    command_name    sm-service-push-notify
    command_line    /usr/local/nagios/libexec/otrnagiosclient.php $HOSTNAME$ YOURGROUPKEY SERVICE $SERVICESTATE$
}

Step 6

Edit templates.cfg file. Modify Contact Templates and add sm-service-push-notify as service notification command and sm-host-push-notify as host notification command.

define contact{
        name                            generic-contact
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    c,r
        host_notification_options       d,r
        service_notification_commands   notify-service-by-email,sm-service-push-notify
        host_notification_commands      notify-host-by-email,sm-host-push-notify
        register                        0                           
        }

Nagios Client Generates GROUP API KEY using Nagios URL

All devices using same URL will get Notification simultaneously.

Every Android/IOS user has option to Turn off Notification for his device only.

If your GROUP API KEY is not showing, please contact [email protected]