Skip to content

Instantly share code, notes, and snippets.

@paolinux79
paolinux79 / logstash_indexer.conf
Created May 12, 2017 15:48 — forked from fairchild/logstash_indexer.conf
Logstash config example
input {
redis {
host => "127.0.0.1"
type => "redis-input"
# these settings should match the output of the agent
data_type => "list"
key => "logstash"
# We use json_event here since the sender is a logstash agent
message_format => "json_event"
}
@paolinux79
paolinux79 / tracker.sh
Last active March 31, 2017 15:06
Bash command to track all OS processes
#!/bin/bash
date +%Y-%m-%d:%H:%M:%S >> /root/tracker.log
ps -eo pid,ppid,uname,rss,sz,nlwp,pcpu,pmem,psr,start_time,time,args --sort -pmem --no-headers | sed 's/^[[:space:]]\+//g'|sed 's/[[:space:]]\+/|/g' >> /root/tracker.log
@paolinux79
paolinux79 / Updater.java
Last active September 25, 2015 07:17
Snippet to update not null value only in JPA/Spring
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import java.lang.reflect.Field;
import java.util.Hashtable;
/**
* Created by paolinux on 9/23/15.
*/