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.

  • App will verify your account.
  • All will get notification status and Group API Key from our notification server.

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.

  • Group Key will be required for push notificaiton. You will need to configure this key in your Nagios server.
  • Notification Status - Push Notification status for this deivce only.
  • Status
    • ACTIVE - Account is active and you will get push notification.
    • SELECTED - This account app will display hosts and services details. You will be switch account.

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

  • SHARE - Share Nagios Server's address and Group Key with popular Messaging app or email app.
  • SELECT SERVER - Select this account to display Hosts and Services details.
  • NOTIFICAITON ON - Turn notificaton on only for this device.
  • NOTIFICAITON OFF - Turn notificaton off only for this device.
  • DELETE - Delete this 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]

This page was last edited on 2021-05-26 05:09

This page was last edited on 2021-05-26 05:09

ottrun
OttRun.Com © 2021. All rights reserved