diff --git a/src/LHCbDIRAC/ResourceStatusSystem/Agent/NagiosTopologyAgent.py b/src/LHCbDIRAC/ResourceStatusSystem/Agent/NagiosTopologyAgent.py index 823e4eb7310df58f9d87fcc716035a07879c2738..9dbe981b0937389f9abd9323bb42595892f8816b 100644 --- a/src/LHCbDIRAC/ResourceStatusSystem/Agent/NagiosTopologyAgent.py +++ b/src/LHCbDIRAC/ResourceStatusSystem/Agent/NagiosTopologyAgent.py @@ -167,22 +167,21 @@ class NagiosTopologyAgent(AgentModule): diracSE = StorageElement(se) # this 'se' is .e.g. 'CERN-DST-EOS' seDetailsForDIRACSE = dict() seStorageSharesForDIRACSE = dict() + writeProtocols = diracSE.localWriteProtocolList for diracSEoption in diracSE.protocolOptions: # Building the storage_endpoints section seDetails = dict() + proto = diracSEoption["Protocol"] ep = os.path.join( - diracSEoption["Protocol"] - + "://" - + diracSEoption["Host"].strip("/") - + ":" - + diracSEoption["Port"], + proto + "://" + diracSEoption["Host"].strip("/") + ":" + diracSEoption["Port"], diracSEoption["Path"].strip("/"), ) seDetails["endpoint_url"] = ep seDetails["ipv6_status"] = isHostIPV6(urlparse(ep).hostname) - seDetails["interface_type"] = diracSEoption["Protocol"] + seDetails["interface_type"] = proto seDetails["monitored"] = "yes" if wlcgName else "no" seDetails["quality_level"] = "production" + seDetails["read_only"] = not (proto in writeProtocols) dseep = "_".join([se, diracSEoption["Protocol"]]) # just a unique name e.g. 'CERN-DST-EOS_root' seDetailsForDIRACSE[dseep] = seDetails