Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hillaryfraley
Last active July 8, 2021 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hillaryfraley/838a046821171b1a37d0dafb16584518 to your computer and use it in GitHub Desktop.
Save hillaryfraley/838a046821171b1a37d0dafb16584518 to your computer and use it in GitHub Desktop.
Open `sensu-slack-handler.json` and edit definition using Vi/Vim

These instructions explain how to open sensu-slack-handler.json and edit the definition using Vi/Vim.

NOTE: You can use any text editor you'd like for this step. These instructions are intended to help users who may not know how to open and edit the definition.

1. Open the JSON file. vi sensu-slack-handler.json

2. Start "insert" mode so you can add and replace text. i

3. Using your keyboard arrows to navigate, make these changes in the text.

  • Replace the value for KEEPALIVE_SLACK_WEBHOOK with your webhook URL.

  • Replace the value for KEEPALIVE_SLACK_CHANNEL with the name of your Slack channel.

  • Inside the runtime_assets brackets ([]), type "sensu-slack-handler" (including the quotation marks).

    Type the text you want to add rather than copying and pasting.

4. Press esc to exit "insert" mode.

5. Type :w to save your changes.

6. Type :q to quit back to sensuctl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment