Ad Widget

Collapse

XML Parsing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Voxie
    Junior Member
    • Jul 2009
    • 24

    #1

    XML Parsing

    Hi,

    We have an device that only can provide me information in a XML file.
    Is it possible to pull the information from the XML file and import it into zabbix.

    I can create an script to do it for me but maybe somebody already created it.
  • diveratis
    Junior Member
    • Aug 2013
    • 4

    #2
    It depends what "data" refers to as this could refer to anything.

    I believe you can just directly import the .xml file into the ZABBIX Webserver.
    provided it follows the standard Zabbix template

    If you wanted to do this via API:

    Refer to:


    In the example provided above, you can similarly set 'format' : 'xml' and then set the source as the entire xml file. Note the 'source' : '<entire xml file as a string>' portion, so you'll need to do some sort of file.open -> read the entire file and set it to a variable. I've had some really annoying problems doing this if the .xml file was large though.

    There are already some pre-existing scripts in:
    Join the friendly and open Zabbix community on our forums and social media platforms.

    If you wanted to build off an existing one, but I figured it's probably easier to create your own.

    Comment

    Working...