1. 程式人生 > >kafka監控指令碼

kafka監控指令碼

#!/bin/bash
#-*- coding: utf-8 -*-
#Date: 2018/08/15
#Author: Mr.yang

ps
-ef |grep kafka |grep -v grep |grep -v kafka.sh > /dev/null if [ $? -eq 0 ];then cd /database/kafka/bin/ timeout 10s sh kafka-producer-perf-test.sh --topic t1 --num-records 10 --record-size 2 --throughput 50 --producer-props bootstrap.servers=192.168
.0.184:9092 > /dev/null if [ $? -ne 0 ];then echo 1 else echo 0 fi elif [ $? -ne 0 ];then echo 1 fi

原創文章,轉載請註明:
轉載自純種黃牛部落格