Ad Widget

Collapse

XML export/import and certain characters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Markus
    Member
    • Jan 2006
    • 39

    #1

    XML export/import and certain characters

    Hi

    under certain conditions the export feature produces invalid XML. This happens for instance when a trigger contains a '<' (less than) comparison. The exported XML looks like this which is invalid. In fact, it cannot be re-imported.

    <trigger>
    <description>{HOSTNAME} was rebooted</description>
    <expression>{{HOSTNAME}:sysUpTime.last(0)}<300</expression>
    </trigger>

    The correct method is to replace '<' with '&lt;' as shown below. On import this gets replaced correctly.

    <trigger>
    <description>{HOSTNAME} was rebooted</description>
    <expression>{{HOSTNAME}:sysUpTime.last(0)}&lt;30 0</expression>
    </trigger>
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Thanks for reporting this.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    Working...