another Ubuntu install/upgrade method for cacti-0.8.7e

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

Moderators: Developers, Moderators

Post Reply
gmork123
Posts: 3
Joined: Thu Jun 26, 2008 4:21 pm

another Ubuntu install/upgrade method for cacti-0.8.7e

Post by gmork123 »

I prefer ubuntu packages when possible, but they are sometimes a bit outdated. So here's my method to have to most actual version of cacti, but with config/data files in the right places, according to ubuntu/debian standards.

(btw: I did this because I had a ping icmp problem, "Unable to create socket" with my old version, which was solved by this upgrade.)

I assume the original ubuntu package is already installed & configured: packagename is cacti and for spine: cacti-spine or cacti-cactid (depening on ubuntu release)

I unpacked cacti-0.8.7e.tar.gz in /usr/share/cacti and did the following

Code: Select all

cd /usr/share/cacti
mv site site.old
mv resource resource.old
ln -s cacti-0.8.7e site
mv site/resource/ .
ln -s resource/ site/
cp site.old/include/config.php site/include/
mkdir tags ; cd tags ; ln -s ../cacti-0.8.7e/ 0.8.7e; cd ..
wget http://www.cacti.net/downloads/patches/0.8.7e/cli_add_graph.patch
wget http://www.cacti.net/downloads/patches/0.8.7e/snmp_invalid_response.patch
patch -p1 -N < cli_add_graph.patch
patch -p1 -N < snmp_invalid_response.patch
After this the webpage showed the database upgrade page and everything worked fine.

I have no special scripts and work with the cmd poller, not with spine, so things might be somewhat more complicated in other situations.

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

Post by gandalf »

Thanks for sharing.
I'll try to reproduce and perhaps update the docs with those hints
R.
disH
Posts: 33
Joined: Thu May 22, 2008 2:09 am

Post by disH »

The official way would be to install the latest cacti from ubuntu's sites.
So to keep cacti in latest, i added the 'lucid' distro into my apt-get packages.

add into
/etc/apt/sources.list

Code: Select all

deb http://archive.ubuntu.com/ubuntu lucid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
add into
/etc/apt/preferences

Code: Select all

Package: cacti
Pin: release a=lucid
Pin-Priority: 900

Package: cacti-cactid
Pin: release a=lucid
Pin-Priority: 900

Package: cacti-spine
Pin: release a=lucid
Pin-Priority: 900

Package: rrdtool
Pin: release a=lucid
Pin-Priority: 900

Package: *
Pin: release a=intrepid
Pin-Priority: 100

Package: *
Pin: release a=lucid
Pin-Priority: 10
To explain..
Basicly we added the beta distro package (lucid) archive and configured priority to the different versions of packages.
We choose 'lucid' for cacti & rrdtool packages and set some defaults to not mix up our current ubuntu distro.
900 - forced to choose lucid distro on these packages
100 - set my current intrepid distro as default priority (apt-get should keep using my current system packages)
10 - lower the priority all of lucid's packages below my default.
after that it would be simply..

Code: Select all

apt-get update
apt-get install cacti cacti-spine
This would be the correct way to do it on ubuntu
+ this way would always keep it updated + patched & configured for ubuntu's settings.
Well.. at a date you'll need to change the name of the latest distro :P

To install PA v2.5 for 8.7e
Download cacti-plugin-0.8.7e-PA-v2.5.zip off the home page.
run

Code: Select all

patch -p1 -N < cacti-plugin-0.8.7e-PA-v2.5.diff
it gave an error in the include/global.php as expected. Either just look at the the rej file and see what needs to be done or for those uncomfortable to do this, i attached the patched global.php

