Monday, August 30, 2010

Trip to Wasgamuwa Sanctuary and returning through reverstain.

Wasgamuwa sanctuary, located in Central and North-Central Provinces and east bounded with mahawali river. Its is a marvelous place to watch animals including wild Elephants, peacocks, deers, birds. You have to enter the sanctuary early in the morning to watch animals. Better around 5.30 - 6.00 a.m. If you are traveling from colombo The recomened root is Colombo, kandy, through Tannekumbura-rikillagaskada high way to Hasalaka Wasgamuwa. You can see Randenigala dam on the way this root.
When returning you can get the root through pitawala pathana, reverstan, matale colombo. Don't mis to have some bath from illukkumbura natural pool.

I have attached some snaps herewith.


















Friday, August 27, 2010

Simple Nagios NRPE bash plugin to check a URL or image existance.

Copy and paste the following Bash script and name the file as check_url.




#!/bin/bash

VAR=`wget --spider $1 2>&1`
CHECK=`echo $VAR | grep '200 OK'`

if [ "$CHECK" != "" ]; then
echo "LOGO OK - Site Logo exist site is up"
exit 0
else
echo "LOGO CRITICAL - Site logo missing site is down"
exit 2
fi



Save it on /usr/lib/nagios/plugins/ and make it a executable file. chmod +x check_url

call the check_url with the image path or link path you wanted to check as follows.

/usr/lib/nagios/plugins/check_url http://www.google.com//intl/en_com/images/srpr/logo1w.png