Commit fb7294b8 authored by Marian Babik's avatar Marian Babik
Browse files

WN env and path fixes

parent 836680f3
......@@ -12,8 +12,6 @@ FLAVOR_MAP = {'CREAM-CE': 'cream',
'GLOBUS': 'gt',
'OSG-CE': 'gt'}
SAME_CODES = {'OK': 0, 'INFO': 3, 'NOTICE': 3, 'WARNING': 1, 'ERROR': 2, 'CRITICAL': 2, 'MAINTENANCE': 3}
CE_STATE_METRICS = [
'org.sam.CONDOR-JobState-/cms/Role=lcgadmin']
......@@ -38,9 +36,6 @@ XROOT_METRICS = (
WN_METRICS = {
'WN-cvmfs': 'org.cms.WN-cvmfs-/cms/Role=lcgadmin',
}
WN_METRICS_LEGACY = {
'CE-cms-analysis.sing': 'org.cms.WN-analysis-/cms/Role=lcgadmin',
'CE-cms-singularity': 'org.cms.WN-isolation-/cms/Role=lcgadmin',
'CE-cms-basic': 'org.cms.WN-basic-/cms/Role=lcgadmin',
......@@ -52,6 +47,18 @@ WN_METRICS_LEGACY = {
'CE-cms-xrootd-fallback.sing': 'org.cms.WN-xrootd-fallback-/cms/Role=lcgadmin'
}
WN_METRICS_LEGACY = ( # metrics that don't provide summary (SFT/SAME metrics)
'org.cms.WN-analysis-/cms/Role=lcgadmin',
'org.cms.WN-isolation-/cms/Role=lcgadmin',
'org.cms.WN-basic-/cms/Role=lcgadmin',
'org.cms.WN-env-/cms/Role=lcgadmin',
'org.cms.WN-frontier-/cms/Role=lcgadmin',
'org.cms.WN-mc-/cms/Role=lcgadmin',
'org.cms.WN-squid-/cms/Role=lcgadmin',
'org.cms.WN-xrootd-access-/cms/Role=lcgadmin',
'org.cms.WN-xrootd-fallback-/cms/Role=lcgadmin'
)
def run(url, ipv6=False):
log.info("Processing vo feed: %s" % url)
......@@ -81,7 +88,6 @@ def run(url, ipv6=False):
c = Checks()
c.add_all(CE_METRICS, tags=["CREAM-CE", "ARC-CE", "HTCONDOR-CE"])
c.add_all(WN_METRICS.values(), tags=["CREAM-CE", "ARC-CE", "HTCONDOR-CE"])
c.add_all(WN_METRICS_LEGACY.values(), tags=["CREAM-CE", "ARC-CE", "HTCONDOR-CE"])
c.add_all(SE_METRICS, tags=["SRM"])
c.add_all(XROOT_METRICS, tags=["XROOTD"])
# IPv6
......@@ -115,18 +121,19 @@ def run(url, ipv6=False):
# ETF env - environment variables to export on the worker node (global for all sites), such as:
# ETF_TESTS - points to a list of WN tests to execute (stored in WN_METRICS)
# ETF_LEGACY should be a subset of ETF_TESTS that identifies SFT tests (those that are not nagios compliant)
# SAME* environment variables are needed by the legacy/SFT tests
# SAME* environment needed by the legacy/SFT tests
with open('/tmp/etf-env.sh', 'w') as etf_env:
etf_env.write('ETF_TESTS={}\n'.format(','.join(['etf/probes/org.cms/'+m for m in WN_METRICS.keys()])))
etf_env.write('ETF_TESTS={}\n'.format(
','.join(['etf/probes/org.cms/testjob/tests/'+m for m in WN_METRICS.keys()])))
etf_env.write('ETF_LEGACY={}\n'.format(
','.join(['etf/probes/org.cms/' + m for m in WN_METRICS_LEGACY.keys()])))
for code, value in SAME_CODES.items():
etf_env.write('SAME_{}={}\n'.format(code, value))
','.join(['etf/probes/org.cms/testjob/tests/' + m for m in WN_METRICS_LEGACY])))
# for code, value in SAME_CODES.items():
# etf_env.write('SAME_{}={}\n'.format(code, value))
etf_env.write('SAME_VO=cms\n')
etf_env.write('SAME_TEST_DIRNAME=$HOME/etf/probes/org.cms/testjob/tests\n')
etf_env.write('SAME_SENSOR_HOME=$HOME/etf/probes/org.cms/testjob\n')
etf_env.write('SAME_TEST_DIRNAME=$ETFROOT/probes/org.cms/testjob/tests\n')
etf_env.write('SAME_SENSOR_HOME=$ETFROOT/probes/org.cms/testjob\n')
# ETF WN-qFM config - maps WN tests to metrics (WN-cvmfs -> org.lhcb.WN-cvmfs-/lhcb/Role=production)
# ETF WN-qFM config - maps WN scripts back to metrics (WN-cvmfs -> org.lhcb.WN-cvmfs-/lhcb/Role=production)
with open('/tmp/etf_wnfm.json', 'w') as etf_wnfm:
json.dump({'wn_metric_map': WN_METRICS, 'counter_enabled': True}, etf_wnfm)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment