0.0.3 • Published 10 years ago

hubot-mackerel-notifier v0.0.3

Weekly downloads
1
License
Apache2
Repository
-
Last release
10 years ago

hubot-mackerel-notifier Build Status

mackerel.io alert notification from webhook

Screenshot

Alert Notification

npm.io

Hostname hearing

npm.io

Getting Started

  • Setup your hubot
  • Add the script to your hubot.
npm install hubot-mackerel-notifier --save
  • Commit and Push
git commit -a -m 'add hubot-mackerel-notifier'
git push
heroku config:add HUBOT_MACKEREL_API_KEY="..."
heroku config:add HUBOT_MACKEREL_HOST_REGEXP="\\b[a-zA-Z0-9._-]+[.]local-domain\\b"
heroku config:add HUBOT_MACKEREL_ORG_NAME="exmaple"
heroku config:add HUBOT_MACKEREL_NOTIFIER_ROOM="#general"
  • Deploy your bot:
git push heroku master
  • Enjoy!

Configuration

This script uses following environment variables:

  • HUBOT_MACKEREL_API_KEY
    • API Key of Mackerel
  • HUBOT_MACKEREL_HOST_REGEXP
    • Regular expression for identifing host FQDN, like "\ba-zA-Z0-9._-+.example.com\b"
  • HUBOT_MACKEREL_ORG_NAME
    • Organization name
  • HUBOT_MACKEREL_NOTIFIER_ROOM
    • target room to send notifications

Example

export HUBOT_MACKEREL_API_KEY="..."
export HUBOT_MACKEREL_HOST_REGEXP="\\b[a-zA-Z0-9._-]+[.]local-domain\\b"
export HUBOT_MACKEREL_ORG_NAME="exmaple"
export HUBOT_MACKEREL_NOTIFIER_ROOM="#general"

Another example for heroku

heroku config:add HUBOT_MACKEREL_API_KEY="..."
heroku config:add HUBOT_MACKEREL_HOST_REGEXP="\\b[a-zA-Z0-9._-]+[.]local-domain\\b"
heroku config:add HUBOT_MACKEREL_ORG_NAME="exmaple"
heroku config:add HUBOT_MACKEREL_NOTIFIER_ROOM="#general"
0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago