Tags:
create new tag
,
view all tags
Foi acrescentado ao <i>script</i> de monitoramento automático uma rotina para verificar o <i>status</i> dos agentes do Phedex. %CODE{"sh" num="1"}% #!/bin/sh function WriteLn(){ echo "$1" } function ReportToTeam(){ echo "$1: $2" } TIER="T2_IN_TIFR" #TIER="T2_BR_SPRACE" PHEDEX_PROD_URL="http://cmsweb.cern.ch/phedex/prod/Components::Status" PHEDEX_DEBG_URL="http://cmsweb.cern.ch/phedex/debug/Components::Status" PRODUCTION_STATUS=`links -source $PHEDEX_PROD_URL` DEBUG_STATUS=`links -source $PHEDEX_DEBG_URL` PROD_POSITION=`echo "$PRODUCTION_STATUS" | grep -n "$TIER" | awk -F: '{print $1}'` DEBG_POSITION=`echo "$DEBUG_STATUS" | grep -n "$TIER" | awk -F: '{print $1}'` echo debg-position $DEBG_POSITION if [ "$PROD_POSITION" != "" ];then SED_DATA="$PROD_POSITION,$((PROD_POSITION+3))p" PROD_CODE=`echo "$PRODUCTION_STATUS" | sed -n $SED_DATA | sed 's/<[^>]*>/ /g'` # PROD_CODE=`echo "$PRODUCTION_STATUS" | sed -n $SED_DATA` IS_AGENT_DOWN=`echo "$PROD_CODE" | grep DOWN` if [ "$IS_AGENT_DOWN" != "" ];then ReportToTeam "PHEDEX-DOWN" "Phedex(production) agent down" WriteLn "Phedex(production) agents down." exit 0 else WriteLn "Phedex(production) agents are OK." fi fi if [ "$DEBG_POSITION" != "" ];then SED_DATA="$DEBG_POSITION,$((DEBG_POSITION+3))p" DEBG_CODE=`echo "$DEBUG_STATUS" | sed -n $SED_DATA | sed 's/<[^>]*>/ /g'` # PROD_CODE=`echo "$PRODUCTION_STATUS" | sed -n $SED_DATA` IS_AGENT_DOWN=`echo "$DEBG_CODE" | grep DOWN` if [ "$IS_AGENT_DOWN" != "" ];then ReportToTeam "PHEDEX-DOWN" "Phedex(debug) agent down" WriteLn "Phedex(debug) agents down." exit 0 else WriteLn "Phedex(debug) agents are OK." fi fi %ENDCODE% Caso algum agente esteja <i>down</i> um email é enviado para a lista de discussão dos <i>sysadmins</i> do sprace. -- Main.JadirSilva - 14 Jan 2009
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2009-02-09
-
JadirSilva
Home
Site map
Main web
Sandbox web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback