Skip to content

Instantly share code, notes, and snippets.

View mrlesmithjr's full-sized avatar

Larry Smith Jr. mrlesmithjr

View GitHub Profile
input {
udp {
type => "syslog"
port => "514"
}
filter {
if [type] == "syslog" {
dns {
reverse => [ "host" ] action => "replace"
}
output {
syslog {
type => "syslog-relay"
facility => "%{syslog_facility}"
host => "solarwinds"
port => 514
severity => "%{syslog_severity}"
}
}
input {
redis {
host => "127.0.0.1"
data_type => "list"
key => "logstash"
}
}
input {
udp {
type => "syslog"
curl localhost:9200/_templates?pretty
No handler found for uri [/_templates?pretty] and method [GET]
RAW Log
<135> 05/13/2014:21:17:55 GMT nsvpx-esx-2 0-PPE-0 : SSLLOG SSL_HANDSHAKE_SUCCESS 6103955 0 : SPCBId 59218 - ClientIP 142.28.165.235 - ClientPort 56308 - VserverServiceIP 192.168.1.200 - VserverServicePort 443 - ClientVersion TLSv1.0 - CipherSuite "RC4-MD5 TLSv1 Non-Export 128-bit" - Session Reuse
filter {
if "Netscaler" in [tags] {
grok {
break_on_match => false
match => [
"message", '%{SYSLOG5424PRI} %{DATE}:%{HAPROXYTIME} GMT %{SYSLOGHOST:syslog_hostname} %{PROG:netscaler_process} : %{DATA:netscaler_feature} %{DATA:netscaler_message} %{DATA} : %{DATA} %{INT:netscaler_spcbid} - %{DATA} %{IP:client_ip} - %{DATA} %{INT:client_port} - %{DATA} %{IP:vserver_ip} - %{DATA} %{INT:vserver_port} - %{DATA} %{DATA:client_version} - %{DATA} "%{DATA:cipher_suite}" - %{DATA} %{WORD:session_method}'
]
#!/bin/bash
#Provided by @mrlesmithjr
#EveryThingShouldBeVirtual.com
set -e
# Setup logging
# Logs stderr and stdout to separate files.
exec 2> >(tee "./Logstash_Kibana3/install_logstash_es_cluster_ubuntu.err")
exec > >(tee "./Logstash_Kibana3/install_logstash_es_cluster_ubuntu.log")
iface lo inet loopback
auto lo
auto eth0
iface eth0 inet static
address 10.0.101.61
netmask 255.255.255.0
gateway 10.0.101.1
dns-search everythingshouldbevirtual.local
dns-nameservers 10.0.101.110 10.0.101.111 10.0.101.112
iface lo inet loopback
auto lo
auto eth0
iface eth0 inet static
address 10.0.101.62
netmask 255.255.255.0
gateway 10.0.101.1
dns-search everythingshouldbevirtual.local
dns-nameservers 10.0.101.110 10.0.101.111 10.0.101.112
watchdog /dev/watchdog
logfile /var/log/ha-log
debugfile /var/log/ha-debug
deadtime 5
warntime 10
initdead 15
bcast eth1
auto_failback on
node haproxy-1
node haproxy-2
@mrlesmithjr
mrlesmithjr / Apache_Dashboard
Last active August 29, 2015 14:02
Logstash Apache Dashboard
{
"title": "Apache",
"services": {
"query": {
"list": {
"0": {
"id": 0,
"color": "#7EB26D",
"alias": "Exclude from Top Page Requests",
"pin": false,