Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
etf
cmssam
Commits
67294a10
Commit
67294a10
authored
Mar 30, 2021
by
Marian Babik
Browse files
default to ARC native client except for ARC_GSIFTP_LIST
parent
39846c7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
nagios/config/etf_plugin_cms.py
View file @
67294a10
...
...
@@ -46,6 +46,12 @@ WN_METRICS = {
'CE-cms-xrootd-fallback.sing'
:
'org.cms.WN-xrootd-fallback-/cms/Role=lcgadmin'
}
ARC_GSIFTP_LIST
=
[
'arc-ce01.gridpp.rl.ac.uk'
,
'arc-ce02.gridpp.rl.ac.uk'
,
'arc-ce03.gridpp.rl.ac.uk'
,
'arc-ce04.gridpp.rl.ac.uk'
,
'arc-ce05.gridpp.rl.ac.uk'
,
'ce01.gla.scotgrid.ac.uk'
,
'ce02.gla.scotgrid.ac.uk'
,
'ce04.gla.scotgrid.ac.uk'
,
'ceitep.itep.ru'
,
'grid72.phy.ncu.edu.tw'
,
'grid-arcce0.desy.de'
,
'grid-arcce1.desy.de'
]
# legacy SFT/SAME metrics which are not nagios compliant
WN_METRICS_LEGACY
=
[
x
for
x
in
WN_METRICS
.
keys
()
if
'CE'
in
x
]
...
...
@@ -132,7 +138,7 @@ def run(url, ipv6=False):
host
=
service
[
0
]
flavor
=
service
[
1
]
endpoint
=
service
[
2
]
if
len
(
service
)
>
2
else
None
if
flavor
not
in
[
"ARC-CE"
,
"GLOBUS"
,
"HTCONDOR-CE"
]:
if
flavor
not
in
[
"ARC-CE"
,
"HTCONDOR-CE"
]:
continue
if
flavor
==
'HTCONDOR-CE'
:
# special handling for HTCONDOR-CE, no queues
...
...
@@ -150,36 +156,23 @@ def run(url, ipv6=False):
log
.
warning
(
"Unable to determine type for flavour %s"
%
flavor
)
continue
res
=
"%s://%s/%s/%s/%s"
%
(
FLAVOR_MAP
[
flavor
],
host
,
'nosched'
,
batch
,
queue
)
if
flavor
==
'ARC-CE'
:
# ARC native client
if
endpoint
:
c
.
add
(
'org.sam.ARC-JobState-/cms/Role=lcgadmin'
,
hosts
=
(
service
[
0
],),
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
,
'--arc-rsl'
:
'
\'
(memory=2000)
\'
'
,
'--arc-debug'
:
'VERBOSE'
,
'--arc-sub-type'
:
'emies'
,
'--arc-ce'
:
'https://{}/arex'
.
format
(
endpoint
)}})
else
:
c
.
add
(
'org.sam.ARC-JobState-/cms/Role=lcgadmin'
,
hosts
=
(
service
[
0
],),
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
,
'--arc-rsl'
:
'
\'
(memory=2000)
\'
'
,
'--arc-debug'
:
'VERBOSE'
,
'--arc-sub-type'
:
'emies'
}})
continue
# GLOBUS ?
log
.
warning
(
"Unexpected host/flavor: {} {}"
.
format
(
host
,
flavor
))
c
.
add
(
'org.sam.CONDOR-JobState-/cms/Role=lcgadmin'
,
hosts
=
(
service
[
0
],),
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
}})
else
:
# no queues
res
=
"%s://%s/%s/%s/%s"
%
(
FLAVOR_MAP
[
flavor
],
host
,
'nosched'
,
'nobatch'
,
'noqueue'
)
if
flavor
==
'ARC-CE'
:
# ARC native client
if
endpoint
:
c
.
add
(
'org.sam.ARC-JobState-/cms/Role=lcgadmin'
,
hosts
=
(
service
[
0
],),
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
,
'--arc-rsl'
:
'
\'
(memory=2000)
\'
'
,
'--arc-debug'
:
'VERBOSE'
,
'--arc-sub-type'
:
'emies'
,
'--arc-ce'
:
'https://{}/arex'
.
format
(
endpoint
)}})
else
:
c
.
add
(
'org.sam.ARC-JobState-/cms/Role=lcgadmin'
,
hosts
=
(
service
[
0
],),
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
,
'--arc-rsl'
:
'
\'
(memory=2000)
\'
'
,
'--arc-debug'
:
'VERBOSE'
,
'--arc-sub-type'
:
'emies'
}})
continue
# ARC-CEs
if
host
not
in
ARC_GSIFTP_LIST
:
# ARC native client using A-REX except for ARC_GSIFTP_LIST
if
endpoint
:
c
.
add
(
'org.sam.ARC-JobState-/cms/Role=lcgadmin'
,
hosts
=
(
service
[
0
],),
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
,
'--arc-rsl'
:
'
\'
(memory=2000)
\'
'
,
'--arc-debug'
:
'VERBOSE'
,
'--arc-sub-type'
:
'emies'
,
'--arc-ce'
:
'https://{}/arex'
.
format
(
endpoint
)}})
else
:
c
.
add
(
'org.sam.ARC-JobState-/cms/Role=lcgadmin'
,
hosts
=
(
service
[
0
],),
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
,
'--arc-rsl'
:
'
\'
(memory=2000)
\'
'
,
'--arc-debug'
:
'VERBOSE'
,
'--arc-sub-type'
:
'emies'
}})
else
:
# ARC GSIFTP via HT-Condor for others
c
.
add
(
'org.sam.CONDOR-JobState-/cms/Role=lcgadmin'
,
hosts
=
(
service
[
0
],),
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
}})
params
=
{
'args'
:
{
'--resource'
:
'%s'
%
res
,
'--arc-rsl'
:
'
\'
(memory=2000)
\'
'
}})
c
.
serialize
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment