Skip to content

ibm-cloud-solutions/hubot-ibmcloud-redis

Repository files navigation

Build Status Coverage Status Dependency Status npm

hubot-ibmcloud-redis

A hubot script for monitoring your use of Redis.

Getting Started

Usage

If you are new to Hubot visit the getting started content to get a basic bot up and running. Next, follow these steps for adding this external script into your hubot:

  1. cd into your hubot directory
  2. Install this package via npm install @ibm/hubot-ibmcloud-redis --save
  3. Add @ibm/hubot-ibmcloud-redis to your external-scripts.json
  4. Add the necessary environment variables:
export HUBOT_IBMCLOUD_REDIS_HOST=<Redis server hostname>
export HUBOT_IBMCLOUD_REDIS_PORT=<Redis server port>
export HUBOT_IBMCLOUD_REDIS_PASSWORD=<Optional -- Redis server password>
  1. Start up your bot & off to the races!

Commands

  • hubot redis check ttls - Check to see if keys exist without a defined expiration.
  • hubot redis monitor ttls - Monitor keys regularly to see if any are defined without an expiration.
  • hubot redis monitor cancel - Disable the monitoring of Redis.
  • hubot redis slowlog - Check Redis for any slow running commands.

Hubot Adapter setup

Hubot supports a variety of adapters to connect to popular chat clients. For more feature rich experiences you can setup the following adapters:

Cognitive Setup

This project supports natural language interactions using Watson and other Bluemix services. For more information on enabling these features, refer to Cognitive Setup.

Development

Please refer to the CONTRIBUTING.md before starting any work. Steps for running this script for development purposes:

Configuration setup

  • Create config folder in root of this project.
  • create env in the config folder
  • env contents:
export HUBOT_IBMCLOUD_REDIS_HOST=<Redis server hostname>
export HUBOT_IBMCLOUD_REDIS_PORT=<Redis server port>
export HUBOT_IBMCLOUD_REDIS_PASSWORD=<Optional -- Redis server password>

In order to view content in chat clients you will need to add @ibm/hubot-ibmcloud-formatter to your external-scripts.json file. Additionally, if you want to use hubot-help to make sure your command documentation is correct:

  • create external-scripts.json in the root of this project
[
	"hubot-help",
	"@ibm/hubot-ibmcloud-formatter"
]

Lastly, run npm install to obtain all the dependent node modules.

Running Hubot with adapters

Hubot supports a variety of adapters to connect to popular chat clients.

If you just want to use:

License

See LICENSE.txt for license information.

Contribute

Please check out our Contributing Guidelines for detailed information on how you can lend a hand.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published