Band-width monitoring for CISCO 5K and 7K switches
Author
: Linuxos4all
Blog
: Linuxos4all
Date
: 5/24/2013 5:13:00 PM
'Run the below perl script and re-direct the output to the /usr/local/nagios/libexec/band-width-output/host-ipaddress----------------------------------------------------------------------------------------------------------#!/usr/bin/perl -w#Purpose : To pull the interface band-width information from the 5K and 7K switches#Authors : Babu Dhinakaran S#Date  (...)'
Read full article
How to Retrieve command output of a remote machine using expect script
Author
: Linuxos4all
Blog
: Linuxos4all
Date
: 5/20/2013 4:47:00 PM
'#!/usr/bin/expect#Purpose : Retrieve command output of a remote machine using expect script#Author : Ranjith Kumar R#Date : 20th May 2013set timeout 60set log [open "log.txt" "w"]spawn telnet IP address of a serverexpect "login:"send "username\r"expect "Password:"send "password\r"expect "#"send "command name"send "\r"set outcome $expect_out(buffer)puts $log $outcomesend "exit\r"expect eof'
Read full article
shell script for Generate the service.cfg for monitoring network device interfaces
Author
: Linuxos4all
Blog
: Linuxos4all
Date
: 5/6/2013 10:36:00 AM
'#!/bin/bash#Purpose : TO generate interface monitoring services.cfgwhile read devicelistdoip=`echo $devicelist | awk ''`devicename=`echo $devicelist | awk ''``snmpwalk -Os -c communitystring -v 1 $ip IfDescr | awk '' > /tmp/interface.txt`while read interfacenamedoecho "define service"done < /tmp/interface.txtdone < /tmp/deviceip'
Read full article
AIX5.3/6.1 NRPE install- pre-compiled
Author
: Babu Dhinakaran S
Blog
: Linuxos4all
Date
: 4/18/2013 12:27:00 PM
'Monitoring AIX with NagiosPurposeThis document describes how to monitor AIX servers using Nagios.OverviewThese instructions cover how to install and use pre-compiled binaries to monitor AIX 5.3 using NRPE.Download Pre-Compiled BinariesYou will need to download two packages of pre-compiled binaries to your AIX server.First download the pre-compiled Nagios plugin binaries for AIX 5.3 from the following URL: http://assets.nagios.com/downloads/nagiosxi/agents/cd /tmpaix53_nrpe-nsca-plug(...)'
Read full article
Nagios service dependency configuration generator script
Author
: Linuxos4all
Blog
: Linuxos4all
Date
: 4/1/2013 7:15:00 AM
'#!/bin/bash#Date : 1st April 2012#Purpose : Nagios service dependency configuration generator script#Authors : Babu Dhinakaran S and Ranjith Kumar R`grep host_name /usr/local/nagios/var/status.dat | cut -d= -f2 | sort | uniq > /tmp/servers`while read linedo`grep -A1 -B0 $line /usr/local/nagios/var/status.dat | grep service_description | cut -d= -f2 > /tmp/tempvariable`count=`wc -l < /tmp/tempvariable`if [ $count -eq 1 ]thencheck=`cat /tmp/tempvariable`if [ "$check" == (...)'
Read full article
Script to check Certificates validity in the Java Key Store
Author
: Babu Dhinakaran S
Blog
: Linuxos4all
Date
: 10/12/2012 12:17:00 PM
'To check Certificates in the Java Key Store:#!/bin/bash# Nagios plugin to check the expiration dates# of Java Cert keystores# Set up some variables# Todays date expressed in Epoch time "seconds since 1970-01-01 00:00:00 UTC"TODAY=`date +"%s"`critical=$2warning=$1c_flag=0w_flag=0OK=0WARNING=1CRITICAL=2UNKNOWN=3count1=0count2=0diffdays_c="in"diffdays_w="in"# keytool location and command line# keytool normally lives here - /opt/java/x64/jdk1.6.0_18/bin/keytoolKEYTOOL="/opt/java/x64/jdk(...)'
Read full article
VBScript to find Fileage and send an e-mail
Author
: Babu Dhinakaran S
Blog
: Linuxos4all
Date
: 10/12/2012 10:26:00 AM
''On Error Resume Next Const ForReading = 1 today = now() Set objMessage = CreateObject("CDO.Message") objMessage.From = "xxxxx@xxxxx.com" objMessage.To = "xxxxxxx@xxx.com" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile("c:\filelist.txt", ForReading) Do Until objTextFile.AtEndOfStream folderspec = objTextFile.Readline 'Wscript.Echo "File in the Folder:" & folderspec objMessage.Subject = folderspec Agecount = 0 Set folder = objFSO.(...)'
Read full article
Check_Churn script;This script will basically to see how much the log files are changing over a user defined period of time
Author
: Babu Dhinakaran S
Blog
: Linuxos4all
Date
: 10/12/2012 10:23:00 AM
'Check_Churn script;This script will basically to see how much the log files are changing over a user defined period of time.It's useful to check how if there are any delay in getting a logfile updated from the start of the file o the end of the file at some instance(depends on the schedule time of the script as well).Syntax to follow: C:\>cscript /nologo "c:\Documents and Settings\bdhinakaran\Desktop\VbScript\check_churn.vbs" -d "c:\\" -p "(iiCFDFXLIVE-SyslogHub-3.3.3-instance1\[(...)'
Read full article
Author
: Babu Dhinakaran S
Blog
: Linuxos4all
Date
: 9/26/2012 1:44:00 PM
'HOWTO – Add check_db Plug-in (check_db)The plug-in can be found at nagios exchange bu this is a modified version which actually uses SERVICE_NAME instead of SID. This has been loaded with the new JDBC connectivity driver for the new Oracle server Connectivity.Description:Nagios plugin to check output of a Oracle sql query, matched with a regular expression. This checks the numeric data to the matched regular expression.Remote oracle database check using JDBC drivers. Supports custom(...)'
Read full article
File Upload and Download Automation
Author
: Babu Dhinakaran S
Blog
: Linuxos4all
Date
: 3/5/2012 7:34:00 AM
'Set oFTPScriptFSO = CreateObject("Scripting.FileSystemObject") Set oFTPScriptShell = CreateObject("WScript.Shell") upFileName = "C:\Users\n1009932\Desktop\test.txt" UserName = "Customer_name" Password = "welcome123" GateWayServer = "prepb2bgw01.jdadelivers.com" sUpldCmd = """c:\Program Files (x86)\WinSCP\WinSCP.com"" -script=" & "C:\Users\n1009932\Desktop\upldfile.txt" sDwnldCmd = """c:\Program Files (x86)\WinSCP\WinSCP.com"" -script=" & "C:\Users\n10(...)'
Read full article
VBScript to find Fileage and send an e-mail
Author
: Babu Dhinakaran S
Blog
: Linuxos4all
Date
: 11/7/2011 12:37:00 PM
''On Error Resume NextConst ForReading = 1today = now()Set objMessage = CreateObject("CDO.Message")objMessage.From = "babu.dhinakaran@jda.com" objMessage.To = "babu.dhinakaran@jda.com" Set objFSO = CreateObject("Scripting.FileSystemObject")Set objTextFile = objFSO.OpenTextFile("c:\filelist.txt", ForReading)Do Until objTextFile.AtEndOfStream folderspec = objTextFile.Readline 'Wscript.Echo "File in the Folder:" & folderspec objMessage.Subject = folderspec Agecount = 0 Set folder (...)'
Read full article