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 | |
DATAFILE="/var/tmp/nagios_check_forkrate.dat" | |
VALID_INTERVAL=600 | |
OK=0 | |
WARNING=1 | |
CRITICAL=2 | |
UNKNOWN=-1 |
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 | |
# Show the rate of swapping (in number of pages) between executions | |
OK=0 | |
WARNING=1 | |
CRITICAL=2 | |
UNKNOWN=-1 | |
EXITFLAG=$OK | |
WARN_THRESHOLD=1 |
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 | |
# | |
# ************************************************* | |
# chkconfig: 2345 99 99 | |
# description: notify email address on system boot. | |
# ************************************************* | |
# Installing: | |
# 1) save as /etc/rc.d/init.d/notify | |
# 2) set the desired email address in "MAILADD" variable | |
# 3) chmod a+w /etc/rc.d/init.d/notify |
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
20 homebase = "/Users/sureshprajapati/chef/dirty/dirty-chef" | |
21 #config.vm.synced_folder "/Users/sureshprajapati/chef/dirty/dirty-chef/cookbooks", "/cookbooks" | |
22 config.vm.provision "chef_solo" do |chef| | |
23 ¦ chef.cookbooks_path = "#{homebase}/cookbooks" | |
24 ¦ #chef.run_list = [ "recipe[dirty::default]" ] | |
25 ¦ chef.add_recipe "dirty::default" | |
26 ¦ chef.log_level = :debug | |
27 ¦ chef.verbose_logging = :true | |
28 end |
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
[2014-02-09T13:33:52+01:00] INFO: Processing directory[/home/oper/.ssh] action create (dirty::example11 line 24) | |
================================================================================ | |
Error executing action `create` on resource 'directory[/home/oper/.ssh]' | |
================================================================================ | |
Chef::Exceptions::EnclosingDirectoryDoesNotExist | |
------------------------------------------------ | |
Parent directory /home/oper does not exist, cannot create /home/oper/.ssh |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "precise64" |
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
homebase = "/path/to/homebase" | |
Vagrant::Config.run do |config| | |
config.vm.box = "opscode-ubuntu-12.04-chef11" | |
config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.2.0.box" # from https://github.com/opscode/bento | |
config.vm.network :hostonly, "10.111.222.33" | |
config.vm.customize ["modifyvm", :id, "--memory", 2048] | |
config.vm.provision :chef_solo do |chef| | |
# chef.log_level = :debug | |
chef.cookbooks_path = "#{homebase}/cookbooks" |
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 | |
# call like this on the target server: | |
# NODENAME='foo' CHEF_ENV='production' RUNLIST='["role[foo]","recipe[bar]"]' CHEFREPO='git@example.com:repo.git' bash <( curl -L https://raw.github.com/gist/1026628 ) | |
# You will need to ensure that the ssh key is already set up on the server. | |
set -e | |
export CHEF_DIR="${HOME}/chef" | |
sudo rm -rf $CHEF_DIR | |
mkdir -p "$CHEF_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
Vagrant.configure("2") do |config| | |
config.vm.provider :aws do |aws| | |
aws.access_key_id = ### | |
aws.secret_access_key = ### | |
aws.keypair_name = ### | |
aws.ssh_private_key_path = ### | |
aws.region = 'us-east-1' | |
aws.security_groups = #### |
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
Step 1. | |
Edit /etc/security/limits.conf | |
Step 2. | |
Notice this is set to all processes but if you have a process running as a service account replace the * with the service account. | |
Step 3. | |
Next, you will have to restart the process for this change to go into effect. | |
# vi /etc/security/limits.conf |
OlderNewer