Skip to content

Instantly share code, notes, and snippets.

View mdfranz's full-sized avatar

Matt Franz mdfranz

  • Lutherville Timonium MD
  • 18:23 (UTC -04:00)
View GitHub Profile
#!/bin/bash
# Function to check if AWS CLI tools are available
function check_aws_cli() {
if ! which aws &> /dev/null; then
echo "Error: AWS CLI not found. Please install AWS CLI and configure credentials."
exit 1
fi
}
sinks:
opensearch:
type: elasticsearch
endpoint: https://127.0.0.1:9200
mode: bulk
compression: none
suppress_type_name: true
healthcheck:
enabled: true
bulk:
@mdfranz
mdfranz / k3s_helm_install.sh
Created October 16, 2022 02:17 — forked from icebob/k3s_helm_install.sh
K3S + Helm installing
# Install K3S
curl -sfL https://get.k3s.io | sh -
# Copy k3s config
mkdir $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
sudo chmod 644 $HOME/.kube/config
# Check K3S
kubectl get pods -n kube-system
ubuntu@cass1:~$ cqlsh
Connected to Test Cluster at 127.0.0.1:9042
[cqlsh 6.1.0 | Cassandra 4.1 | CQL spec 3.4.5 | Native protocol v5]
Use HELP for help.
cqlsh> select * from bind.queries;
src_ip | query | ts
---------------+-------------------------------+---------------------------------
192.168.3.141 | inbox.google.com | 2022-10-01 00:50:26.000000+0000
192.168.3.30 | verizon.net | 2022-10-01 00:50:20.000000+0000
data_dir: /var/lib/vector
sources:
daemon_log:
type: file
include:
- "/var/log/daemon.log"
read_from: beginning
transforms:
@mdfranz
mdfranz / vector.toml
Created August 28, 2022 22:37
Better VRL for Iptables messages
# See the Vector Remap Language reference for more info: https://vrl.dev
[sources.k3s]
type = "journald"
include_units = ["k3s"]
[sources.kernel]
type = "file"
include = ["/var/log/messages"]
[transforms.iptables_parse]
inputs = ["kernel"]
type = "remap"
@mdfranz
mdfranz / vector.toml
Created August 28, 2022 22:14
k3s and iptables logs to CloudWatch with Vector
# See the Vector Remap Language reference for more info: https://vrl.dev
[sources.k3s]
type = "journald"
include_units = ["k3s"]
[sources.kernel]
type = "file"
include = ["/var/log/messages"]
[transforms.iptables_parse]
[api]
enabled = true
[sources.syslog]
type = "file" # required
ignore_older = 86400 # optional, no default, seconds
include = ["/var/log/auth.log","/var/log/syslog","/var/log/kernel.log"]
[sources.auditd]
type = "file" # required
package main
import (
"context"
"log"
"os"
"github.com/nats-io/nats.go"
)
@mdfranz
mdfranz / open-source-sso.md
Created November 9, 2020 03:17 — forked from bmaupin/open-source-sso.md
Comparison of open-source SSO implementations