Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeRDark
collapsetrue
Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/MYHOST.mk
 + "Migrating fs_used name" failed
Traceback (most recent call last):
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 1700, in close
    self.parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/mysite/lib/python3/cmk/update_config.py", line 158, in run
    step_func()
  File "/omd/sites/mysite/lib/python3/cmk/update_config.py", line 199, in _update_fs_used_name
    cmk.update_rrd_fs_names.update()
  File "/omd/sites/mysite/lib/python3/cmk/update_rrd_fs_names.py", line 186, in update
    update_service_info(config_cache, get_hostnames(config_cache))
  File "/omd/sites/mysite/lib/python3/cmk/update_rrd_fs_names.py", line 176, in update_service_info
    update_files(hostname, service.description, service.item, 'pnp4nagios'))
  File "/omd/sites/mysite/lib/python3/cmk/update_rrd_fs_names.py", line 84, in update_files
    metrics = get_metrics(filepath, source)
  File "/omd/sites/mysite/lib/python3/cmk/update_rrd_fs_names.py", line 74, in get_metrics
    root = ET.parse(filepath).getroot()
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 1202, in parse
    tree.parse(source, parser)
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 602, in parse
    self._root = parser.close()
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 1702, in close
    self._raiseerror(v)
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 1602, in _raiseerror
    raise err
  File "<string>", line None
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
Traceback (most recent call last):
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 1700, in close
    self.parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/mysite/bin/cmk-update-config", line 12, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/omd/sites/mysite/lib/python3/cmk/update_config.py", line 1213, in main
    has_errors = UpdateConfig(logger, arguments).run()
  File "/omd/sites/mysite/lib/python3/cmk/update_config.py", line 158, in run
    step_func()
  File "/omd/sites/mysite/lib/python3/cmk/update_config.py", line 199, in _update_fs_used_name
    cmk.update_rrd_fs_names.update()
  File "/omd/sites/mysite/lib/python3/cmk/update_rrd_fs_names.py", line 186, in update
    update_service_info(config_cache, get_hostnames(config_cache))
  File "/omd/sites/mysite/lib/python3/cmk/update_rrd_fs_names.py", line 176, in update_service_info
    update_files(hostname, service.description, service.item, 'pnp4nagios'))
  File "/omd/sites/mysite/lib/python3/cmk/update_rrd_fs_names.py", line 84, in update_files
    metrics = get_metrics(filepath, source)
  File "/omd/sites/mysite/lib/python3/cmk/update_rrd_fs_names.py", line 74, in get_metrics
    root = ET.parse(filepath).getroot()
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 1202, in parse
    tree.parse(source, parser)
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 602, in parse
    self._root = parser.close()
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 1702, in close
    self._raiseerror(v)
  File "/omd/sites/mysite/lib/python3.8/xml/etree/ElementTree.py", line 1602, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0


How to debug that:

Info

In the first line of the cmk-update-config -vv --debug output there is already a hint to the corresponding host:

Code Block
languagebash
themeRDark
Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/MYHOST.mk

Please fetch that name and remove the .mk suffix. Now you have the Hostname. In my case it's MYHOST.

Now you can use xmllint to debug that:

Code Block
languagebash
themeRDark
OMD[mysite]:~$ xmllint  -noout --format var/pnp4nagios/perfdata/MYHOST/*xml
var/pnp4nagios/perfdata/MYHOST/Filesystem_E__.xml:1: parser error : Document is empty

^

It seems that there is one xml file with no correpsonding rrd file and this xml file is also empty. Please remove that file and run cmk-update-config -vv --debug again