Search Engine: Elastic

Article ID: 4092, created on Mar 24, 2008, last review on May 9, 2014

  • Applies to:
  • Sphera


How to check the validation of hostdir.xml file.


This small python script will check the validation of hostdir.xml file.
1) Download the file to [sphera_base]/plugins/bin/
2) Run the script:
[sphera_base]/plugins/bin/./Spython [xml_file]
If hostdir.xml is valid, it prints OK, otherwise it prints number of problematic line.

Example for problems in XML:
[root@gillinux bin]# ./Spython /usr/local/hostdir/conf/hostdir.xml
:76037:8: not well-formed (invalid token)

VI the hostdir.xml and jump to line number 76037

If you need to edit the xml, please dont forget to Stop SD and backup the file prior any change.

The script can be found in our FTP under:


5f478287f7e74fe9b07217d8131cd741 3ef1f5f998c0dc182718a7fe4376f875

Email subscription for changes to this article
Save as PDF