Cacti / plugin_reportit

ReportIt Plugin for Cacti
GNU General Public License v2.0
7 stars 8 forks source link

Import of template fail #80

Open gmourani opened 5 years ago

gmourani commented 5 years ago

I've created a new template then tried to import it after a fresh re-install of Cacti with reportit without success.

Here the error message during import time: Checksun error with Template 1 in xml file.

screen shot 2018-11-27 at 4 04 32 pm

Regards,

netniV commented 5 years ago

Was it the same version of reportit? I made some radical changes to the import facility.

gmourani commented 5 years ago

Cacti 1.1.38 Reportit upcoming 1.1.3

I'll download the latest dev code today Nov 28 2018 and test again.

gmourani commented 5 years ago

I've tested with latest dev code now and still the same problem with checksum error.

netniV commented 5 years ago

Can you post your template or email it to me (netniv@cacti.net) and I can review it.

gmourani commented 5 years ago

Hello Mark,

Please, find attached to this message the template, thanks.

Regards,

On Nov 29, 2018, at 3:38 AM, Mark Brugnoli-Vinten notifications@github.com wrote:

Can you post your template or email it to me (netniv@cacti.net mailto:netniv@cacti.net) and I can review it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_reportit/issues/80#issuecomment-442750095, or mute the thread https://github.com/notifications/unsubscribe-auth/ATYxXyuqgE3DXMJLiDmWmlodJWLNUNmjks5uz5zxgaJpZM4Y2Vy9.

netniV commented 5 years ago

I don't see an attachment on GitHub, does that mean you also emailed it to me?

gmourani commented 5 years ago

Hello,

I’ve replied to all on the email and also on GitHub. I think GitHub block this kind of attachement (XML). If you email me directly with your email, I’ll be able to reply to you with the attached XML file.

Regards,

On Nov 30, 2018, at 4:26 AM, Mark Brugnoli-Vinten notifications@github.com wrote:

I don't see an attachment on GitHub, does that mean you also emailed it to me?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_reportit/issues/80#issuecomment-443143580, or mute the thread https://github.com/notifications/unsubscribe-auth/ATYxX3yZ4F31esRJen292V3LdhYUryGdks5u0PmtgaJpZM4Y2Vy9.

netniV commented 5 years ago

It was in the reply before last (eg, 3 emails ago).

gmourani commented 5 years ago

Sent, thanks.

On Nov 30, 2018, at 10:00 AM, Mark Brugnoli-Vinten notifications@github.com wrote:

It was in the reply before last (eg, 3 emails ago).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cacti/plugin_reportit/issues/80#issuecomment-443229571, or mute the thread https://github.com/notifications/unsubscribe-auth/ATYxX6xLooWNyfWbO5TWjSa1zFF4ZG_kks5u0UgTgaJpZM4Y2Vy9.

netniV commented 5 years ago

I've tried to replicate this issue but I have been unable to. If you are still getting this @gmourani it would be nice to have a dump of your database to see why you are....

netniV commented 5 years ago

Thanks, I have a copy of that now, I'll see what I can spot as being the problem.

gmourani commented 5 years ago

Very nice, let me know if you need something else, thanks.

netniV commented 5 years ago

The DB doesn't appear to have the exported template...

gmourani commented 5 years ago

I can't import the template. So it couldn't have something to export !

netniV commented 5 years ago

Ah, I expect the original DB that held the template so I could run checks during import/export.

gmourani commented 5 years ago

I'm not awar of some initial template into the DB!

netniV commented 5 years ago

So where did the export come from?

gmourani commented 5 years ago

From a previous template that I've manually created before exporting as xml file and that I've tried to import from by re-installing Cacti and plugins.

I've attached the exported xml template in this message, if this could help you. Network-Traffic.xml.zip

netniV commented 5 years ago

Right, so I exported a template that I had, and then reimported it. However, my import didn't have an issue.

netniV commented 5 years ago

So, I went and disabled the checksum check and imported your template, then I exported it again and tried to import. Again, no errors. I wondered if you had an older version of the plugin where the problem existed but I ruled that out as the version says the same (unless its a patch within that version). But for now I can't reproduce this.

netniV commented 5 years ago
<?xml version="1.0" encoding="UTF-8"?>
<report_templates>
<report_template>
  <reportit>
    <version>1.1.3</version>
    <type>1</type>
    <hash>a5e27cd47092b42936c212e6789996bf</hash>
  </reportit>
  <settings>
    <id>22</id>
    <name>5 Minute Report</name>
    <user_id>0</user_id>
    <modified_by>0</modified_by>
    <last_modified>2018-10-03 13:20:30</last_modified>
    <author>admin</author>
    <version>1.0</version>
    <description>My desc</description>
    <pre_filter/>
    <data_template_id>1</data_template_id>
    <locked>on</locked>
    <enabled/>
    <export_folder/>
  </settings>
  <measurands>
        </measurands>
  <variables>
        </variables>
  <data_source_items>
    <data_source_item>
      <id>0</id>
      <template_id>22</template_id>
      <group_id>0</group_id>
      <data_template_id>0</data_template_id>
      <data_source_name>5min_cpu</data_source_name>
      <data_source_alias/>
      <data_source_title/>
      <data_source_mp>1</data_source_mp>
    </data_source_item>
  </data_source_items>
</report_template></report_templates>
gmourani commented 5 years ago

Thanks for the feedback. To eliminate the possibility that it's a patch within that version, I can download the latest available version on GIT and taste with it to see if I get the same result?

netniV commented 5 years ago

You could copy the above XML directly from the page. However, I wouldn't recommend the tasting of git as that's going to take quite a few bytes to eat (seriously though you can replace the code with a git cloned one as long as the directory it the same)