Download and Configure Android OTR ServerAlarms Nagios Client
Click Ok to go to Accounts Management View
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.
By default account is not Selected. You need to select account to display hosts and services details in the app. Tap on the Account
Add IOS Push Notification and Android FCM Notification
https://github.com/asuknath/Nagios-Status-JSON/blob/master/otrnagiosclient.php
Upload File to Nagios's Plugin Folder
/usr/local/nagios/libexec/
Make otrnagiosclient.php file executable using following command.
chmod +x otrnagiosclient.php
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$
}
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]