Skip to content

Instantly share code, notes, and snippets.

View bryanwb's full-sized avatar

Bryan Berry bryanwb

View GitHub Profile
# curl 'http://localhost:9200/_cluster/health/logstash-2013.03.08'
{"cluster_name":"elasticsearch","status":"red","timed_out":false,"number_of_nodes":3,"number_of_data_nodes":1,"active_primary_shards":0,"active_shards":0,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":10}[root@hqlprtcdrlog2 var]# curl 'http://168.202.5.149:9200/_cluster/health/logstash-2013.03.08?pretty=true'
{
"cluster_name" : "elasticsearch",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 3,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
log4j, [2013-03-07T07:38:57.034] WARN: org.elasticsearch.discovery.zen: [Captain Omen] received a cluster state from [[myhost.example.org][gN2kuDYIQb6RayuPu4P5pg][inet[/xxx.xxx.xxx.xxx:9300]]{max_local_storage_nodes=1}] and not part of the cluster, should not happen
# curl 'http://localhost:9200/_cluster/health?pretty=true'
{
"cluster_name" : "elasticsearch",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 3,
"number_of_data_nodes" : 1,
"active_primary_shards" : 876,
"active_shards" : 876,
"relocating_shards" : 0,
log4j, [2013-03-06T16:57:34.884] WARN: org.elasticsearch.discovery.zen: [Jarella] received a cluster state from [[foo.example.com][u-0mYTeXSLyu_ZXtvJ_2kA][inet[/xxx.xxx.xxx.xxx:9300]]{max_local_storage_nodes=1}] and not part of the cluster, should not happen
log4j, [2013-03-06T16:57:34.884] WARN: org.elasticsearch.discovery.zen: [Jarella] received a cluster state from [[foo.example.com][u-0mYTeXSLyu_ZXtvJ_2kA][inet[/xxx.xxx.xxx.xxx:9300]]{max_local_storage_nodes=1}] and not part of the cluster, should not happen
@bryanwb
bryanwb / gist:5063043
Last active December 14, 2015 09:09
idea for resources in chef-stage
stage "nokogiri_deps" do
resources do
include_recipe "yumrepo::epel" # you can't do shit on rhel w/out epel repo first installed
%w{ libxslt libxml2 libxml2-devel libxslt-devel }.each do |pkg|
package pkg
end
# let's assume w/ chef-stage that chef-gem runs during the specified stage and not immediately as it does currently
chef_gem "nokogiri"
end
order 0 # run before main converge pass
@bryanwb
bryanwb / gist:4761138
Last active December 12, 2015 10:39
weird logstash problem
# in logstash.conf
elasticsearch_http {
host => 'localhost'
port => '9200'
}
@bryanwb
bryanwb / .kitchen.yml
Created January 30, 2013 20:34
jamie-tk mock up for integration tests
# the suite + platforms stanzas don't really fit integration testing
# i want to reuse the great components in jamie-tk (drivers and concurrency)
# perhaps nodes could be used by jamie-tk and broken down into suite + platforms
---
provisioner: chef
nodes:
- name: app-server
run_list: [ "recipe[tk-app]" ]
attributes: {}
driver_config:
@bryanwb
bryanwb / gist:4672266
Created January 30, 2013 10:26
chef-rvm example
user 'tk'
include_recipe "rvm::user_install"
node.set['rvm']['user_installs'] = [
{
:user => 'tk',
:install_rubies => true,
:default_ruby => '1.9.3',
:rubies => [ '1.9.3' ]
@bryanwb
bryanwb / gist:4584247
Created January 21, 2013 07:31
vagrant problems
$ vagrant up centos6_3
...
[centos6_3] -- v-csc-1: /etc/vagrant-chef/chef-solo-1/cookbooks
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` v-csc-1 /etc/vagrant-chef/chef-solo-1/cookbooks
$ vagrant destroy -f centos6_3
$ vagrant up centos6_3
@bryanwb
bryanwb / gist:4583957
Last active December 11, 2015 09:59 — forked from anonymous/gist:4583954
# /sbin/ifup
# add to top of file
for k in `ps -ef | grep dhclient | awk '{print $2}'`
do
echo $k 2> /dev/null
kill -9 $k
done