0.0.3 • Published 11 years ago
hubot-mackerel-notifier v0.0.3
hubot-mackerel-notifier 
mackerel.io alert notification from webhook
Screenshot
Alert Notification

Hostname hearing

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- Add the config variables, like:
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"