YES it is working!
First you need to KNOW how to apply a patch! Stop dreaming about differences between Unix patch and Linux patch and START WORKING!
1.
cd /tmp
wget http://www.goatee.com/cacti-0.6.8a-net-snmp-5.patch
2.
tar xvfz cacti-0.6.8a.tar.gz
mv cacti-0.6.8a/ cacti-0.6.8a.orig/
cd cacti-0.6.8a.orig/
3.
patch -p0 </tmp/cacti-0.6.8a-net-snmp-5.patch
(give absolute path to your patch!!!)
----------------------
patching file cacti.sql
patching file settings.php
patching file include/snmp_functions.php
patching file include/version_functions.php
4.
add by hand "use cacti;" as the first line of your cacti.sql file - where cacti is the name of your Cacti database name.
mysql -h localhost -u root < cacti.sql
... OK! So far so good!
If you have already got and running CACTI instance with tons of modified scripts and so forth you will find it easier just to overwrite (no danger at all!) the above 4 modified files to the path where the actually working cacti is residing!
cp cacti.sql /path_to_cacti/cacti/cacti.sql
cp settings.php /path_to_cacti/cacti/settings.php
cp include/snmp_functions.php /path_to_cacti/cacti/include/snmp_functions.php
cp include/version_functions.php /path_to_cacti/cacti/include/version_functions.php
Now there is still a bug in the patch you applied and in /cacti.
In /path_to_cacti/cacti/include/snmp_functions.php there are 2 lines that need to be modified according to the level version of your NET-SNMP distribution. So change this:
$snmp_value = exec($config["path_snmpget"]["value"] . " $force_version -c '$community' $hostname $oid");
with
$snmp_value = exec($config["path_snmpget"]["value"] . " -v 2c -c '$community' $hostname $oid");
AND
$temp_array = exec_into_array($config["path_snmpwalk"]["value"] . " $force_version -c '$community' $hostname $oid");
with
$temp_array = exec_into_array($config["path_snmpwalk"]["value"] . " -v 2c -c '$community' $hostname $oid");
-v 2c could be easily -v 1 depending on what level you want to choose!
Good Luck,
Vikcious[/i]
Patch for NET-SNMP 5.x IS WORKING...
Moderators: Developers, Moderators
Re: Patch for NET-SNMP 5.x IS WORKING...
Just to clarify:vikcious wrote: Now there is still a bug in the patch you applied and in /cacti.
In /path_to_cacti/cacti/include/snmp_functions.php there are 2 lines that need to be modified according to the level version of your NET-SNMP distribution. So change this:
$snmp_value = exec($config["path_snmpget"]["value"] . " $force_version -c '$community' $hostname $oid");
with
$snmp_value = exec($config["path_snmpget"]["value"] . " -v 2c -c '$community' $hostname $oid");
AND
$temp_array = exec_into_array($config["path_snmpwalk"]["value"] . " $force_version -c '$community' $hostname $oid");
with
$temp_array = exec_into_array($config["path_snmpwalk"]["value"] . " -v 2c -c '$community' $hostname $oid");
-v 2c could be easily -v 1 depending on what level you want to choose!
If you applied the patch before importing the contents of cacti.sql, you'll have a few new configuration options in the web-based "cacti settings". There's a text box for the "SNMP version string", where you can enter "-v 2c", "-v 1", or whatever you need depending on the devices you're polling. The value you enter will go into the $force_version variable shown above; no editing the source necessary.
If you applied the patch to an existing setup, you can either edit the Cacti code, or manually add the 3 new SQL rows found near the top of the patch to get the configuration options.
--
blaine@binary.net
Also make sure that you don't quote the version string in the version configuration box. Just the bare:
-v 2c
or
-v 1
--
blaine@binary.net
-v 2c
or
-v 1
--
blaine@binary.net
Tried and failed
When I try do to the sql import i get
ERROR 1050 at line 6: Table 'auth_acl' already exists
What did I do wrong??
ERROR 1050 at line 6: Table 'auth_acl' already exists
What did I do wrong??
Re: Tried and failed
You already have the cactus database structure build. Drop all the tables in the cactus database and try again.BryanCromwell wrote:When I try do to the sql import i get
ERROR 1050 at line 6: Table 'auth_acl' already exists
What did I do wrong??
Who is online
Users browsing this forum: No registered users and 0 guests