Skip to content

Instantly share code, notes, and snippets.

@iamhowardtheduck
iamhowardtheduck / tarClusterBuild.sh
Created July 25, 2020 03:01
tarClusterBuild.sh
sudo yum install -y perl-Digest-SHA wget unzip
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-darwin-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-darwin-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-7.8.0-darwin-x86_64.tar.gz.sha512
tar -xzf elasticsearch-7.8.0-darwin-x86_64.tar.gz
mv elasticsearch-7.8.0/config/elasticsearch.yml elasticsearch-7.8.0/config/elasticsearch.yml.backup
touch elasticsearch-7.8.0/config/elasticsearch.yml
echo "Please input the IP address found below:"
echo ""
ip a
@iamhowardtheduck
iamhowardtheduck / LogstashMathPluginInstall.sh
Last active April 26, 2020 16:53
Logstash Math Filter Plugin Install
git clone https://github.com/robin13/logstash-filter-math.git && cd logstash-filter-math/ && yum install gem* -y && gem build logstash-filter-math.gemspec && /usr/share/logstash/bin/logstash-plugin install --no-verify && /usr/share/logstash/bin/logstash-plugin install logstash-filter-math && service logstash restart
@iamhowardtheduck
iamhowardtheduck / COVID-19-Timeseries-Deprecated-Historical.conf
Created March 25, 2020 23:10
COVID-19 Time-series Deprecated Historical Data Logstash Pipeline
input {
file {
path => ["/COVID-19/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv", "/COVID-19/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Deaths.csv", "/COVID-19/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Recovered.csv" ]
start_position => "beginning"
} }
filter {
if [path] == "/COVID-19/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv" { mutate { add_field => { "tags" => "Confirmed" }}}
if [path] == "/COVID-19/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Recovered.csv" { mutate { add_field => { "tags" => "Recovered" }}}
@iamhowardtheduck
iamhowardtheduck / COVID-19-euro.conf
Last active March 15, 2020 13:08
Coronavirus "COVID-19-euro.conf" Logstash Pipeline
input {
file {
path => "/var/log/COVID-19-Euro/*.csv"
start_position => "beginning"
} }
filter {
csv {
skip_empty_columns => true
@iamhowardtheduck
iamhowardtheduck / COVID-19_Visualizations.ndjson
Last active March 8, 2020 22:13
Coronavirus Visualizations
{"attributes":{"fieldFormatMap":"{\"Country\":{\"id\":\"string\",\"params\":{\"parsedUrl\":{\"origin\":\"https://5-eyes:5601\",\"pathname\":\"/app/kibana\",\"basePath\":\"\"}}}}","fields":"[{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"@version\"}}},{\"name\":\"Confirmed\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"Country\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,
@iamhowardtheduck
iamhowardtheduck / COVID-19-Index_Tempate
Last active March 15, 2020 14:01
COVID-19-Index_Tempate
PUT _template/coronavirus
{
"version": 1,
"order": 0,
"index_patterns": [
"covid-19-john*",
"covid-19-euro*",
"covid-19*"
],
"settings": {
@iamhowardtheduck
iamhowardtheduck / COVID-19_Index_Pattern.ndjson
Last active March 8, 2020 18:48
COVID-19_Index_Pattern.ndjson
{"attributes":{"fieldFormatMap":"{\"Country\":{\"id\":\"string\",\"params\":{\"parsedUrl\":{\"origin\":\"https://5-eyes:5601\",\"pathname\":\"/app/kibana\",\"basePath\":\"\"}}}}","fields":"[{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"@version\"}}},{\"name\":\"Confirmed\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"Country\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,
@iamhowardtheduck
iamhowardtheduck / COVID-19-john.conf
Last active March 19, 2020 12:48
Coronavirus "COVID-19-john.conf" Logstash Pipeline
input {
# Use file input to collect all CSVs from "git clone https://github.com/CSSEGISandData/COVID-19.git"
# Simply run the command while in /var/log: git clone https://github.com/CSSEGISandData/COVID-19.git
file {
path => "/var/log/COVID-19/csse_covid_19_data/csse_covid_19_daily_reports/*.csv"
start_position => "beginning"
} }
filter {
@iamhowardtheduck
iamhowardtheduck / gist:75c738798aae9d6a5a01f5cc6a2948a8
Last active January 14, 2020 21:53
PEOPLE BUILDER - WORK IN PROGRESS, UPDATES TO PEOPLE - RC DNU
clear
echo -e "\n\n\n\n\n\n\n"
if [[ $EUID -eq 0 ]]; then
echo "This script must NOT be run as \"root\" OR as \"sudo $USER\"; please try again." 1>&2
exit 1
fi
#
# BEGIN WELCOME SCREEN & INITIAL UPDATING
#
clear
@iamhowardtheduck
iamhowardtheduck / pihole.txt
Last active December 2, 2019 18:32
Pi-Hole ECS Ingest Node Pipeline V2
PUT _ingest/pipeline/pihole
{
"description" : "Pi-Hole",
"processors" : [
{
"grok" : {
"field" : "message",
"patterns" : [
"%{SYSLOGTIMESTAMP:timestamp} %{GREEDYDATA:message}"]},