Back to Opsview FAQ

Create another Slack notification method

The Slack notification method only supports sending notifications to a single Slack channel. If you would like to send notifications to additional channels, you must create additional Slack notification methods.

To create an additional Slack notification method, you need to first create a variable to specify the webhook URL and channel name. After creating the variable, you can make a new notification method that uses the notify_by_slack command with the new variable. You need to repeat this process for each Slack channel you want to receive notifications.

Prerequisites Copied

Process Copied

  1. Log in to the UI as an administrator and navigate to Configuration > Variables.
  2. Click Add new in the top left of the page to create a new variable. Input the following settings:
Field Value
Name <variable name, e.g. SLACK_2>
Label Arg1 Webhook URL
Default Arg1
Label Arg2 Channel name
Default Arg2 <insert the channel name including the ‘#’, e.g. #opsview>
  1. Click Submit Changes
  2. Navigate to Configuration > Notification Methods.
  3. Click Add new in the top left of the page to create a new notification method. Input the following settings:
Field Value
Name <method name, e.g. Slack 2>
Enable ☑️
Run On <Orchestrator or Collector, as appropriate for your system>
Command notify_by_slack -c '%<VARIABLE_NAME>:1%' -u '%<VARIABLE_NAME>:2%'

Replace <VARIABLE_NAME> with the name set in step 2, e.g. for SLACK_2 you would input notify_by_slack -c '%SLACK_2:1%' -u '%SLACK_2:2%'

Leave all non-specified fields empty.

Testing Copied

You can test the new notification method configuration in the Test tab of the notification method creation dialog.

  1. Click Submit Changes.
  2. Apply changes.
["Geneos"] ["Opsview > Notifications"] ["FAQ"]

Was this topic helpful?