#!/bin/bash
#Version 1.0
#######################################
#Nagios scrept to check memory status##
#Commands : free -m#####################
#######################################
#Status check for nagios script
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4
#Define All the variables for commands
declare -rx SCRIPT=${0##*/}
declare -rx CMD_AWK="/bin/awk"
declare -rx CMD_CAT="/bin/cat"
declare -rx CMD_FREE="/usr/bin/free"
#####Section 1.1
efinning function for free memory checking########
#Definning function to check free memory status#####################
#####################################################################
function FUNC_FREE_CMD
{
MEM_STATUS=$( $CMD_FREE -m | grep buffers/cache | awk ‘{print $4}’)
########Checking if Current memory [...]
Archive for the ‘Bash Script’ Category
Nagios script to monitor memory uses
Thursday, June 24th, 2010nagios script to check dns servers status
Monday, June 7th, 2010#!/bin/bash
###################################
#Purpose:################################################################
###(a) Monitor if all your name server is online: Status
one ####
###(b) Monitor if all name server has same zone record : Staus : Ongoing##
###(c) Monitor the Response time of Dns server : Status : Ongoing#
#########################################################################
#Status check variables for nagios [...]
Nagios script to monitor memory uses
Friday, April 23rd, 2010Purpose:
###########################################
Develop a nagios script, which will monitor Linux memory uses.
###########################################
This script will check following :
#############################################
#1.If free memory is more then the defined memory as free: Status Done
#2.If System is using swap memory : Status:Done
##############################################
#!/bin/bash
#Version 1.0
#######################################
#Nagios scrept to check memory status##
#Commands : fre -m#####################
#######################################
#Status check for nagios script
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4
#Define All the variables for commands
declare -rx SCRIPT=${0##*/}
declare -rx [...]
nagios script for checking mysql server replication status between 4 servers
Monday, February 22nd, 2010Ref : http://onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html?page=2
Date:22/02/2010
This Script is still under development.
Purpose:
Develop a nagios script, which would be able to check replication status between 4 Master/Master Server.
This scripy will check following :
#1.Each Mysql servers are online : Stats: Done
#2.If Slave process is running : Status:Done
#3.If Slave IO process is running : Status:Done
#4.If There is any bin log position difference [...]
Bash script to check for automatic yum updates
Thursday, August 27th, 2009#!/bin/bash
########################################
# This script will check for available package-
# update for Centos/Redhat 5 sytem
# Written by : Fosiul Alam
# Version :1.0
# Created Date : 27/08/2009
# Last Modification : 27/08/2009
#########################################
########################################
# Command use [...]