Skip to content

Instantly share code, notes, and snippets.

View andre's full-sized avatar

Andre Lewis andre

View GitHub Profile

Keybase proof

I hereby claim:

  • I am andre on github.
  • I am alewis (https://keybase.io/alewis) on keybase.
  • I have a public key ASD01o6BN0D9I5fD0vid_1wsLHzlIrv6Xjk3mkdmleYeVwo

To claim this, I am signing this object:

FROM ubuntu:trusty
RUN apt-get update && apt-get install -y ruby ruby-dev gcc make curl
RUN gem install sinatra --no-rdoc --no-ri
ADD . /srv/
# start it up
WORKDIR /srv/
$VERBOSE = false
require 'benchmark'
require 'net/http'
require 'net/https'
require 'uri'
class UrlMonitor < Scout::Plugin
include Net
OPTIONS=<<-EOS
@andre
andre / hipchat.md
Last active December 19, 2015 14:38
Hipchat notifications

HipChat Notifications

Is email just not fast enough? Do you want instant notification of Scout alerts in your HipChat room? We've added a direct integration to HipChat:

Setup is just what you'd expect - provide your API token (a notification token is fine) and the room name or ID:

$VERBOSE=false
require "time"
require "digest/md5"
require "bson"
# MongoDB Slow Queries Monitoring plug in for scout.
# Created by Jacob Harris, based on the MySQL slow queries plugin
class ScoutMongoSlow < Scout::Plugin
needs "mongo"
name "scout"
maintainer "CHANGE ME"
homepage "CHANGEME.com"
replaces "scout"
install_path "/opt/scout"
build_version Omnibus::BuildVersion.new.semver
build_iteration 1
# creates required build directories
$VERBOSE=false
require "time"
require "digest/md5"
# MongoDB Slow Queries Monitoring plug in for scout.
# Created by Jacob Harris, based on the MySQL slow queries plugin
class ScoutMongoSlow < Scout::Plugin
needs "mongo"
$VERBOSE=false
require "time"
require "digest/md5"
# MongoDB Slow Queries Monitoring plug in for scout.
# Created by Jacob Harris, based on the MySQL slow queries plugin
class ScoutMongoSlow < Scout::Plugin
needs "mongo"
require "time"
require "digest/md5"
# MySQL Slow Queries Monitoring plug in for scout.
# Created by Robin "Evil Trout" Ward for Forumwarz, based heavily on the Rails Request
# Monitoring Plugin.
#
# See: http://blog.forumwarz.com/2008/5/27/monitor-slow-mysql-queries-with-scout
#
# Example line from a slow queries log file:
0.01
0.45
0.45
0.45
0.45
4.95
4.95
4.95
4.95
4.95