Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Aug 18, 2017 11:14 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: [INFO] Templates May Require Updates After Upgrade to 0.8.7
PostPosted: Fri Oct 26, 2007 6:10 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Note,

If your graph templates contain scripts that use the following functions:

cacti_snmp_get
cacti_snmp_walk

Or, if your script as script server based, you will have to update these scripts prior to cutting over to the new Cacti system. A good way to audit this would be to execute the following:

cd <path_cacti>/scripts
grep -i cacti_snmp *

also,

grep -i call_user_func_array *

For each script found, you need to audit to make sure that for the script server scripts, you have changed the include of config.php to global.php and that for the cacti_snmp_*, you have changed your calling parameters. The new format is as follows:

cacti_snmp_get($hostname, $community, $oid, $version, $username, $password, $auth_proto, $priv_pass, $priv_proto, $context, $port = 161, $timeout = 500, $retries = 0, $environ = SNMP_POLLER)

The new fields are:

$auth_proto
$priv_pass
$priv_proto
$context

If you don't use snmpV3, you can simply set these to "".

Regards,

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 26, 2007 8:25 am 
Offline
Cacti User

Joined: Mon Feb 05, 2007 3:57 am
Posts: 123
Location: Munich, Germany
This works fine for php scripts but I also have some templates that are only XML files (e.g. http://forums.cacti.net/about19640.html or http://forums.cacti.net/about8777.html), what do I have to do with them?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 27, 2008 4:43 pm 
Offline

Joined: Thu Jul 05, 2007 8:14 pm
Posts: 11
This is just sloppy. Why should users have to do something manually that could have been handled automatically during an upgrade? Why doesn't the latest version of Cacti contain the correct versions of these files?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 27, 2008 4:48 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12130
Location: USA
Because its User's scripts which need to be updated, not core cacti files/scripts. Cacti doesn't touch user scripts...

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 25, 2008 2:28 pm 
Offline

Joined: Mon Feb 14, 2005 1:41 pm
Posts: 20
Hi all,

I have two scripts that don't work after upgrading to 0.8.7b from 0.8.6j. They are ss_slb_vserver.php and ss_slb_rserver.php.

Within them, they have this line:

Code:
$value = cacti_snmp_get($hostname, $snmp_community, $target, $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmp_port, $snmp_timeout, SNMP_POLLER)


Given the above information, does this mean that I should change this to the following?

Code:
$value = cacti_snmp_get($hostname, $community, $oid, $version, $username, $password, $auth_proto, $priv_pass, $priv_proto, $context, $port = 161, $timeout = 500, $retries = 0, $environ = SNMP_POLLER)


Thanks,
Joe


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 25, 2008 3:11 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Yes, more or less. But you'll have to provide data for those new parms! For a Script Data Query, you'll have to change the XML accordingly
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Clarification needed please..
PostPosted: Fri Jan 23, 2009 6:39 am 
Offline

Joined: Fri Aug 05, 2005 2:38 am
Posts: 14
Helmut Schneider wrote:
This works fine for php scripts but I also have some templates that are only XML files (e.g. http://forums.cacti.net/about19640.html or http://forums.cacti.net/about8777.html), what do I have to do with them?


Hello All,

I'm looking to upgrade from cacti-0.8.6g-1, as I am unable to import the FWSM xml template (last post on this thread here: http://forums.cacti.net/viewtopic.php?t=8670&highlight=fwsm - http://forums.cacti.net//files/cacti_host_template_cisco_asa_736.xml ) and I get an error when trying to import the xml (Error: XML: Hash version does not exist).

Can anyone please tell me if I need to do anything with my previously imported xml templates prior to running through the upgrade steps? - I'm worried about losing the graphs I have managed to get working! :cry:

(I have run the commands to check the php scripts and it didn't return any output, so think ok on that front :-? )

Any advice will be gratefully received, thanks.

cheers,
riz.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group