Perl Script to monitor OV Platform: HPUX 11i Perl Version: 5.8.8

helmetpastoralΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 8 μήνες)

168 εμφανίσεις

Perl Script to monitor OV

Platform: HPUX 11i

Perl Version: 5.8.8



1. Run the following commands.



# ovstatus



Exclude monitoring of “genaanosrvr”, “httpd”, and “ovctrl” because their
status is unknown in normal situation.



Make a list of all daemons (
the first column) for which the State column
(third column) is not “RUNNING”. Then email “OVSTATUS problem
-

<list of daemons> not
running on `hostname`” to the list of recipients.


Sample (Good) output of ovstatus


root@ds0demt2# ovstatus
-
c


Name

P
ID
State
Last Message(s)


OVsPMD 3166 RUNNING
-


ovsessionmgr 3202 RUNNING Initialization complete.


ovwdb 3203 RUNNING Initialization complete.


ovuispmd 3295 RUNNING Initialized. 0 ovw

clients registered.


ovtrapd

3288 RUNNING Initialization complete.


ovactiond

3289 RUNNING Initialization complete.


ovalarmsrv

3290 RUNNING Initialization complete.


pmd

3204 RUNNING Initialization c
omplete.


genannosrvr

-


unknown (Does not communicate with ovspmd.)


httpd

-


unknown (Does not communicate with ovspmd.)


ovtopmd


3287
RUNNING Connected to native database "openview".


netmon

3296 RUNNIN
G Initialization complete.


ovrequestd

3208 RUNNING Initialization complete.


ovctrl

-


unknown (Does not communicate with ovspmd.)


ovoacomm

3369 RUNNING Open Agent Service Server Initialization Complete.



opc

3390 RUNNING OVO Server Initialization Complete.


ovas

3370 RUNNING Initialization complete.


ovdbcheck

3292 RUNNING Connected to embedded database.



2. Run the following command.



# ovc

Make a list of daemons name (the first column) for which the status is not “Running”
(the last column). Then email one message that “OVC Problem
-

<list of daemons> not
running on `hostname`” to the list of recipients.


Sample “Good” output of ovc


root@
ds0demt2# ovc

ovcd
OV Co
ntrol

CORE (2593) Running

ovbbccb OV Co
mmunication Broker
CORE (2599) Running

ovconfd OV Config and Deploy COREXT (2600) Running

ovcs

OV Certificate Server SERVER (3217) Running

coda OV Performance Core AGENT,CODA (2629) Running

opcmsga

OVO Message Agent AGENT,EA (2630) Running

opcacta OVO Action Agent

AGENT,EA (2631) Running

opcmsgi OVO Message Interceptor AGENT,EA (2632) Running

opcle OVO Logfile Encapsulator AGENT,EA (2633) Running

opcmona

OVO Monitor Agent AGENT
,EA (2634) Running

opctrapi OVO SNMP Trap Interceptor AGENT,EA (2635) Running

ovobsag OV Object Server Agent OBS (2683) Running



3. Run the following command.

# opcagt


Make a list of daemons name (the

first column) for which the status is not “Running”
(the last column). Then email one message that “OPCAGT Problem
-

<list of daemons>
not running on `hostname`” to the list of recipients.


Sample “Good” output of opcagt


root@ds0demt2# opcagt

coda

OV Pe
rformance Core
AGENT,CODA (2629) Running

opcmsga OVO Message Agent AGENT,EA (2630) Running

opcacta OVO Action Agent AGENT,EA (2631) Running

opcmsgi OVO Message Interce
ptor AGENT,EA (2632) Running

opcle OVO Logfile Encapsulator AGENT,EA (2633) Running

opcmona OVO Monitor Agent AGENT,EA (2634) Running

opctrapi OVO SNMP Trap Interceptor AGENT
,EA (2635) Running





4. Run the following command.

# opcsv



Make a list of daemons name (the second column) for which the status is not “running”
(the last column). Then email one message that “OPCSV Problem
-

<list of daemons>
not running on `
hostname`” to the list of recipients.



Sample “Good” output of opcsv



root@ds0demt2# opcsv

OVO Management Server status:

-----------------------------

Control Manager

opcctlm

(3390) is running

Event Corr. Mgr

opcecm

(3411
) is running

Action Manager

opcactm

(3413) is running

Message Manager

opcmsgm

(3414) is running

TT & Notify Mgr

opcttnsm

(3415) is running

Forward Manager

opcforwm

(3416) is running

Service Eng
ine

opcsvcm

(3421) is running

ECS Anno. Mgr

opcecmas

(3412) is running

Cert. Srv Adapter

opccsad

(3419) is running

BBC config adapter

opcbbcdist

(3420) is running

Display Manager

opcdispm


(3417) is running

Distrib. Manager

opcdistm

(3418) is running


Open Agent Management status:

-----------------------------

Request Sender

ovoareqsdr

(3369) is running

Request Handler

ovoareqhdlr

(3387) is runnin
g

Message Receiver (HTTPS)

opcmsgrb

(3388) is running

Message Receiver (DCE)

opcmsgrd

(3389) is running


OV Control Core components status:

----------------------------------

OV Control

ovcd

(2593) is running

OV Commun
ication Broker

ovbbccb

(2599) is running

OV Certificate Server

ovcs

(3217) is running




5. Check TELALERT



COUNT=`ps
-
ef | grep telalert | grep
-
v grep | wc
-
l`

if [[ $COUNT
-
lt 2 ]]

then


TA_MESSAGE="Telalert Processes are n
ot running on `hostname`"


Send TA_MESSAGE to the List of Recipients

fi


#

# Check if Telalert Queue is backed up and issue ITO alert if so

#


if [ `/opt/telalert/bin/telalert
-
show|wc
-
l`
-
ge 200 ]

then


TA_MESSAGE="FYI
-

Telalert Queue is F
ull. Automatic action will clear th

e queue."


/opt/OV/bin/OpC/opcmsg a=NSM msg_grp=OS o=Telalert s=critical msg_text="

$TA_MESSAGE"


SEND $TA_MESSAGE to the list of recipients

fi


#

# Copy Telalert trail file to /var/DCG /LOGS

#


DATE_TIME=`date '+
%Y%m'`

TELALERT_TRAIL="telalert.trail"

TELALERT_DIR="/var/opt/telalert"

BACKUP_TRAIL_FILE="/var/DCG/LOGS/$TELALERT_TRAIL.$DATE_TIME"


cat $TELALERT_DIR/$TELALERT_TRAIL >> $BACKUP_TRAIL_FILE


exit 0