Skip to content

Instantly share code, notes, and snippets.

View HackRanger's full-sized avatar
🏠
Working from home

Subramanya HackRanger

🏠
Working from home
View GitHub Profile
@HackRanger
HackRanger / gist:5452535
Created April 24, 2013 14:26
error after running java -jar logstash-1.1.9.jar agent -f /opt/logstash/server/etc/logstash.conf -vv
Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (EADDRNOTAVAIL) Cannot assign requested address - bind - Cannot assign requested address
at org.jruby.ext.socket.RubyTCPServer.initialize(org/jruby/ext/socket/RubyTCPServer.java:118)
at org.jruby.RubyIO.new(org/jruby/RubyIO.java:879)
at RUBY.register(file:/opt/logstash/server/lib/logstash-1.1.9.jar!/logstash/inputs/tcp.rb:46)
at RUBY.run_input(file:/opt/logstash/server/lib/logstash-1.1.9.jar!/logstash/agent.rb:707)
at org.jruby.ext.thread.Mutex.synchronize(org/jruby/ext/thread/Mutex.java:149)
at RUBY.run_input(file:/opt/logstash/server/lib/logstash-1.1.9.jar!/logstash/agent.rb:707)
at RUBY.start_input(file:/opt/logstash/server/lib/logstash-1.1.9.jar!/logstash/agent.rb:367)
@HackRanger
HackRanger / gist:5452649
Created April 24, 2013 14:41
logstash_server role which creates the logstash.conf
name "logstash_server"
description "Attributes and run_lists specific to FAO's logstash instance"
default_attributes(
:logstash => {
:server => {
:enable_embedded_es => false,
:inputs => [
{:udp => {
:port =>1514,
:type => "syslog",
@HackRanger
HackRanger / gist:5480524
Created April 29, 2013 09:03
Elasticsearch exception
[2013-04-29 11:02:24,730][WARN ][http.netty ] [Braddock, Brian] Caught exception while handling client http traffic, closing connection [id: 0xd6d16ba3, /10.14.11.101:48842 => /10.14.11.101:9200]
java.lang.IllegalArgumentException: empty text
at org.elasticsearch.common.netty.handler.codec.http.HttpVersion.<init>(HttpVersion.java:97)
at org.elasticsearch.common.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:62)
at org.elasticsearch.common.netty.handler.codec.http.HttpRequestDecoder.createMessage(HttpRequestDecoder.java:75)
at org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:189)
at org.elasticsearch.common.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:101)
at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500)
at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
at org.elasticsea
@HackRanger
HackRanger / gist:6305157
Last active December 21, 2015 12:19
main.mk
all_hosts += [
'localhost',
'node1|SKF|node1',
'node2|SKF|node2',
'node3|SKF|node3',
'node4|SKF|node4',
'node5|SKF|node5',
]
ipaddresses = {
@HackRanger
HackRanger / gist:6353267
Created August 27, 2013 13:06
check_mk
service check_mk
{
type = UNLISTED
port = 6556
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/check_mk_agent
#server = /usr/bin/unixcat
@HackRanger
HackRanger / gist:6903874
Created October 9, 2013 16:17
error while installing omd-1.00
sudo dpkg -i omd-1.00_0.precise_amd64.deb
Selecting previously unselected package omd-1.00.
(Reading database ... 148766 files and directories currently installed.)
Preparing to replace omd-1.00 0.precise (using omd-1.00_0.precise_amd64.deb) ...
Stopping all OMD monitoring sites using omd version 1.00:
/etc/init.d/omd-1.00: 45: /etc/init.d/omd-1.00: /opt/omd/versions/1.00/bin/omd: not found
invoke-rc.d: initscript omd-1.00, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg - trying script from the new package instead ...
Stopping all OMD monitoring sites using omd version 1.00:
@HackRanger
HackRanger / gist:6903964
Created October 9, 2013 16:24
Error while uninstall
sudo apt-get purge omd-1.00
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
xfonts-encodings x11-xkb-utils xserver-common libgl1-mesa-dri xfonts-utils libxfont1 xfonts-base
libfontenc1 xvfb libxkbfile1 libllvm3.0
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
omd-1.00*
@HackRanger
HackRanger / gist:6915450
Created October 10, 2013 09:13
update omdsite
#update omdsite.
execute 'update-omdsite' do
command "echo 'yes' | omd update monitoring"
user "root"
action :run
end
service_perfdata_file=/omd/sites/monitoring/var/spool/nagios/graphios/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tGRAPHITEPREFIX::$_SERVICEGRAPHITEPREFIX$\tGRAPHITEPOSTFIX::$_SERVICEGRAPHITEPOSTFIX$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=graphite_perf_service
define command {
command_name graphite_perf_service
command_line /bin/mv /omd/sites/monitoring/var/spool/nagios/graphios/service-perfdata /omd/sites/monitoring/var/spool/nagios/graphios/service-perfdata.$TIMET$
@HackRanger
HackRanger / gist:8420035
Created January 14, 2014 15:24
old checks
0 CPUTempMonitor temp1=49 OK - CPU temp is at 49
0 CPUClocks core1=1400.000|core2=1400.000|core3=1400.000|core4=1400.000|core5=3000.000|core6=1400.000 OK - that are the CPU clocks of every single core
0 GlusterHealState healCount=0 OK - the total number of files to be healed is 0 (there might be duplicates)
0 GlusterSplitBrain splitBrainCount=0 OK - the number of split brains found is 0
0 HDDTemp temp=48 OK - HDD temp is at 48
0 DNSUpdaterTest processes=0 This is not the Cloud Controller, so a process count of 0 is the normal case.
0 HAProxyTest processes=0 This is not the Cloud Controller, so a process count of 0 is the normal case.
0 API_HAProxy_Test processes=0 This is not the Cloud Controller, so a process count of 0 is the normal case.
0 HDDTemp1 temp=52 OK - HDD temp is at 52
1 HDDTemp2 temp=56 WARNING - HDD temp is at 56