npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hubot-xmatters

v0.0.3-0

Published

A hubot script to send events to xMatters and listen for callbacks.

Downloads

4

Readme

hubot-xmatters

A hubot script to send events to xMatters and listen for callbacks.

See src/xmatters.js for code documentation. For full installation instructions and the Communication Plan, head over here.

Installation

Hubot

In hubot project repo, run:

npm install hubot-xmatters --save

Then add hubot-xmatters to your external-scripts.json, for example:

[
  "hubot-xmatters"
]

xMatters

  1. Download the Hubot Communications Plan from the xMatters website here
  2. Create a new REST Web Service User
  3. Set the credentials in the appropriate environment variables:

EXPRESS_PORT - The port hubot will listen on for callbacks from xMatters EXPRESS_USER - Username for basic authentication from xMatters EXPRESS_PASSWORD - Password for basic authentication from xMatters EXPRESS_ADDRESS - Hostname and protocol for xMatters to make callbacks

XMATTERS_REST_USERNAME - Username of the user to authenticate to xMatters XMATTERS_REST_PASSWORD - Password of the user to authenticate to xMatters XMATTERS_URL - The xMatters web service URL endpoint for sending events (retrieved from the form, as explained above).

Per hubot standard startup, these are generally set as environment variables when the bot is started. For example:

EXPRESS_PORT=8080 EXPRESS_USER="xMatters" EXPRESS_PASSWORD="xMatters" EXPRESS_ADDRESS="http://myhubothost.company.com" XMATTERS_REST_USERNAME="xBot" XMATTERS_REST_PASSWORD="xBot" XMATTERS_URL="https://instance.dc.xmatters.com/reapi/2015-04-01/forms/UUID-HERE/triggers" HUBOT_SLACK_TOKEN=slack-token-here ./bin/hubot --adapter slack

Usage

Once hubot is logged in, several new commands will be available. Note that in both of these commands, the second parameter must be enclosed in "s.

  1. hubot send event "<groups|users>" <message> - Send an event to a list of users or groups comma separated with a message
  2. hubot send event "all" <message> - Send an event to all users in the channel/room. Note that the slack names need to match the xMatters usernames

Sample Interaction

tdepuy>> hubot send event "Database,tdepuy" The server room is on fire! Save the DB!
hubot>> Event "1360008" created!
hubot>> xM Event 1360008: has a status of active
hubot>> xM Event 1360008: Delivered Work Phone to tdepuy
hubot>> xM Event 1360008: tdepuy responded "Ack" on Work Email