Skip to content

Instantly share code, notes, and snippets.

View jaapterwoerds's full-sized avatar

Jaap ter Woerds jaapterwoerds

  • Lambda Lab Software
  • Amsterdam area, the Netherlands
View GitHub Profile
# https://github.com/rama-nallamilli/kafka-prometheus-monitoring
# https://github.com/Yolean/kubernetes-kafka/blob/master/prometheus/10-metrics-config.yml
lowercaseOutputName: true
rules:
- pattern : kafka.network<type=Processor, name=IdlePercent, networkProcessor=(.+)><>Value
- pattern : kafka.network<type=RequestMetrics, name=RequestsPerSec, request=(.+)><>OneMinuteRate
- pattern : kafka.network<type=SocketServer, name=NetworkProcessorAvgIdlePercent><>Value
- pattern : kafka.server<type=ReplicaFetcherManager, name=MaxLag, clientId=(.+)><>Value
- pattern : kafka.server<type=BrokerTopicMetrics, name=(.+), topic=(.+)><>OneMinuteRate
# https://github.com/rama-nallamilli/kafka-prometheus-monitoring
# https://github.com/Yolean/kubernetes-kafka/blob/master/prometheus/10-metrics-config.yml
lowercaseOutputName: true
rules:
- pattern : kafka.network<type=Processor, name=IdlePercent, networkProcessor=(.+)><>Value
- pattern : kafka.network<type=RequestMetrics, name=RequestsPerSec, request=(.+)><>OneMinuteRate
- pattern : kafka.network<type=SocketServer, name=NetworkProcessorAvgIdlePercent><>Value
- pattern : kafka.server<type=ReplicaFetcherManager, name=MaxLag, clientId=(.+)><>Value
- pattern : kafka.server<type=BrokerTopicMetrics, name=(.+), topic=(.+)><>OneMinuteRate
#!/usr/bin/env python
from optparse import OptionParser
from brod.zk import *
import pickle
import struct
import socket
import sys
import time