Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


New 0.8.5a install but import/export templates doesn't work
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Help: General
Author Message
Pumpi
Cacti User


Joined: 14 Jan 2004
Posts: 256
Location: Germany

PostPosted: Fri Apr 02, 2004 7:23 am    Post subject: New 0.8.5a install but import/export templates doesn't work Reply with quote

New 0.8.5a install but import/export templates doesn't work.

Trying to add existing template files - nothing hapens
or do a direct input (copy&paste) - but nothing happens or getting message Error: XML parse error.


Has somebody else this behaviour ?
Back to top
craigmock



Joined: 01 Jul 2003
Posts: 9

PostPosted: Fri Apr 02, 2004 4:42 pm    Post subject: Reply with quote

I am having the same problem. Trying to import a template from another box of mine. Did you figure out the issue?
Back to top
Pumpi
Cacti User


Joined: 14 Jan 2004
Posts: 256
Location: Germany

PostPosted: Mon Apr 05, 2004 3:01 am    Post subject: Reply with quote

No go - can't use the import feature anymore
Back to top
Guest






PostPosted: Wed Apr 07, 2004 9:03 am    Post subject: Reply with quote

Running into the same problem.

Is this a general problem or ?
Back to top
craigmock



Joined: 01 Jul 2003
Posts: 9

PostPosted: Thu Apr 08, 2004 4:32 pm    Post subject: Reply with quote

Here is some more information from my 2 boxes.

Cacti Install #1:
Redhat 9, Cacti Version 0.8.6 . This one has been up since June 2003. I have upgraded a couple times and I am now running Version 0.8.6. Export and Import both fail.

Export Template Error:

....a whole page of these:
Notice: Undefined index: 0.8.6 in /var/www/html/cacti/lib/functions.php on line 1174
Notice: Undefined index: 0.8.6 in /var/www/html/cacti/lib/functions.php on line 1174
Notice: Undefined index: 0.8.6 in /var/www/html/cacti/lib/functions.php on line 1174
Warning: Cannot add header information - headers already sent by (output started at /var/www/html/cacti/lib/functions.php:1174) in /var/www/html/cacti/templates_export.php on line 88
Warning: Cannot add header information - headers already sent by (output started at /var/www/html/cacti/lib/functions.php:1174) in /var/www/html/cacti/templates_export.php on line 89
Cisco Interface - Traffic (bits/sec) on 1 120 500 on 2 on on on on 1000 0 1000 bits per second hash_082df25c57022b0c7e7d0be4c035ada1a0 00CF00 7 1 hash_0573f95f8b77b5508157d64047342c421e hash_06e9c43831e54eca8069317a2ce8c6f751 Inbound 2 hash_082df25c57022b0c7e7d0be4c035ada1a0 0 9 4 hash_0573f95f8b77b5508157d64047342c421e hash_06e9c43831e54eca8069317a2ce8c6f751 Current: 3 hash_082df25c57022b0c7e7d0be4c035ada1a0 0 9 1 hash_0573f95f8b77b5508157d64047342c421e hash_06e9c43831e54eca8069317a2ce8c6f751 Average: 4 hash_082df25c57022b0c7e7d0be4c035ada1a0 EE5019 5 3 hash_0573f95f8b77b5508157d64047342c421e hash_06e9c43831e54eca8069317a2ce8c6f751 Maximum: on 5 hash_08721c0794526d1ac1c359f27dc56faa49 002A97 4 1 hash_0573f95f8b77b5508157d64047342c421e hash_06e9c43831e54eca8069317a2ce8c6f751 Outbound 6 hash_08721c0794526d1ac1c359f27dc56faa49 0 9 4 hash_0573f95f8b77b5508157d64047342c421e hash_06e9c43831e54eca8069317a2ce8c6f751 Current: 7 hash_08721c0794526d1ac1c359f27dc56faa49 0 9 1 hash_0573f95f8b77b5508157d64047342c421e hash_06e9c43831e54eca8069317a2ce8c6f751 Average: 8 hash_08721c0794526d1ac1c359f27dc56faa49 FF0000 6 3 hash_0573f95f8b77b5508157d64047342c421e hash_06e9c43831e54eca8069317a2ce8c6f751 Maximum: on 9 Outbound Data Source task_item_id hash_0032fadada4d57d6123e0c419a2ac15fde|hash_00b63a41086fdd40c1d8eafb7594533815|hash_00537f119b2da5fec18ae884c83c2fc68d|hash_000d3ad3348b3af7277ac4dbc76db9d0c0 Inbound Data Source task_item_id hash_00c6f151656f8914f33e1f9ab8f81753ae|hash_00dd02b3354f443b239b9ada067fee51cd|hash_0072d6140f95c31aa57b917f5d24bc98b5|hash_00df3f8bc382b739269a650da0934cb954 Interface - Traffic on |host_description| - Traffic hash_03bf566c869ac6443b0c75d1c32b5a350e 300 on hash_15c21df5178e5c955013591239eb0afd46|hash_150d9c0af8b8acdc7807943937b3208e29|hash_156fc2d038fb42950138b0ce3e9874cc60|hash_15e36f3adb9f152adfa5dc50fd2b23337e|hash_15d2c7d882c60af7d33dd16d4db89a280a|hash_154daa289e02bc3216ae7f3c5e9f4a9a46|hash_15721dbe5b04e3c00f21ca7828cc523d19|hash_154d2099899fb6fe2110609d6873b7f7fb traffic_in 0 on 1000000000 2 600 0 traffic_out 0 on 100000000 2 600 0 hash_07e6deda7be0f391399c5130e7c4a48b28 on hash_07cbbe5c1ddfb264a6e5d509ce1c78c95f on hash_076027a919c7c7731fbe095b6f53ab127b on Get SNMP Data (Indexed) 3 SNMP IP Address hostname in management_ip SNMP Community snmp_community in snmp_community SNMP Username (v3) on snmp_username in snmp_username SNMP Password (v3) on snmp_password in snmp_password SNMP Version (1, 2, or 3) snmp_version in snmp_version Index Type index_type in index_type Index Value index_value in index_value Output Type ID output_type in output_type Daily (5 Minute Average) 0.5 1 600 86400 1|2|3|4 Weekly (30 Minute Average) 0.5 6 700 604800 1|2|3|4 Monthly (2 Hour Average) 0.5 24 775 2678400 1|2|3|4 Yearly (1 Day Average) 0.5 288 797 33053184 1|2|3|4 3YearTrend (1 Day Average) 0.5 288 2391 99159552 1|2|3|4 Invalid round robin archive. Invalid round robin archive. Invalid round robin archive. Turn Bytes into Bits 1 4 CURRENT_DATA_SOURCE 2 6 8 3 2 3 Normal %8.2lf %s

