Skip to content

Instantly share code, notes, and snippets.

View hourback's full-sized avatar

Ali Jonathan Nabavi hourback

View GitHub Profile
@hourback
hourback / setup.sh
Last active August 29, 2015 14:09
Setting up dev and deployment environment for fanotification
sudo docker run -v /fanotification-webapp-dev -v /fanotification-webapp-deployment -v /fanotification-server-dev -v /fanotification-server-deployment --name my-data busybox true
#!/bin/bash
# Author: Erik Kristensen
# Email: [email protected]
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# The script checks if a container is running.
# OK - running
@hourback
hourback / nxlog
Last active August 29, 2015 14:18
A SysV init script for nxlog on RHEL 5 box (/etc/init.d/nxlog)
#! /bin/bash
#
# nxlog Start/Stop the nxlog log handler
#
# chkconfig: 2345 90 60
# description: nxlog is an open-source, cross-platform log handler.
# processname: nxlog
# config: /usr/local/etc/nxlog/nxlog.conf
# pidfile: /var/run/nxlog.pid
[hekad]
maxprocs = 2
[secure]
type = "LogstreamerInput"
log_directory = "/var/log"
file_match = 'secure'
decoder = "RsyslogDecoder"
[messages]
@hourback
hourback / hekad.conf
Created April 7, 2015 17:37
My Upstart script for starting/stopping hekad on CentOS 6.6
description "Heka daemon"
author "Ali Nabavi"
start on runlevel [235]
stop on runlevel [06]
console output
exec /opt/heka/bin/hekad --config=/usr/local/etc/hekad.toml | logger
@hourback
hourback / Input
Last active August 29, 2015 14:19
Lua decoder for Heka, for reading in WebSphere SystemOut.log files with unrecognized time stamp format
[4/23/15 4:49:49:371 CDT] 00003a01 CoordinatorCo E HMGR0140E: An event indicating that the core group membership is inconsistent was received. Recovery failed. The exception is com.ibm.ws.hamanager.runtime.config.ServerIndexNodeException: serverindex for node janmsdlxwas04 does not contain server celig1_janmsdlxwas04_cnataraj
at com.ibm.ws.hamanager.runtime.config.CoreGroupProcesses$ServerIndexParser.getServerIndexForServer(CoreGroupProcesses.java:376)
at com.ibm.ws.hamanager.runtime.config.CoreGroupProcesses.<init>(CoreGroupProcesses.java:135)
at com.ibm.ws.hamanager.runtime.config.CoreGroupConfig.<init>(CoreGroupConfig.java:113)
at com.ibm.ws.hamanager.runtime.config.StateBlobBuilder.buildBlob(StateBlobBuilder.java:104)
at com.ibm.ws.hamanager.runtime.CoordinatorComponentImpl$InconsistentDefinedSetHandler.run(CoordinatorComponentImpl.java:1127)
at java.lang.Thread.run(Thread.java:738)
.
[4/23/15 4:50:30:005 CDT] 0000002e DiscoveryRcv I DCSV1031I: DCS Stac
@hourback
hourback / remove-ambari-and-hadoop.sh
Last active April 9, 2020 16:14
I'm using this to clean up between installations of Ambari and HDP.
#!/bin/bash
ambari-server stop
ambari-server reset
ambari-agent stop
service mysqld stop
service postgresql stop
python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py
@hourback
hourback / Exception.rb
Last active November 13, 2015 21:07 — forked from stuart-warren/Exception.rb
Windows Event log via nxlog (json) -> logstash 1.2 config
Exception in filterworker {"exception"=>#<NoMethodError: undefined method `[]=' for nil:NilClass>, "backtrace"=>["file:/opt/logstash/logstash.jar!/logstash/event.rb:135:in `[]='", "org/jruby/RubyProc.java:255:in `call'", "(eval):9:in `exec'", "org/jruby/RubyProc.java:255:in `call'", "file:/opt/logstash/logstash.jar!/logstash/util/fieldreference.rb:44:in `exec'", "file:/opt/logstash/logstash.jar!/logstash/event.rb:134:in `[]='", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:234:in `rename'", "org/jruby/RubyHash.java:1332:in `each'", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:232:in `rename'", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:205:in `filter'", "(eval):127:in `initialize'", "org/jruby/RubyProc.java:255:in `call'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:243:in `filter'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:191:in `filterworker'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:134:in `start_filters'"], :level=>: