#! /bin/bash #This Plug-in monitors Cassandra number of read and write operations in a given time period, i.e. Read operations per second / write Operations per second. #it fetches WriteOperations or ReadOperations from Nagios JMX plugin and stores the values with timestamp in a log file at /tmp directory, and parses this log file to create the Read/write per second value. ####Sample Log entries### #cat /tmp/Cass_ReadOperations.log #1323353650=JMX CRITICAL ReadOperations=0 #1323353710=JMX CRITICAL ReadOperations=120 #so the Read per second would be (120-0)/(1323353710-1323353650) i.e 2 per Second. # This take three parameters as input 1) Option i.e. Read operations or write Operations and Warning and Critical Values. # Author - Juned Memon #########THIS part is for Nagios ################################ PROGNAME=`/usr/bin/basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` REVISION=`echo '$Revision: 1749 $' | sed -e 's/[^0-9.]//g'` #. $PROGPATH/utils.sh . /usr/local/nagios/libexec/utils.sh ###################################################################### #Function to print Usage function usage { usage1="Usage: $0 -o