Posts Tagged ‘bash’

March 25th, 2014 No comments

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 it checks if it is still having erros on the backend.

Read more…

varnish check_hitratio

March 25th, 2014 No comments

We need to know if varnish is caching hit ratio is as it should.
So I wrote this simple bash plugin for nagios.

Read more…

script to monitor cpu usage by process

March 12th, 2014 1 comment

A bash script to get the CPU usage by process
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.

Read more…

Categories: BashScripts Tags: , , , ,

bash get analytics data

December 17th, 2013 No comments

This is a bash script to get Google Analytics Data, in this case A total day Pageviews.

Here is the code:

Read more…

Categories: HowTo, Linux Tags: , , , , , ,

Run jenkins with another user

December 13th, 2013 No comments

How to configure jenkins to run under different user other then tomcat6 account.

I configured it to run a bash script using:
sudo -u ubuntu /opt/script

Read more…

Categories: HowTo, Linux Tags: , , , ,


December 6th, 2013 No comments

Yet another log monitoring script..
The date field is very specific for each system and I keep having to refix each time.

Read more…

varnish dynamic backend

June 14th, 2013 1 comment

Varnish pointing to a Amazon ELB (elastic load balance) does not work.
Backend host “”: resolves to multiple IPv4 addresses.
Only one address is allowed.

Read more…

check how many files in a directory

June 7th, 2013 3 comments

Script to count how many files exists in directory and subdirectories
based on Gerd Stammwitz original script.

Read more…

Categories: BashScripts Tags: , , , , ,

auto scale script

May 14th, 2013 No comments

This can help if you are creating any kind of auto scale on Amazon AWS.
It is not a 100% automatic, as you will need to prior to running this have:

Read more…

Categories: Amazon-AWS, HowTo Tags: , , , , ,

check logfiles script

April 17th, 2013 2 comments

Not so generic way to check ‘any’ logfile for erros

I have written at least about 5 variations of this same script. Some more flexible and genereal purpose.
But in the end I have been writing customs made out of this skel.

Read more…

Categories: Nagios, plugins Tags: , , , , ,