Skip to content

Instantly share code, notes, and snippets.

View andre's full-sized avatar

Andre Lewis andre

View GitHub Profile
#!/bin/bash
# This is the current stable release to default to, with Omnibus patch level (e.g. 10.12.0-1)
# Note that the chef template downloads 'x.y.z' not 'x.y.z-r' which should be a duplicate of the latest -r
use_shell=0
prerelease="false"
# Check whether a command exists - returns 0 if it does, 1 if it does not
exists() {
# A Scout plugin to perform simple count of files in a directory using regex.
#
# path - Provide the path to a directory you would like to check.
# file_regex - Provide the regex you want to use to look for file under the path.
# http://ruby-doc.org/core-2.0/Dir.html#method-c-glob
#
# Created by Gerric Chaplin <[email protected]>
class SimpleFileCount < Scout::Plugin
OPTIONS=<<-EOS
# MySQL Statistics by Eric Lindvall <[email protected]>
# MySQLTuner integration by Andre Lewis <@[email protected]>
class MysqlQueryStatistics < Scout::Plugin
ENTRIES = %w(Com_insert Com_select Com_update Com_delete)
require 'shellwords'
OPTIONS=<<-EOS
user:
name: MySQL username
@andre
andre / php_fpm_status.rb
Created May 30, 2013 16:47
added connections per second
class PHPFpmStatus < Scout::Plugin
needs 'open-uri', 'json'
OPTIONS=<<-EOS
url:
name: FPM Status Url
default: "http://localhost/status?json"
EOS
def build_report
0.01
0.45
0.45
0.45
0.45
4.95
4.95
4.95
4.95
4.95
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:
$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"
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"
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"