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

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

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

Post by Pumpi »

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 ?
craigmock
Posts: 9
Joined: Tue Jul 01, 2003 3:39 pm

Post by craigmock »

I am having the same problem. Trying to import a template from another box of mine. Did you figure out the issue?
Craig Mock
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

No go - can't use the import feature anymore :(
Guest

Post by Guest »

Running into the same problem. :cry:

Is this a general problem or ?
craigmock
Posts: 9
Joined: Tue Jul 01, 2003 3:39 pm

Post by craigmock »

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?
Craig Mock
chird
Posts: 12
Joined: Tue Nov 11, 2003 11:45 am

Fix: add version 0.8.5a to config

Post by chird »

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: Select all

$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
craigmock
Posts: 9
Joined: Tue Jul 01, 2003 3:39 pm

Post by craigmock »

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.
Craig Mock
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

@raX

Post by Pumpi »

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
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Re: Fix: add version 0.8.5a to config

Post by raX »

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
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

Added the arrays for 0.8.5a but nothing has changed :cry:

When adding a template via Import Template from Text


I get
Error: XML parse error.
Adding template via Import Template from Local File

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
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

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
alanyoung1979
Posts: 13
Joined: Mon May 03, 2004 5:26 pm

Try to import nothing happens

Post by alanyoung1979 »

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?
User avatar
golemb
Posts: 30
Joined: Mon Jun 02, 2003 12:47 pm

Post by golemb »

Good call on the hash version fix. I can import my templates again.
alanyoung1979
Posts: 13
Joined: Mon May 03, 2004 5:26 pm

Still having problems...

Post by alanyoung1979 »

I just edited this file:

include/config_arrays.php

to have:

Code: Select all

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

Code: Select all

$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/c ... .5a.tar.gz) and installed the software on May 3rd @ 12:30ish.

Alan
alanyoung1979
Posts: 13
Joined: Mon May 03, 2004 5:26 pm

FYI list of OSes that don't import and do import xml files

Post by alanyoung1979 »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests