This file contains hidden or 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 | |
// Simple socket server | |
// See http://php.net/manual/en/function.stream-socket-server.php | |
$port = $argv[1]; | |
$mysql_port = $argv[2]; | |
$mysql = "/usr/bin/mysql"; | |
$query = "SHOW SLAVE STATUS"; | |
function set_weight($lag){ | |
# Write your own rules here | |
if ($lag == 'NULL'){ |
This file contains hidden or 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 | |
name="chefdk-0.3.2-1" | |
dmg="https://opscode-omnibus-packages.s3.amazonaws.com/mac_os_x/10.8/x86_64/${name}.dmg" | |
pkg="${name}.pkg" | |
mnt="/Volumes/Chef Development Kit" | |
test -f ${name}.dmg||curl -O ${dmg} | |
hdiutil attach ${name}.dmg |
This file contains hidden or 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
include_recipe "apache" | |
include_recipe "php" | |
# Just to make it clear ;) | |
node.default["myface"]["template"] = "production.conf.erb" | |
if node.recipes.include?("myface::dev") | |
include_recipe "myface::dev" | |
end |
This file contains hidden or 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
do shell script "xcode-select --install" | |
do shell script "sleep 1" | |
tell application "System Events" | |
tell process "Install Command Line Developer Tools" | |
keystroke return | |
click button "Agree" of window "License Agreement" | |
end tell | |
end tell |
This file contains hidden or 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
file "/opt/local-user.txt" do | |
action :create | |
owner "root" | |
group "root" | |
content "jmara" | |
mode 00644 | |
end | |
if File.exist?("/opt/local-user.txt") | |
user = File.read("/opt/local-user.txt") |
This file contains hidden or 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
Control a VIP based on a location constrain but not the actual resource ... | |
node $id="55f27a97-c277-4287-997e-79da9ebfe879" node-1 | |
node $id="bd7d0d7a-4e5a-43f7-9065-24ee3da8617d" node-2 | |
primitive apache lsb:apache2 \ | |
meta is-managed="false" \ | |
op monitor interval="60s" |
This file contains hidden or 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
wget http://labs.consol.de/wp-content/uploads/2011/08/check_mysql_health-2.1.7.tar.gz | |
tar xfz check_mysql_health-2.1.7.tar.gz | |
cd check_mysql_health-2.1.7/ | |
./configure | |
make && make install | |
Depends on Perl MySQL DBI / DBD | |
English docs: http://labs.consol.de/lang/en/nagios/check_mysql_health/ |
NewerOlder