diff --git a/README.md b/README.md index 469b83c..38c61bd 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Assuming you are using Nagios 4, the steps are: 1. Copy _mattermost.py_ to /usr/local/nagios/libexec. 2. Create the notification command: + define command { command_name notify-service-by-mattermost command_line /usr/local/nagios/libexec/mattermost.py --url [URL] --hostalias "$HOSTNAME$" --notificationtype "$NOTIFICATIONTYPE$" --servicedesc "$SERVICEDESC$" --servicestate "$SERVICESTATE$" --serviceoutput "$SERVICEOUTPUT$" @@ -15,7 +16,10 @@ Assuming you are using Nagios 4, the steps are: command_name notify-host-by-mattermost command_line /usr/local/nagios/libexec/mattermost.py --url [URL] --hostalias "$HOSTNAME$" --notificationtype "$NOTIFICATIONTYPE$" --hoststate "$HOSTSTATE$" --hostoutput "$HOSTOUTPUT$" } + 3. Create the contact: + + define contact { contact_name mattermost alias Mattermost @@ -28,6 +32,8 @@ Assuming you are using Nagios 4, the steps are: } 4. Add the contact to a contact group: + + define contactgroup{ contactgroup_name network-admins alias Network Administrators