This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type MetricHandler = (MetricName, Map[String, Any]) => String | |
val metricHandlers = Map("counter" -> handleCounter _, "timer" -> handleTimer _, "meter" -> handleMeter _) | |
/* | |
* This is the core function in this class | |
* accept a parsed metric object and delegate it to an appropriate handler | |
*/ | |
def handleMetric(metricMap : Map[String, Any]) : String = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = require('webpage').create(), | |
address, output, size; | |
var tsdb_host = 'opentsdb.sv2.box.net'; | |
var tsdb_port = 4242; | |
var start = '1h-ago'; | |
var metric = 'sum:' + phantom.args[0]; | |
var width = 1280; | |
var height = 720; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Extend Stats class to include Histogram support | |
* borrows heavily from Jesus M Castagnetto's code published here: http://px.sklar.com/code.html?id=119 | |
* @author jcreasy | |
*/ | |
/* | |
* // Original Header | |
* This is a histogram class that accepts and unidimensional array of data | |
* Returns 2 arrays by using the getStats() and getBins() methods. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* DNS Server Class | |
* | |
* @author Jonathan Creasy <[email protected]> | |
* @version 0.1.0 | |
* @package Dns | |
* @subpackage Server | |
* @url http://www.phpclasses.org/browse/file/18217.html | |
* This code is released into the public domain. Feel free to use it and distribute it however you wish. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_tsdb_data($metric, $range = 'hour', $time = '') | |
{ | |
$date_format = 'Y/m/d-H:i:s'; | |
$aggregator = 'sum'; | |
if (empty($time)) { | |
$time = date('U'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: ./create_table.rb tsdb 255 | |
include Java | |
import org.apache.hadoop.hbase.HBaseConfiguration | |
import org.apache.hadoop.hbase.HTableDescriptor | |
import org.apache.hadoop.hbase.client.HBaseAdmin | |
import org.apache.hadoop.hbase.HColumnDescriptor | |
conf = HBaseConfiguration.create | |
conf.set("zookeeper.znode.parent", "/hbase-unsecure"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
unset GIT_DIR | |
REPO_DIR=/var/lib/gitosis/repositories/internal_dns.git | |
CLONE_DIR=/var/named/chroot/var/named/data | |
ERR_OUT=/tmp/named_error.out.$$ | |
if [ ! -e "${CLONE_DIR}/.git" ]; then | |
git clone "$REPO_DIR" "$CLONE_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::magic::register { 'hadoop_datanode_fqdn': | |
value => $fqdn, | |
} | |
::magic::register { 'hadoop_datanode_ip': | |
value => $ip, | |
} | |
$reg = query_registrations('hadoop_datanode_fqdn') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/* | |
Copyright (c) <2005> LISSY Alexandre, "lissyx" <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software andassociated documentation files (the "Software"), to deal in the | |
Software without restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the | |
Software, and to permit persons to whom the Software is furnished to do so, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
BRANCH=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
TARGET=Contegix | |
ISSUE=0 | |
USER=johann8384 | |
while getopts “hi:p:r:l:cf” OPTION | |
do |
OlderNewer