How-to debug corrupted xml filel of pnp4nagios
This article expands on our Troubleshooting errors during the RRD conversion guide, which outlines common issues in converting pnp4nagios to Round Robin Database (RRD) and offers basic debugging steps.
LAST TESTED ON CHECKMK 2.0.0P1
XMLLINT parses xml files and can give you a detailed error.
Step-by-step guide
Install xmllint
root@linux~$ apt -y install libxml2-utilRun that for loop with xmllint and some debug as site user. This command will also write the result to a file called
xmllint.log.root@linux~$ su - mysite OMD[mysite]:~$ for i in $(find ~/var/pnp4nagios/perfdata/ -name "*xml"); do echo "#####$i####"; xmllint --debug --format $i; echo "#####" ;done &> xmllint.logWith the parameter
--noout, xmllint will show you only the errors and not the whole structure of the xml files.root@linux~$ su - mysite OMD[mysite]:~$ for i in $(find ~/var/pnp4nagios/perfdata/ -name "*xml"); do echo "#####$i####"; xmllint --noout --debug --format $i; echo "#####" ;done &> xmllint_only_debug.logCheck if we already provide a solution here: Troubleshooting errors during the RRD conversion.
If there is no solution, you can open a support case and provide us with the log. Then we can analyze that.