A try2 Install 0.8.7i with PIA over previous apt-get install

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Chilloutfaktor
Posts: 16
Joined: Mon Nov 01, 2010 5:58 am

A try2 Install 0.8.7i with PIA over previous apt-get install

Post by Chilloutfaktor »

Hey guys,

i got a ubuntu 10.10 server with cacti installed via "apt-get install cacti".
As i read in many posts there is no official updatepacket to 0.8.7i.
Because there was no Documentation or Howto how to get 0.8.7i with PIA to work over a packet install, i'm writing this.
And there is also no pia 3.1 build to merge with the ubuntu packet.....

First i updatet my previous 0.8.7g cacti to i. You can get builded .deb files here:
https://launchpad.net/ubuntu/precise/+package/cacti

for me it was:
cd /tmp/
wget http://launchpadlibrarian.net/90419990/ ... u1_all.deb
dpkg -i cacti_0.8.7i-2ubuntu1_all.deb

check on the website if everything is working. (this is without PIA, so you dont see your plugins)
then backup/copy all files of /usr/share/cacti. maybe you will need them later.

now get official cacti with pia integrated:
cd /tmp/
wget http://www.cacti.net/downloads/cacti-0. ... 3.1.tar.gz
tar xzfv cacti-0.8.7i-PIA-3.1.tar.gz
cd /cacti-0.8.7i-PIA-3.1/site
# Copy Files over existing Installation
rsync -avh * /usr/share/cacti/site/
cd /usr/share/cacti/site/
# Fix Permission
chown root:root -R *
# now go to /usr/share/cacti/site/include and get your config.php back
cd /usr/share/cacti/site/include
mv config.php config.php.oldorig
mv config.php.orig config.php

At this moment you should be able to connect to your cacti website again.
But you will have some path errors with the pollers.
To fix this, check your old global.php(from packet install) and compare it with the new one. (source) - take notepad++ open both files and "extension -> Compare"
i merged the paths and uploaded it again.

Code: Select all

include("/usr/share/php/adodb/adodb.inc.php");
was some different path for me
full file is attached.
global.php.txt
(8.08 KiB) Downloaded 135 times
if using the cmd poller - i can view the graphs. If using the spine poller im getting some sql errors when trying to view graphs:

Code: Select all

02/09/2012 01:26:37 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select graph_tree.id, graph_tree.name, user_auth_perms.user_id from graph_tree left join user_auth_perms on (graph_tree.id=user_auth_perms.item_id and user_auth_perms.type=2 and user_auth_perms.user_id=) order by graph_tree.name"
02/09/2012 01:26:37 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select policy_trees from user_auth where id="
02/09/2012 01:26:33 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select graph_tree.id, graph_tree.name, user_auth_perms.user_id from graph_tree left join user_auth_perms on (graph_tree.id=user_auth_perms.item_id and user_auth_perms.type=2 and user_auth_perms.user_id=) order by graph_tree.name"
02/09/2012 01:26:33 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select policy_trees from user_auth where id=" 
02/09/2012 01:26:37 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select graph_tree.id, graph_tree.name, user_auth_perms.user_id from graph_tree left join user_auth_perms on (graph_tree.id=user_auth_perms.item_id and user_auth_perms.type=2 and user_auth_perms.user_id=) order by graph_tree.name"
02/09/2012 01:26:37 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select graph_tree.id, graph_tree.name, user_auth_perms.user_id from graph_tree left join user_auth_perms on (graph_tree.id=user_auth_perms.item_id and user_auth_perms.type=2 and user_auth_perms.user_id=) order by graph_tree.name" 
so, now im stuck - maybe someone can help me to fix this up. its maybe a problem cause i have not yet installed cacti-spine 0.8.7i ?

some additional question: are the paths stored in any other file, or sql table? My plugins are working, but using some wrong displaypath like:
http://Servername/cacti/plugins/mactrac ... w_macs.gif

best regards,
Chill
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: A try2 Install 0.8.7i with PIA over previous apt-get ins

Post by gandalf »

You should not do that. Overwriting a package install will yield strange results sooner or later.
Recommendation is to save custom stuff, remove old install, install fresh and restore custom stuff
R.
Chilloutfaktor
Posts: 16
Joined: Mon Nov 01, 2010 5:58 am

Re: A try2 Install 0.8.7i with PIA over previous apt-get ins

Post by Chilloutfaktor »

mh yeah your right. if it is that easy i would like to do this. but how can i save my graphs & data ?
there is at the moment no real option to migrate or correctly export graph data - or?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: A try2 Install 0.8.7i with PIA over previous apt-get ins

Post by gandalf »

Chilloutfaktor wrote:mh yeah your right. if it is that easy i would like to do this. but how can i save my graphs & data ?
there is at the moment no real option to migrate or correctly export graph data - or?
Sure, there is. I just responded to that in a similar thread.
What you should save is
- the ./rra ./scripts ./resources directories
- the mysql tables
That's it.
And there's a thread (I can't judge whether this is a good one) which may be of interested for Ubuntu users during install. I know, that Ubuntu install differs a bit from what we explain at 1st link of my sig
R.
Chilloutfaktor
Posts: 16
Joined: Mon Nov 01, 2010 5:58 am

Re: A try2 Install 0.8.7i with PIA over previous apt-get ins

Post by Chilloutfaktor »

wow - i didnt thought it is that easy. i've exported the old db and merget it using mysql workbench with my clean install.
then pushed rra files, ressource and scripts to new install.
fixed permissions and changed paths of "cacti_poller_item.sql" to new install paths. then fixing paths in cacti settings. and lets give it some time over weekend so i can see whats working.
but it seems very good.

thanks for the hint.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests