Add the following gems to your Gemfile
:
gem 'activeresource'
gem 'newrelic_api'
Update your bundle:
/* | |
* Add X-Request-Start header so we can track queue times in New Relic RPM beginning at Varnish. | |
* | |
*/ | |
#include <sys/time.h> | |
struct timeval detail_time; | |
gettimeofday(&detail_time,NULL); | |
char start[20]; |
# Based on https://github.com/ripienaar/mcollective-plugins/blob/master/agent/urltest/urltest.rb | |
require 'net/http' | |
require 'socket' | |
req_url = "http://www.google.com" | |
url = URI.parse(req_url) |
require "rubygems" | |
require "json" | |
require "net/http" | |
require "uri" | |
uri = URI.parse("http://api.sejmometr.pl/posiedzenia/BZfWZ/projekty") | |
http = Net::HTTP.new(uri.host, uri.port) | |
request = Net::HTTP::Get.new(uri.request_uri) |
Copyright (c) 2013 Couller Ltd. and Joseph Ray | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated 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, subject to | |
the following conditions: |
#!/usr/bin/env ruby | |
# | |
# check-rackspace-bandwidth-limits | |
# ================================ | |
# | |
# Check the bandwidth usage of a network device on a Rackspace Cloud server | |
# and alert if it is nearing the threshold allowed for the image size. | |
# | |
# Requires sar(1) and sadf(1) to be installed (sysstat package, usually) | |
# |
{ | |
"template" : "logstash-*", | |
"settings" : { | |
"index.refresh_interval" : "5s", | |
"analysis" : { | |
"analyzer" : { | |
"default" : { | |
"type" : "standard", | |
"stopwords" : "_none_" | |
} |
$ curl -XPUT http://127.0.0.1:9200/_template/logstash_per_index -d @file.json |
#!/bin/sh | |
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264 | |
if [ "`/usr/bin/whoami`" != "root" ]; then | |
echo "You need to execute this script as root." | |
exit 1 | |
fi | |
cat > /etc/yum.repos.d/centos.repo<<EOF |
When speaking of the Icecast protocol here, actually it's just the HTTP protocol, and this document will explain further how source clients need to send data to Icecast.
Since Icecast version 2.4.0 there is support for the standard HTTP PUT
method.
The mountpoint to which to send the data is specified by the URL path.