Skip to content

Instantly share code, notes, and snippets.

View chhetripradeep's full-sized avatar
🏠
Working from home

Pradeep Chhetri chhetripradeep

🏠
Working from home
View GitHub Profile
@chhetripradeep
chhetripradeep / autorepair.sh
Created October 1, 2021 13:05 — forked from blemmenes/autorepair.sh
bash script to repair PGs
#!/bin/bash
# from https://github.com/cernceph/ceph-scripts/blob/master/tools/scrubbing/autorepair.sh
for PG in $(ceph pg ls inconsistent -f json | jq -r .pg_stats[].pgid)
do
echo Checking inconsistent PG $PG
if ceph pg ls repair | grep -wq ${PG}
then
echo PG $PG is already repairing, skipping
continue

Lets say i want to rebalance my-sample-topic topic on my kafka cluster

Create topcis.json

{
  "version": 1,
  "topics": [
 { "topic": "my-sample-topic" 
@chhetripradeep
chhetripradeep / 11-cassandra-filter.conf
Created January 10, 2018 11:48 — forked from ibspoof/11-cassandra-filter.conf
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}",
@chhetripradeep
chhetripradeep / main.go
Created January 7, 2018 17:09 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"