You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a character cleanup for function "find_pnp_perfdata_xml" to avoid problems with service names like "fs_/" or "Interface 2" which are typical names in a check_mk environment.
Chars like "/" ":" "" SPACE must be replaced with "_"
Quick fix:
def find_pnp_perfdata_xml(name, request):
"""Check if a pnp xml file exists for a given host or service name."""
if request.pnp_path_readable:
if '/' in name:
# It is a service
name = name.split('/',1)
replace = { "/": "_", " ": "_", "\\": "_", ":": "_"}
name[1] = "".join(replace.get(c, c) for c in name[1])
#if os.access(request.pnp_path + '/' + name + '.xml', os.R_OK):
if os.access(request.pnp_path + '/' + name[0] + '/' + name[1] + '.xml', os.R_OK):
return 1
else:
# It is a host
if os.access(request.pnp_path + '/' + name + '/_HOST_.xml', os.R_OK):
return 1
# If in doubt, there is no pnp file
return 0
The text was updated successfully, but these errors were encountered:
There should be a character cleanup for function "find_pnp_perfdata_xml" to avoid problems with service names like "fs_/" or "Interface 2" which are typical names in a check_mk environment.
Chars like "/" ":" "" SPACE must be replaced with "_"
Quick fix:
def find_pnp_perfdata_xml(name, request):
"""Check if a pnp xml file exists for a given host or service name."""
The text was updated successfully, but these errors were encountered: