Qualys sync: hostname depuis FQDN > NetBIOS > name (evite troncature display name)
This commit is contained in:
parent
7eb56bc9cd
commit
71260e20c3
@ -621,10 +621,13 @@ def _refresh_all_agents_impl(db):
|
|||||||
if new_last_id is None or aid_int > new_last_id:
|
if new_last_id is None or aid_int > new_last_id:
|
||||||
new_last_id = aid_int
|
new_last_id = aid_int
|
||||||
name = (parse_xml(block, "name") or [""])[0]
|
name = (parse_xml(block, "name") or [""])[0]
|
||||||
hostname = name.split(".")[0].lower() if name else ""
|
|
||||||
address = (parse_xml(block, "address") or [""])[0]
|
address = (parse_xml(block, "address") or [""])[0]
|
||||||
fqdn = (parse_xml(block, "fqdn") or [""])[0]
|
fqdn = (parse_xml(block, "fqdn") or [""])[0]
|
||||||
|
netbios = (parse_xml(block, "netbiosName") or [""])[0]
|
||||||
os_val = (parse_xml(block, "os") or [""])[0]
|
os_val = (parse_xml(block, "os") or [""])[0]
|
||||||
|
# Priorite FQDN > NetBIOS > name (display Qualys peut etre tronque)
|
||||||
|
hostname_src = fqdn or netbios or name
|
||||||
|
hostname = hostname_src.split(".")[0].lower() if hostname_src else ""
|
||||||
|
|
||||||
agent_status = ""
|
agent_status = ""
|
||||||
agent_version = ""
|
agent_version = ""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user