-- note --
Why does it try to patch the version to 8.7c ?
8.7e version already in the global.php
Attachments
global_php.zip
PA patched global.php &amp; rej for Ubuntu Cacti 8.7e
(3.78 KiB) Downloaded 548 times
[url=http://forums.cacti.net/viewtopic.php?t=4356]Template: Cisco CatOS[/url]
[url=http://forums.cacti.net/viewtopic.php?t=21785]Mactrack: Netscreen Fw[/url]
[b]_______________[/b]
[b]Cacti Version[/b] - 0.8.7e, [b]Plugin Architecture[/b] - 2.5, [b]Poller Type[/b] - Cact-Spine 0.8.7e
[b]Server Info[/b] - Ubuntu Server 8.10 (2.6.27-7-server), [b]Web Server[/b] - Apache/2.2.9 PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch
[b]PHP[/b] - 5.2.6-2ubuntu4.3, [b]MySQL[/b] - 5.0.67-0ubuntu6-log, [b]RRDTool[/b] - 1.3.1, [b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Thresholds v0.4.1, Login Mod v1.0, Host Info v0.2
digitlman
Posts: 23
Joined: Tue Dec 01, 2009 4:08 pm

Post by digitlman »

OK, so I did all that was listed by disH except for the plugin part, and it's working just fine.

However, I noticed that the package manager install didn't put anything into /etc/crontab, nor did it add any cactiuser user.

Now, I want to tweak it so that the poller and the cron are both running a 1 min intervals. As soon as I do, it breaks with the "POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '60' seconds, with a maximum of a '300' second Cron, but 300 seconds have passed since the last poll! " error.

So, how can I set up 1 min interval polling with this version and not break it?
disH
Posts: 33
Joined: Thu May 22, 2008 2:09 am

Post by disH »

digitlman wrote:OK, so I did all that was listed by disH except for the plugin part, and it's working just fine.

However, I noticed that the package manager install didn't put anything into /etc/crontab, nor did it add any cactiuser user.

Now, I want to tweak it so that the poller and the cron are both running a 1 min intervals. As soon as I do, it breaks with the "POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '60' seconds, with a maximum of a '300' second Cron, but 300 seconds have passed since the last poll! " error.

So, how can I set up 1 min interval polling with this version and not break it?
You can find the schedule in /etc/cron.d/cacti
i dont use 1min polling but if remember correct, it requires some patching. You can find the info on the forum.
[url=http://forums.cacti.net/viewtopic.php?t=4356]Template: Cisco CatOS[/url]
[url=http://forums.cacti.net/viewtopic.php?t=21785]Mactrack: Netscreen Fw[/url]
[b]_______________[/b]
[b]Cacti Version[/b] - 0.8.7e, [b]Plugin Architecture[/b] - 2.5, [b]Poller Type[/b] - Cact-Spine 0.8.7e
[b]Server Info[/b] - Ubuntu Server 8.10 (2.6.27-7-server), [b]Web Server[/b] - Apache/2.2.9 PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch
[b]PHP[/b] - 5.2.6-2ubuntu4.3, [b]MySQL[/b] - 5.0.67-0ubuntu6-log, [b]RRDTool[/b] - 1.3.1, [b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Thresholds v0.4.1, Login Mod v1.0, Host Info v0.2
peanut3122
Posts: 2
Joined: Fri Oct 28, 2005 7:49 am

Post by peanut3122 »

tried this, from karmic...

looks like cacti is working, but can't get any data out of remote machines via snmp now, trying a full update to lucid.

google's mysql-cacti templates are working fine..

still no go with snmp v3 gets

anybody have run into anything like this?


verbose snmp query:

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/interface.xml'
alendra
Posts: 4
Joined: Wed Jan 27, 2010 6:09 am

Post by alendra »

Tried what disH said and ... I get an error when I do the apt-get update says
(losely translated, I got french version) You have reached the maximum descriptions this APT version can handle. (something like that).
Any clues ?
steve7680768
Posts: 1
Joined: Thu Apr 22, 2010 11:46 pm

Post by steve7680768 »

Thank you for the coding..
People normally tried to hide these kind of things but thank you for sharing this with us....
70-291 dumps For Help 646-671 dumps For Study 70-643 dumps For Knowledge
642-504 dumps
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

alendra wrote:Tried what disH said and ... I get an error when I do the apt-get update says
(losely translated, I got french version) You have reached the maximum descriptions this APT version can handle. (something like that).
Any clues ?
I had that once. If I can remember correctly this simply means that you have too many apt sources with way too many files in them. I think apt can only handle a specific amount of files/sources. Kindof like the Excel limit of 64k rows ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Rw@nN
Posts: 1
Joined: Wed May 05, 2010 4:15 am

Post by Rw@nN »

I try to get fresh cacti install work for Lucid server with PA, but it won't :cry:
I follow and mix up lot of method but no one work ...

apt-get install cacti cacti-spine
(look to work if i check http://ipserver/cacti)

then if i try first to apply official patch i get (only first patch example) :

cd /usr/share/cacti/
wget http://www.cacti.net/downloads/patches/ ... raph.patch
patch -p1 -N < cli_add_graph.patch
patching file cli/add_graphs.php
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file cli/add_graphs.php.rej

same for all other patch, so i try to install PA first :

cd /tmp/
wget http://mirror.cactiusers.org/downloads/ ... A-v2.6.zip
apt-get install unzip
unzip cacti-plugin-0.8.7e-PA-v2.6.zip
cd /usr/share/cacti/site/
patch -p1 -N < /tmp/cacti-plugin-arch/cacti-plugin-0.8.7e-PA-v2.6.diff

i have three error:

patching file graphs_new.php
Hunk #1 succeeded at 483 (offset 4 lines).

Hunk #3 FAILED at 195.
1 out of 4 hunks FAILED -- saving rejects to file include/global.php.rej

patching file include/global_settings.php
Hunk #1 succeeded at 1186 (offset 1 line).

And the worst is now http://ipserver/cacti only give my blank page !

i think to fix this with :
chown -R www-data:www-data /usr/share/cacti

but it seem to do nothing .
ryanebeerman
Posts: 1
Joined: Tue Jun 16, 2020 3:35 am

Re: another Ubuntu install/upgrade method for cacti-0.8.7e

Post by ryanebeerman »

The official way would be to install the latest cacti from ubuntu's sites.
So to keep cacti in latest, i added the 'lucid' distro into my apt-get packages.
Azerbaijan Electronic Visa Application.Complete the Online Visa Application form and get your Azerbaijan visa instantly.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest