Simple script to check if the varnish daemon has been restarted latelly Here is the code: #!/bin/bash #Get current varnish uptime #Version 1.0 #By Felipe Ferreira Set 2013 #Variables CRIT=900 #Check arguments print help if [ $# -lt 1 ]; […]
check_backend.sh
Another bash script to monitor if there were any failed connections to the backend’s. It is a simple aproach using the command: varnishstat -1 -f backend_fail Then it puts the output on a tmp file and next time it runs […]
varnish check_hitratio
We need to know if varnish is caching hit ratio is as it should. So I wrote this simple bash plugin for nagios. ./check_hitratio.sh 96 90 OK – 98.67% hit_ratio|hit_ratio=98.67 96 = warning 90 = critical if no arg is […]
script to monitor cpu usage by process
A bash script to get the CPU usage by process usage: nohup ./check_proc bwengine 70 & bwegnine is the process name we want to monitor 70 is to log only when the process is using over 70% of the CPU. […]
check_error_log
Yet another log monitoring script.. The date field is very specific for each system and I keep having to refix each time. I like this one about the way it works, it first find the date/time where we want to […]
bash script to convert pdf to jpg
I wrote this shell script to convert around 7 million PDF’s. The initial Java version had trouble with performance, it crashed a lot and used way to much memory. So old bash again did a clean and fast job. Overview: […]
check aws elb hosts
This scripts counts how many active instances are inService of a AWS ElasticLoadBalancer (ELB). The code is based on a simple API call via bash elb-describe-instance-health Here is the code: #!/bin/bash #This script uses AWS command line tools to get […]