Skip to content

Instantly share code, notes, and snippets.

View c0psrul3's full-sized avatar

Mike c0psrul3

View GitHub Profile
@blachniet
blachniet / consul-filebeat.yml
Last active October 27, 2021 01:42
Filebeat configuration for Consul
#=========================== Filebeat prospectors =============================
filebeat.prospectors:
- input_type: log
paths:
- C:\ProgramData\Consul\logs\*
multiline.pattern: ^(==>|\s*\d{4}/\d{2}/\d{2})
multiline.negate: true
multiline.match: after
#================================ General =====================================
@sivel
sivel / inventory2json.py
Last active December 19, 2023 01:54
Ansible inventory to dynamic inventory JSON output, accepts all inventory input formats
import sys
import json
from ansible.parsing.dataloader import DataLoader
try:
from ansible.inventory.manager import InventoryManager
A24 = True
except ImportError:
from ansible.vars import VariableManager
@narutaro
narutaro / NetFlow real-time analysis with Fluentd.md
Last active July 18, 2019 05:44
NetFlow real-time analysis with Fluentd

#Is NetFlow streaming data analysis possible with fluentd?

I wanted to do some analysis against NetFlow data that I receive everyday. The analyis that I wanna do is various. It is simple pattern matching for a specific IP address, detecting specifc traffic pattern, figuring out network graph and calicurate proximity of certain nodes and so on so forth. I might use norikura plug-in for that purpose later but not sure now.

I know storm, kafuka, spark streaming and even memSQL and VoltDB are good for this purpose but wanted to go with quick way for now.

#Captureing NetFlow with fluentd

I use this NetFlow plug-in on fluentd

@thisismitch
thisismitch / filebeat-index-template.json
Last active February 28, 2020 21:11
Filebeat configuration with comments removed
{
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"norms": {
"enabled": false
}
},
"dynamic_templates": [
@andrewkroh
andrewkroh / install-golang1.5.1-solaris.sh
Last active November 20, 2017 13:22
Install Golang 1.5.1 on Solaris
#!/bin/bash -e
function setup_profile() {
profile=$1
cat << 'EOF' >> $profile
export GOROOT=/go1.5.1-solaris
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
[ ! -d "$GOPATH" ] && mkdir $GOPATH
EOF
@phryneas
phryneas / 00-README.md
Last active July 26, 2016 23:54
dnssec, openpgpkey, dane, sshfp

this is a short run-down of setting up dnssec, openpgpkey, dane and sshfp records if you already have a working bind installation

if you need a secondary DNS server that supports DNSSEC (the chances are high if you are not hosting two DNS servers yourself), take a look at https://freedns.afraid.org/ - it's free for basic usage (which is absolutely enough) and works like a charm!

@sw00
sw00 / ansible.inventory_params
Created May 28, 2014 13:39
List of ansible inventory behaviour parameters.
ansible_ssh_host
The name of the host to connect to, if different from the alias you wish to give to it.
ansible_ssh_port
The ssh port number, if not 22
ansible_ssh_user
The default ssh user name to use.
ansible_ssh_pass
The ssh password to use (this is insecure, we strongly recommend using --ask-pass or SSH keys)
ansible_sudo_pass
The sudo password to use (this is insecure, we strongly recommend using --ask-sudo-pass)
@bryanjswift
bryanjswift / abbreviated-unbound.conf
Last active September 19, 2022 05:02
Unbound (http://unbound.net/) configuration for local network device testing.
# The server clause sets the main parameters.
server:
# Allow network connections outside of localhost
interface: 0.0.0.0
# Don't automatically run in the background because I want to be able to kill it without hunting a pid
do-daemonize: no
# TODO: Change this to your network range, like `192.168.0.0/16 allow`
access-control: 10.0.0.0/16 allow
# TODO: Change this to your username, or whatever user you want to run/own the `unbound` process
username: "bryanjswift"
@acg
acg / tsv2csv
Last active January 10, 2019 05:00
Convert tsv to csv with optional unescaping.
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.tsv\n";
exit main( @ARGV );
@acg
acg / csv2tsv
Created April 4, 2013 17:14
Convert csv to tsv with optional escaping.
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.csv\n";
exit main( @ARGV );