Skip to content

Instantly share code, notes, and snippets.

@ibspoof
ibspoof / Gruntfile.js
Created April 27, 2013 23:02
Grunt 0.4 Gruntfile.js Example
/*global $:false */
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point)
{
return connect.static(path.resolve(point));
};
[posturl]
enabled=1
# levels can be comma delimited list of any of the following:
# DEBUG,INFO,WARN,ERROR,CRITICAL,ALERT
# If left empty, will listen for all levels
levels=
# clusters is a comma delimited list of cluster names for which
# this alert config will be eligible to run.
@ibspoof
ibspoof / 11-cassandra-filter.conf
Last active January 6, 2021 12:23
Grok Patterns and configuration for Cassandra logs
filter {
if [type] == "cassandralog" {
grok {
break_on_match => true
match => {
"message" => [
"%{CASS_COMPACTION_LARGE_KEY}",
"%{CASS_SLAB_POOL_CLEANER_1}",
"%{CASS_SLAB_POOL_CLEANER_2}",
package com.github.ibspoof.connection;
import com.datastax.driver.core.*;
import com.datastax.driver.core.policies.*;
import java.util.concurrent.TimeUnit;
public class ConnectionExample {
# File location /usr/share/dse/resources/tomcat/conf/server.xml or /dse/resources/tomcat/conf/server.xml
# Find
<Host name="localhost" appBase="../solr/web"...
#insert below XML node
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="/tmp/"
prefix="solr_access." suffix=".log" pattern="%h %u %t &quot;%r&quot; %s %B %D %v"
resolveHosts="false" rotatable="true" fileDateFormat="yyyy-MM-dd"/>
'F-14D Super Tomcat' Grumman 1987 2.34
'MiG-23 Flogger' Russian-made 1964 2.35
'Su-27 Flanker' U.S.S.R. 1981 2.35
SNAPS=$(ls -R /app/cassandra/datastax/dse-data* | grep 1469291 | grep app)
while read -r line; do
MOVE_FROM=$(echo $line | awk -F":" '{print $1}')
#echo "MOVE_FROM = $MOVE_FROM"
TABLE_NAME=$(echo $line | awk -F"/" '{print $7}' | awk -F"-" '{print $1}')
#echo "TABLENAME = $TABLE_NAME"
from fabric.api import *
from fabric.api import env
import time
import re
# env.hosts = ['10.200.20.146', '10.200.20.156', '10.200.20.168', '10.200.20.154']
env.hosts = ['10.200.20.158', '10.200.20.146', '10.200.20.156', '10.200.20.168', '10.200.20.154']
env.user = 'datastax'
nmap -p9042 10.200.20.0/24 --open