Import Error Symptoms: (importing template exported from Cacti Install #2)
Browse to file:
Click Save:
Screen refreshes with no error or anything. Template doesn't install either.

------------------------------------------------------------------
Cacti Install #2
Redhat 9, Version 0.8.5. This one has been up and running since February 2004. I have not upgraded or patched.

Export: Works fine
Import: Works fine and should look like this:

Cacti has imported the following items:
Round Robin Archive
[success] Daily (5 Minute Average) [update]
[success] Weekly (30 Minute Average) [update]
[success] Monthly (2 Hour Average) [update]
[success] Yearly (1 Day Average) [update]
CDEF
[success] Turn Bytes into Bits [update]
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Get SNMP Data (Indexed) [update]
Data Template
[success] Interface - Traffic [update]
Graph Template
[success] Interface - Traffic (bits/sec, 95th Percentile) [update]


So I really have 3 questions:
1. Why is the 95th percentile stuff missing from my upgraded version?
2. What is the problem/fix for Version 0.8.6?
3. Is there a way to make sure new templates get added in the future if they weren't then in the past?
Back to top
chird



Joined: 11 Nov 2003
Posts: 12

PostPosted: Fri Apr 09, 2004 3:56 am    Post subject: Fix: add version 0.8.5a to config Reply with quote

I don't know whether it's the right way to fix it, but I got my template-importing working again by adding a hash_version_code to the config_arrays file (so current version will at least be recognized when importing templates).

file: include/config_arrays.php

From line 274 on:

Code:
$hash_version_codes = array(
   "0.8.4" => "0000",
   "0.8.5" => "0001",
   "0.8.5a" => "0002"
   );


Maybe Rax can shed a light on this (why 0.8.5a isn't listed in the hash_version_codes)?

Regards,

Geert
Code:
Back to top
craigmock



Joined: 01 Jul 2003
Posts: 9

PostPosted: Fri Apr 09, 2004 12:51 pm    Post subject: Reply with quote

Right on. That worked.

copy backed up old file first
cd /var/www/html/cacti/include
cp config_arrays.php config_arrays.php.ori
vi config_arrays.php

added/changed it to look like this:

$hash_version_codes = array(
"0.8.4" => "0000",
"0.8.5" => "0001",
"0.8.6" => "0002"
);


save:exit

import worked as expected. Thanks for the help.
Back to top
Pumpi
Cacti User


Joined: 14 Jan 2004
Posts: 256
Location: Germany

PostPosted: Wed Apr 14, 2004 1:54 am    Post subject: @raX Reply with quote

Will be there a fix for this graph template export import problem ?

Is this a common problem - all if my two Cacti Servers showing this behaviour
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2237
Location: Carlisle, PA

PostPosted: Thu Apr 15, 2004 11:37 pm    Post subject: Re: Fix: add version 0.8.5a to config Reply with quote

chird wrote:
Maybe Rax can shed a light on this (why 0.8.5a isn't listed in the hash_version_codes)?


I am confused. I just downloaded the 0.8.5a tarball just to make sure and the $hash_version_codes array *does* contain 0.8.5a like it should. Also I see a bunch of references to version 0.8.6 throughout this thread. That definitely isn't going to work as version 0.8.6 has yet to be released...

-Ian
Back to top
Pumpi
Cacti User


Joined: 14 Jan 2004
Posts: 256
Location: Germany

PostPosted: Fri Apr 23, 2004 2:55 am    Post subject: Reply with quote

Added the arrays for 0.8.5a but nothing has changed

When adding a template via Import Template from Text


I get
Quote:
Error: XML parse error.


Adding template via Import Template from Local File


Quote:
Nothing happens


Update: Seems that "older" templates are working again - problem still exists with this template posted here: http://www.raxnet.net/board/viewtopic.php?p=13249#13249
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2237
Location: Carlisle, PA

PostPosted: Fri Apr 23, 2004 10:20 pm    Post subject: Reply with quote

The XML that you referenced in the "Ethernet Stats" thread was not generated with Cacti's XML export feature. This XML file only specifies the data query itself, it is meant to go into Cacti's 'resource/snmp_queries' directory. It looks like the author provides a complete set of XML files (templates_rfc1643.tar) later on down in the thread.

-Ian
Back to top
alanyoung1979



Joined: 03 May 2004
Posts: 13

PostPosted: Mon May 03, 2004 6:05 pm    Post subject: Try to import nothing happens Reply with quote

I am having the same problem. I try to import a xml file (I tried several different files) and nothing happens. I am running 0.8.5a with bonsai 0.4.085 .

Any Ideas?
Back to top
golemb



Joined: 02 Jun 2003
Posts: 30

PostPosted: Tue May 04, 2004 12:04 pm    Post subject: Reply with quote

Good call on the hash version fix. I can import my templates again.
Back to top
alanyoung1979



Joined: 03 May 2004
Posts: 13

PostPosted: Wed May 05, 2004 7:27 pm    Post subject: Still having problems... Reply with quote

I just edited this file:

include/config_arrays.php

to have:
Code:

$hash_version_codes = array(
        "0.8.4" => "0000",
        "0.8.5" => "0001",
        "0.8.5a" => "0002"
        );


Before it was:

Code:

$hash_version_codes = array(
        "0.8.4" => "0000",
        "0.8.5" => "0001"
        );


Importing xml templates still doesn't work. I tried importing from a local file and also using the text box. I received no errors or confirmation of my actions. I can also type garbage as the local file name and in the text box and I still don't get an error.

I downloaded 0.8.5a (from: http://www.raxnet.net/downloads/cacti/cacti-0.8.5a.tar.gz) and installed the software on May 3rd @ 12:30ish.

Alan
Back to top
alanyoung1979



Joined: 03 May 2004
Posts: 13

PostPosted: Mon May 10, 2004 5:06 pm    Post subject: FYI list of OSes that don't import and do import xml files Reply with quote

My current install (0.8.5a) of Cacti monitors about 100 devices. It runs on Redhat Enterprise Server 2.1. The import function doesn't work, and I don't know why. I've checked all the logs, file permissions, php xml support, tcpdumped localhost traffic, tcpdumped eth0 traffic, and strace the apache pid. Nothing seems wrong. I also tried 0.8.5 and imports didn't work also.

I did a test install(0.8.5a) on the following servers:
    Redhat 9.0
    Redhat ES server 3.0
    Openbsd (can't remeber the version)


The import function works.

I don't know what is wrong with my redhat 2.1 install.

Alan
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: General All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group