Skip to content

Instantly share code, notes, and snippets.

View franktate's full-sized avatar

Frank Tate franktate

View GitHub Profile
@franktate
franktate / DASH_WebGUI_HA.py
Last active September 14, 2023 13:14
wsadmin Jython commands to configure DASH and WebGUI for HA using an ObjectServer database
import re
jazzhaPass = raw_input('password for jazzha user in ObjectServer: ')
otherHostIP = raw_input('IP address of the other DASH server: ')
primaryObjServ = raw_input('hostname or IP of primary ObjectServer')
secondaryObjServ = raw_input('hostname or IP of secondary ObjectServer')
AdminTask.createAuthDataEntry('-alias TIPalias -user jazzha -password ' + jazzhaPass )
variableMap = AdminConfig.list('VariableMap', AdminConfig.getid( '/Cell:JazzSMNode01Cell/Node:JazzSMNode01/Server:server1/'))
AdminConfig.create('VariableSubstitutionEntry', variableMap, '[[symbolicName "SYBASE_JDBC_DRIVER_PATH"] [description ""] [value "/home/netcool/IBM/JazzSM/lib/OServer"]]')
sybDriver = AdminTask.createJDBCProvider('[-scope Node=JazzSMNode01,Server=server1 -databaseType Sybase -providerType "Sybase JDBC 3 Driver" -implementationType "Connection pool data source" -name "Sybase JDBC 3 Driver" -description "Sybase JDBC 3 Driver. This provider is only configurable in version 6.1 and later nodes" -classpath [${SYBASE_
@franktate
franktate / found_RBAC_Buster.sh
Last active April 24, 2023 10:16
Short script to search for indicators of compromise for RBAC Buster attack
#!/bin/bash
found=0
kubectl get serviceaccount -n kube-system kube-controller > /dev/null 2>&1
if [[ $? == 0 ]]
then
echo "ServiceAccount kube-controller found. Your cluster has been compromised."
found=1
fi
kubectl get ClusterRole system:controller:kube-controller > /dev/null 2>&1
if [[ $? == 0 ]]
@franktate
franktate / config.yml
Last active April 18, 2023 20:08
Prometheus JSON Exporter example
---
modules:
default:
headers:
MyHeader: MyHeaderValue
metrics:
- name: json_testfile1
type: object
help: help...
path: '{[*]}'
@franktate
franktate / samplejaeger.json
Last active April 11, 2023 14:01
Sample valid OTLP JSON data and the corresponding Jaeger Thrift Batch JSON as seen from Jaeger
{
"data": [
{
"traceID": "71699b6fe85982c7c8995ea3d9c95df8",
"spans": [
{
"traceID": "71699b6fe85982c7c8995ea3d9c95df8",
"spanID": "3c191d03fa8be068",
"operationName": "ftspanitron",
"references": [],
@franktate
franktate / commands.sh
Last active March 24, 2023 17:15
ISIM Install
cd <path>
cd ibm_db2
./db2_install -y -f NOPCMK -f NOTSAMP -p SERVER -b /opt/IBM/db2/V11.5
cd ../ibm_gskit
installp -acXgYd . GSKit8
lslpp -l | grep -i gsk
cd ../license
./idsLicense # Review and accept the license terms.
cd ../images
@franktate
franktate / rancherCommandsAndInstructions.sh
Created March 18, 2023 12:45
Commands for Ubuntu, Rancher, Elasticsearch And Kibana
# This is a list of commands used when installing Rancher plus Elasticsearch and Kibana
# Start up Rancher
docker run -d --restart=unless-stopped \
-p 80:80 -p 443:443 -p 5601:5601\
--privileged \
rancher/rancher:latest
# get the container ID
export CONTAINER_ID=$(docker ps | grep rancher | awk '{ print $1 }')
@franktate
franktate / commandsForRancher.sh
Last active March 18, 2023 13:13
List of commands run when installing Rancher, Elastic, Kibana, Logging and eventually Metricbeat
# This is a list of commands used when installing Rancher plus Elasticsearch, Kibana and Logging
# Start up Rancher
docker run -d --restart=unless-stopped \
-p 80:80 -p 443:443 -p 5601:5601\
--privileged \
rancher/rancher:latest
# get the container ID
export CONTAINER_ID=$(docker ps | grep rancher | awk '{ print $1 }')
#!/bin/bash
echo =========== Create an ubuntu pod ==================
kubectl run ubuntu --image=ubuntu -- bash -c "while true; do echo hello; sleep 10;done"
# Wait for the pod "ubuntu" to contain the status condition of type "Ready"
kubectl wait --for=condition=Ready pod/ubuntu
echo =========== Installing dig and other tools into the pod ===============
kubectl exec -it ubuntu -- apt-get update
@franktate
franktate / install-elk-and-fluentbit.sh
Last active March 14, 2023 20:55
Install the ELK stack and Fluent-Bit on Minikube on Ubuntu
#!/bin/bash
# install Elastic
# reference URL:
# https://www.bogotobogo.com/DevOps/Docker/Docker_Kubernetes_ElasticSearch_with_Helm_minikube.php
# add helm repo for elastic
helm repo add elastic https://Helm.elastic.co
# an example values.yaml for use with minikube, but it didn't work exactly as written for me.
# curl -O https://raw.githubusercontent.com/elastic/Helm-charts/master/elasticsearch/examples/minikube/values.yaml
@franktate
franktate / configureUbuntu.sh
Last active April 19, 2023 13:50
Configure Ubuntu 20.04 Desktop to prepare for Minikube and the ELK stack
#!/bin/bash
#
# Full list of commands required to install minikube on Ubuntu 20.04
#
sudo groupadd docker
sudo usermod -aG docker $USER
group=docker
if [ $(id -gn) != $group ]; then
exec sg $group "$0 $*"