Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Help!! Why my XML data is not recorded in DB?

  • Help!! Why my XML data is not recorded in DB?

    Posted by oneline on September 6, 2010 at 18:40

    I am generating simple XML data as below


    5min
    generic_data
    73.3
    2010-09-06 22:05:00

    I found that whenever if i have data of the same value in my next XML entry, the data will not be recorded in database. Can anyone explain why? How can I recover my data? Many thanks!!!

    Cheers,
    Chong

    oneline replied 14 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Sancho

    Administrator
    September 6, 2010 at 23:16
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Excellent question. I’ve added also a FAQ entry here: http://openideas.info/wiki/index.php?title=Pandora:FAQ#I_want_to_generate_my_own_XML.2C_simulating_data_from_an_agent.2C_why_my_XML_doesnt_work

    Thanks for asking interesting things 🙂

    At first sight the XML lacks of interval parameter in and if my memory doesn’t trick me, the timestamp information inside the module data is not allowed if it’s not contained in a datalist structure. I’m almost sure that following XML would work:



    5min
    generic_data


    73.3
    2010-09-06 22:05:00



    Or a simple one witout data information:



    5min
    generic_data
    73.3

    I am generating simple XML data as below



    5min
    generic_data
    73.3
    2010-09-06 22:05:00

    I found that whenever if i have data of the same value in my next XML entry, the data will not be recorded in database. Can anyone explain why? How can I recover my data? Many thanks!!!

    Cheers,
    Chong

  • oneline

    Member
    September 7, 2010 at 08:36
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Thanks Sancho, in fact, my XML format was working fine. Just that, the data values will not be recorded in DB if you have the same data value for 2 consecutive entry with different timestamp. Eg.



    5min
    generic_data
    73.3
    2010-09-06 22:05:00

    and



    5min
    generic_data
    73.3
    2010-09-06 22:10:00

    The timestamp above is different but Pandora only takes 2010-09-06 22:05:00. I wonder this is a bug or if we can solve it using configurations or XML format.

    I have given a try to your XML format. It seems like XML with as below does not take my timestamp. It will only take system’s timestamp. Can you advise ? Thanks.



    5min
    generic_data


    73.3
    2010-09-06 22:05:00