Skip to content

Instantly share code, notes, and snippets.

View nipunarora's full-sized avatar
🎯
Carpe Diem

Nipun Arora nipunarora

🎯
Carpe Diem
View GitHub Profile
{:timestamp=>"2015-04-27T15:40:09.444000-0400", :message=>"Reading config file", :file=>"logstash/agent.rb", :level=>:debug, :line=>"301"}
{:timestamp=>"2015-04-27T15:40:10.263000-0400", :message=>"Compiled pipeline code:\n@inputs = []\n@filters = []\n@outputs = []\n@input_stdin_1 = plugin(\"input\", \"stdin\", LogStash::Util.hash_merge_many({ \"type\" => (\"access_log_train\".force_encoding(\"UTF-8\")) }))\n\n@inputs << @input_stdin_1\n@filter_grok_2 = plugin(\"filter\", \"grok\", LogStash::Util.hash_merge_many({ \"patterns_dir\" => (\"/etc/logstash/patterns\".force_encoding(\"UTF-8\")) }, { \"match\" => [(\"message\".force_encoding(\"UTF-8\")), (\"(\\\\d)+ \\\\. (\\\\d)+ \\\\. (\\\\d)+ \\\\. (\\\\d)+ \\\\- - \\\\[ %{HLA_TS_1:ts1} \\\\\\\" GET / SiteShellServer / update \\\\. do \\\\? serialID = \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* \\\\* & version = %{BASE16NUM:P1F1} HTTP / %{BASE16NUM:P1F2} \\\\. %{BASE16NUM:P1F3} \\\\\\\" %{BASE16NUM:P1
#Logstash Header Start
input {
stdin {
type => "access_log_train"
}
}
#Logstash Header End
filter {
150 . 70 . 173 . 39 - - [ 2014 / 08 / 29 16 : 31 : 27 " GET / HTTP / 1 . 1 " 403 202 80 474 0 User - agent : Mozilla / 4 . 0 ( compatible ; MSIE 8 . 0 ; Windows NT 5 . 1 ; Trident / 4 . 0 ) Cookie : - Referer : -
195 . 154 . 237 . 95 - - [ 2014 / 08 / 28 13 : 54 : 23 " GET / HTTP / 1 . 1 " 403 202 80 473 0 User - agent : Mozilla / 5 . 0 ( compatible ; Nmap Scripting Engine ; http : / / nmap . org / book / nse . html ) Cookie : - Referer : -
150 . 70 . 173 . 38 - - [ 2014 / 08 / 30 11 : 32 : 30 " GET / HTTP / 1 . 1 " 403 202 80 485 0 User - agent : Mozilla / 4 . 0 ( compatible ; MSIE 8 . 0 ; Windows NT 5 . 1 ; Trident / 4 . 0 ) Cookie : - Referer : -
150 . 70 . 75 . 206 - - [ 2014 / 08 / 30 11 : 41 : 29 " GET / HTTP / 1 . 1 " 403 202 80 482 0 User - agent : Mozilla / 4 . 0 ( compatible ; MSIE 8 . 0 ; Windows NT 5 . 1 ; Trident / 4 . 0 ) Cookie : - Referer : -
150 . 70 . 97 . 69 - - [ 2014 / 08 / 31 11 : 35 : 23 " GET / HTTP / 1 . 1 " 403 202 80 472 0 User - agent : Mozilla / 4 . 0 ( compatible ; MSIE 8 . 0
@nipunarora
nipunarora / synergy_log
Created May 23, 2015 17:54
synergy_log
May 23 13:46:53 --- last message repeated 7 times ---
May 23 13:46:53 chips.local WindowServer[255]: _CGXGetWindowOrderingGroup: Operation on a window 0x1967 requiring rights 0x5 by caller System Preferences
May 23 13:47:01 chips.local FinderSyncAPIExtension[11195]: host connection <NSXPCConnection: 0x60800011b990> connection from pid 11188 invalidated
May 23 13:47:01 chips.local spindump[10916]: Got xpc error message in libspindump client connection: Connection invalid
May 23 13:47:01 chips.local garcon[11194]: host connection <NSXPCConnection: 0x6000001162f0> connection from pid 11188 invalidated
May 23 13:47:07 chips.local SIMBL Enabler for Sandboxed Apps[11201]: Set up watching for containers directory at URL file://localhost/Users/Nipun/Library/Containers/
May 23 13:47:16 chips.local locationd[86]: Location icon should now be in state 'Active'
May 23 13:47:17 chips kernel[0]: nspace-handler-set-snapshot-time: 1432403239
May 23 13:47:17 chips.local com.apple.mtmd[51]: Set snapshot time: 2015-05-23 13:47:1
@nipunarora
nipunarora / gist:22c8e336063a2a1cc4a9
Created June 14, 2015 21:20
Type 3 Violation Checker
package org.necla.ngla.spark_streaming;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
@nipunarora
nipunarora / gist:ed987e45028250248edc
Last active August 29, 2015 14:23
spark streaming broadcast variable
SparkConf sparkConf = new SparkConf();
sparkConf.setAppName("Type2OnlineViolationChecker");
JavaStreamingContext ssc = new JavaStreamingContext(sparkConf, new Duration(10000));
br = ssc.sparkContext().broadcast(hm);
JavaReceiverInputDStream<String> lines = ssc.socketTextStream(
args[0], Integer.parseInt(args[1]), StorageLevels.MEMORY_AND_DISK_SER);
JavaDStream<String> words = lines.flatMap(
@nipunarora
nipunarora / Debug.out
Created January 10, 2016 03:36
Debug Output from Logstash for Grok Exception
{:timestamp=>"2016-01-09T22:32:28.528000-0500", :message=>"Using milestone 1 filter plugin 'seq'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin. For more information on plugin milestones, see http://logstash.net/docs/1.4.2/plugin-milestones", :level=>:warn}
{:timestamp=>"2016-01-09T22:32:28.580000-0500", :message=>"Using milestone 2 output plugin 'file'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.2/plugin-milestones", :level=>:warn}
{:timestamp=>"2016-01-09T22:32:28.871000-0500", :message=>"Grok regexp threw exception", :exception=>"63", :level=>:warn}
{:timestamp=>"2016-01-09T22:32:28.876000-0500", :message=>["org.jcodings.specific.UTF8Encoding.length(UTF8Encoding.java:35)", "org.jcodings.specific.BaseUTF8Encoding.mbcToCode(BaseUTF8Encoding.java:91)", "org.jcodings.specific.UTF8Encodi
@nipunarora
nipunarora / ivysettings.xml
Created June 2, 2016 15:06
Apache Ivy Settings for cassandra
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
@nipunarora
nipunarora / ivy.xml
Created June 2, 2016 15:07
ivy.xml for cassandra here ant is unable to resolve com.cloudera.hadoop
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
@nipunarora
nipunarora / proxy
Created March 4, 2017 17:24
Pipe Temporary Resource Unavailable
#define _GNU_SOURCE
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <sys/time.h>
#include <time.h>
#include <errno.h>
#include <libgen.h>