Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
asuknath authored Dec 18, 2016
1 parent 3402c0a commit 7ac7d55
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,37 @@ Update URL
#Step 5
###Add IOS Push Notification and Android FCM Notification

- 1 Download Script from following PHP Script File
- **1** Download Script from following PHP Script File
- https://github.com/asuknath/Nagios-Status-JSON/blob/master/ServerAlarmNotify.php

- 2 Upload File to **Nagios's Plugin Folder**
- **2** Upload File to Nagios's Plugin Folder**
```javascript
/usr/local/nagios/libexec/
```

- 3 Make **ServerAlarmNotify.php** file executable using following command.
- **3** Make **ServerAlarmNotify.php** file executable using following command.
```javascript
chmod +x ServerAlarmNotify.php
```

- 4 Edit **commands.cfg** and add following two commands
- **4** Edit **commands.cfg** and add following two commands. You will find your under settings. Menu -> Setting.
![Settings](https://github.com/asuknath/Nagios-Status-JSON/blob/master/settingsview.jpg)
```javascript
# 'sm-host-push-notify' command definition
define command{
command_name sm-host-push-notify
command_line /usr/local/nagios/libexec/ServerAlarmNotify.php $HOSTNAME$ YOURGROUPKEY $HOSTOUTPUT$ $HOSTSTATE$
command_line /usr/local/nagios/libexec/ServerAlarmNotify.php $HOSTNAME$ YOURGROUPKEY HOST $HOSTSTATE$
}


# 'sm-service-push-notify' command definition
define command{
command_name sm-service-push-notify
command_line /usr/local/nagios/libexec/ServerAlarmNotify.php $HOSTNAME$ YOURGROUPKEY $SERVICEOUTPUT$ $SERVICESTATE$
command_line /usr/local/nagios/libexec/ServerAlarmNotify.php $HOSTNAME$ YOURGROUPKEY SERVICE $SERVICESTATE$
}
```
#
- 5 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.
- **5** 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.
-
```javascript
define contact{
Expand All @@ -94,3 +97,11 @@ define contact{
register 0
}
```
#
- **6** 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.

- **7** If your GROUP API KEY is not showing
- Update URL
- Turn OFF and ON Notification.

0 comments on commit 7ac7d55

Please sign in to comment.