Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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