- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script for monitoring listener
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:28 AM
04-15-2003 10:28 AM
Script for monitoring listener
Does anybody have a customized script to monitor multiple listeners running on Oracle database server whether they are UP/running.
Thanks,
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:30 AM
04-15-2003 10:30 AM
Re: Script for monitoring listener
Zafar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:32 AM
04-15-2003 10:32 AM
Re: Script for monitoring listener
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:43 AM
04-15-2003 10:43 AM
Re: Script for monitoring listener
1.parse the listener.ora file to capture listener names.
2. Store listener names from step 1 in a temporary file.
3. execute tnsping against each listener name from temporary file
Thanks,
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:49 AM
04-15-2003 10:49 AM
Re: Script for monitoring listener
ORACLE_HOME=/path/to/oracle $ORACLE_HOME/bin/tnsping
TNS Ping Utility for Linux: Version 9.2.0.1.0 - Production on 15-APR-2003 13:45:57
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/home/oracle/OraHome2/network/admin/sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=sasidw.))(ADDRESS=(PROTOCOL=TCP)(HOST=sasidw)(PORT=1521)))
OK (10 msec)
We are using the monitoring tool nagios (http://www.nagios.org) to monitoring multiple hosts and services. It includes a check_oracle plugin that uses tnsping.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:57 AM
04-15-2003 10:57 AM
Re: Script for monitoring listener
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 11:02 AM
04-15-2003 11:02 AM
Re: Script for monitoring listener
Thanks,
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 12:53 AM
04-16-2003 12:53 AM
Re: Script for monitoring listener
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 04:17 AM
04-16-2003 04:17 AM
Re: Script for monitoring listener
Thanks....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 03:39 AM
05-13-2003 03:39 AM
Re: Script for monitoring listener
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 03:43 AM
05-13-2003 03:43 AM
Re: Script for monitoring listener
#!/usr/bin/sh
#
# to check oracle config file listener.ora and available datrabase instances
#
# directory location
# /tools/oracle/8.0.6/network/admin
# files
# listener.ora
#
FILE="listener.ora"
DIR=/tools/oracle/8.0.6/network/admin
BIN=/usr/bin/local
VAR=/var/patrol/monitor
LOG=$VAR/$(basename $0).log
HOST=$(hostname)
export ORACLE_HOME=/tools/oracle/8.0.6
export ORACLE_BIN=$ORACLE_HOME/bin
#
# cleanup log file
#
[ -f $LOG ] && tail -100 $LOG > ${LOG}.tmp && mv ${LOG}.tmp $LOG
#
#
# is server running a package
cmviewcl -l package | sed -e /^$/d -e /^.*NODE.*$/d| read PKG STATUS STATE PKG_SWITCH PKG_NODE
#
# set the tnsnames server
[ "x$PKG_NODE" = "x$HOST" ] && TNS_HOST=$PKG || echo "$(date "+%d/%m/%y %H:%M") - Package $PKG not running on this host" >> $LOG ; exit 0
#
# get a list of the SIDs that should be available according to
# the listener.ora file
SID_LIST=$(grep $TNS_HOST...PR $DIR/$FILE | awk -F. '{print $NF}' | sed 's/)//')
#
# check tsnping for each server
for SID in $SID_LIST
do
if $($ORACLE_BIN/tnsping $SID | grep -q OK)
then
echo "$(date "+%d/%m/%y %H:%M") - SID $SID is OK in $FILE" >> $LOG
else
echo "$(date "+%d/%m/%y %H:%M") - Error for SID $SID in $FILE" >> $LOG
$BIN/patrol_alert.3181 global "Error for SID $SID in $FILE"
fi
done