Skip to content

Instantly share code, notes, and snippets.

Ali Nabavi hourback

Block or report user

Report or block hourback

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
hourback / Exception.rb
Last active Nov 13, 2015 — forked from stuart-warren/Exception.rb
Windows Event log via nxlog (json) -> logstash 1.2 config
View Exception.rb
Exception in filterworker {"exception"=>#<NoMethodError: undefined method `[]=' for nil:NilClass>, "backtrace"=>["file:/opt/logstash/logstash.jar!/logstash/event.rb:135:in `[]='", "org/jruby/ `call'", "(eval):9:in `exec'", "org/jruby/ `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/ `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/ `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=>:
hourback /
Last active Nov 19, 2018
I'm using this to clean up between installations of Ambari and HDP.
ambari-server stop
ambari-server reset
ambari-agent stop
service mysqld stop
service postgresql stop
python /usr/lib/python2.6/site-packages/ambari_agent/
hourback / Input
Last active Aug 29, 2015
Lua decoder for Heka, for reading in WebSphere SystemOut.log files with unrecognized time stamp format
View Input
[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 serverindex for node janmsdlxwas04 does not contain server celig1_janmsdlxwas04_cnataraj
[4/23/15 4:50:30:005 CDT] 0000002e DiscoveryRcv I DCSV1031I: DCS Stac
hourback / hekad.conf
Created Apr 7, 2015
My Upstart script for starting/stopping hekad on CentOS 6.6
View hekad.conf
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
View hekad.toml
maxprocs = 2
type = "LogstreamerInput"
log_directory = "/var/log"
file_match = 'secure'
decoder = "RsyslogDecoder"
hourback / nxlog
Last active Aug 29, 2015
A SysV init script for nxlog on RHEL 5 box (/etc/init.d/nxlog)
View 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/
# Author: Erik Kristensen
# Email:
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./ _container_id_
# The script checks if a container is running.
# OK - running
hourback /
Last active Aug 29, 2015
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
hourback / add_routes.bat
Last active Aug 29, 2015
Static routes for routing certain requests through friendlier interfaces. The first file is the Windows batch file I originally used, and the second it the Go program I wrote to do the lookup dynamically.
View add_routes.bat
route add mask
route add mask
route add mask
route add mask
route add mask
route add mask
route add mask
route add mask
View gist:471469e58498bc89738a
2014/10/02 22:13:27 Entering PostNotification....
2014/10/02 22:13:27 &{0xc210047240 {<nil>}}
2014/10/02 22:13:27 decoder is: &{0x976c20 [] {[] 0 {<nil> false [] <nil> false 0 <nil> 0} {<nil> false [] <nil> false 0 <nil> 0} <nil
> false} {<nil> false [] <nil> false 0 <nil> 0} <nil>}
2014/10/02 22:13:27 http: panic serving EOF
goroutine 3 [running]:
/usr/lib/go/src/pkg/net/http/server.go:1093 +0xae
runtime.panic(0x651de0, 0xc21000a030)
/usr/lib/go/src/pkg/runtime/panic.c:248 +0x106
You can’t perform that action at this time.