Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Wed Sep 17, 2014 6:29 am

All times are UTC - 5 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 86 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Wed Sep 28, 2011 1:59 pm 
Offline
Cacti User

Joined: Mon Jan 17, 2011 12:15 pm
Posts: 155
TheWitness wrote:
make sure that the plugins array in config.php does not include it. also, make sure you do not have backups of that plugin in other directories under the plugins directory.


In the 0.8.7g version there is this in the config.php file :

/* load up old style plugins here */
$plugins = array();
//$plugins[] = 'thold';

but in the 0.8.7.h version with pia 3.0 there is nothing about plugins, setup plugin install is OK, but not CLog.

Probably, I need to add it, I will test it tomorow.

There is no other CLog directory in the plugins directory.

thanks for your return


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Wed Sep 28, 2011 9:05 pm 
Offline

Joined: Wed Sep 28, 2011 8:35 pm
Posts: 6
Cool. Just in time. Just did a fresh install. of the PIA 3.0. I'm somewhat new to cacti.

Having two issues:

I have cacti installed under my home directory and having trouble when I go to http://host.domain.com/~storage/cacti/graph_view.php?action=tree. I think graph_view.php is doing redirection wrong somehow. I always get redirected to http://host.domain.com/storage/cacti/graph_view.php?action=tree&tree_id=2&leaf_id=8
(notice the missing ~), so the url is wrong.

My config.php file has $url_path = "/~storage/cacti/", where i placed cacti.

Other navigation links seem to work.

Unrelated - is the aggregate plugin supposed to work in this version? It does not show up under "plugin management" for me, even though autom8 does appear there. Oops. Never mind. Accidentally installed an old version. The new one shows up.

bash-3.2$ rpm -qa | grep php
php-mysql-5.1.6-27.el5_5.3
php-5.1.6-27.el5_5.3
php-pdo-5.1.6-27.el5_5.3
php-snmp-5.1.6-27.el5_5.3
php-cli-5.1.6-27.el5_5.3
php-common-5.1.6-27.el5_5.3
php-xml-5.1.6-27.el5_5.3
bash-3.2$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)

Thx!


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Wed Sep 28, 2011 10:17 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
Don't use tilde's for anything. Bad practice.

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: Re: Release of Cacti 0.8.7h
PostPosted: Wed Sep 28, 2011 10:31 pm 
Offline

Joined: Wed Sep 28, 2011 8:35 pm
Posts: 6
TheWitness wrote:
Don't use tilde's for anything. Bad practice.

TheWitness


Hi. Thanks for your reply.

That's how apache and suexec work. What's bad about it?


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Wed Sep 28, 2011 11:32 pm 
Offline
Cacti Guru User

Joined: Thu Aug 05, 2010 2:04 am
Posts: 1573
Location: Japan
snappingturtle wrote:
My config.php file has $url_path = "/~storage/cacti/", where i placed cacti.

If you feel annoying to write out absolute pathname, try this instead.
Code:
$userinfo = posix_getpwnam("storage");
$url_path = $userinfo['dir'] . "/cacti/";

But the number of letters become long than original path :P


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Wed Sep 28, 2011 11:57 pm 
Offline

Joined: Wed Sep 28, 2011 8:35 pm
Posts: 6
noname wrote:
snappingturtle wrote:
My config.php file has $url_path = "/~storage/cacti/", where i placed cacti.

If you feel annoying to write out absolute pathname, try this instead.
Code:
$userinfo = posix_getpwnam("storage");
$url_path = $userinfo['dir'] . "/cacti/";

But the number of letters become long than original path :P


Hi. Thanks for your reply. I have no problem typing out the full pathname. But $url_path is not expecting a filesystem path. As far as I can tell it's a url. Using ~username is the expected form on the internets for a home directory url.


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Thu Sep 29, 2011 1:57 am 
Offline
Cacti User

Joined: Mon Jan 17, 2011 12:15 pm
Posts: 155
Hello TheWitness,

I've ckeck, I can install and activate other plugin, but not Clog plugin, I see it in the plugin list, but when I click on the bleu button, I've this blank page url : .../cacti/plugins.php?mode=install&id=clog

I have no other CLog version in the plugins directory, If I replace setup.php file by setup.php file in the tag directory version 1628 all are good, I can install it.

Could you check it please ?

Thanks in advanced


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Thu Sep 29, 2011 2:07 am 
Offline
Cacti Guru User

Joined: Thu Aug 05, 2010 2:04 am
Posts: 1573
Location: Japan
snappingturtle wrote:
But $url_path is not expecting a filesystem path. As far as I can tell it's a url. Using ~username is the expected form on the internets for a home directory url.

Oops, I misunderstood, sorry. That's URL indeed.

Perhaps '~'(tilde) will be omitted when sanitize_uri() function is called..

lib/functions.php:
Code:
/** cleans up a URI, e.g. from REQUEST_URI and/or QUERY_STRING
* in case of XSS attac, expect the result to be broken
* we do NOT sanitize in a way, that attacs are converted to valid HTML
* it is ok, when the result is broken but the application stays alive
* @arg string $uri   - the uri to be sanitized
* @returns string    - the sanitized uri
*/
function sanitize_uri($uri) {
        static $drop_char_match =   array('^', '$', '<', '>', '`', '\'', '"', '|', '~', '+', '[', ']', '{', '}', ';', '!');
        static $drop_char_replace = array( '',  '',  '',  '',  '',   '',  '',  '',  '',  '',  '',  '',  '',  '',  '',  '');

        return str_replace($drop_char_match, $drop_char_replace, urldecode($uri));
}

This function was added from Cacti 0.8.7h.
Hmm, is there any workaround?
(I'm not sure whether 'tilde' is unsafe character or not..)


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Thu Sep 29, 2011 2:08 pm 
Offline

Joined: Wed Sep 28, 2011 8:35 pm
Posts: 6
noname wrote:
snappingturtle wrote:
But $url_path is not expecting a filesystem path. As far as I can tell it's a url. Using ~username is the expected form on the internets for a home directory url.

Oops, I misunderstood, sorry. That's URL indeed.

Perhaps '~'(tilde) will be omitted when sanitize_uri() function is called..

lib/functions.php:
Code:
/** cleans up a URI, e.g. from REQUEST_URI and/or QUERY_STRING
* in case of XSS attac, expect the result to be broken
* we do NOT sanitize in a way, that attacs are converted to valid HTML
* it is ok, when the result is broken but the application stays alive
* @arg string $uri   - the uri to be sanitized
* @returns string    - the sanitized uri
*/
function sanitize_uri($uri) {
        static $drop_char_match =   array('^', '$', '<', '>', '`', '\'', '"', '|', '~', '+', '[', ']', '{', '}', ';', '!');
        static $drop_char_replace = array( '',  '',  '',  '',  '',   '',  '',  '',  '',  '',  '',  '',  '',  '',  '',  '');

        return str_replace($drop_char_match, $drop_char_replace, urldecode($uri));
}

This function was added from Cacti 0.8.7h.
Hmm, is there any workaround?
(I'm not sure whether 'tilde' is unsafe character or not..)


You've nailed it. That function is removing '~' from the uri. I removed it and the corresponding replacement char from the function and it all works fine for me now. Maybe the intent was to sanitize '~' from the query string, but that can also can destroy a perfectly valid uri. Thx!


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Thu Sep 29, 2011 2:22 pm 
Offline

Joined: Tue Oct 05, 2010 6:11 pm
Posts: 19
hello,

could you please help confirm if this feature is included in this version?
http://forums.cacti.net/about31970.html
thanks


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Thu Sep 29, 2011 2:42 pm 
Offline

Joined: Thu May 10, 2007 12:01 pm
Posts: 21
I've installed, reinstalled, tried different OS's Centos 5.6 vs 6. It would 'seem' that everytime I install the Discovery Plugin in the new 8.7h I eventually get the following SQL error. Any Ideas??

09/29/2011 03:35:34 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1100', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'config_arrays' AND ph.name IN ('settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'config_arrays' AND ph.name NOT IN ('settings', 'boost', 'dsstats') ORDER BY id ASC"

When I install the Discovery Plugin I immediately get these SQl errors:

09/29/2011 03:24:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"ALTER TABLE plugin_discover_hosts ADD COLUMN snmp_context varchar(64) DEFAULT '' AFTER snmp_priv_protocol'
09/29/2011 03:24:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"ALTER TABLE plugin_discover_hosts ADD COLUMN snmp_priv_protocol char(6) DEFAULT '' AFTER snmp_priv_passphrase'
09/29/2011 03:24:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"ALTER TABLE plugin_discover_hosts ADD COLUMN snmp_priv_passphrase varchar(200) DEFAULT '' AFTER snmp_auth_protocol'
09/29/2011 03:24:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"ALTER TABLE plugin_discover_hosts ADD COLUMN snmp_auth_protocol char(5) DEFAULT '' AFTER snmp_password'
09/29/2011 03:24:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"ALTER TABLE plugin_discover_hosts ADD COLUMN snmp_password varchar(50) NULL AFTER snmp_username'
09/29/2011 03:24:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"ALTER TABLE plugin_discover_hosts ADD COLUMN snmp_username varchar(50) NULL AFTER snmp_version'
09/29/2011 03:24:45 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"ALTER TABLE plugin_discover_hosts ADD COLUMN snmp_version tinyint(1) unsigned NOT NULL DEFAULT '1' AFTER community'
09/29/2011 03:24:45 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SHOW COLUMNS FROM plugin_discover_hosts"


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Thu Sep 29, 2011 8:15 pm 
Offline
Cacti Guru User

Joined: Thu Aug 05, 2010 2:04 am
Posts: 1573
Location: Japan
snappingturtle wrote:
That function is removing '~' from the uri. I removed it and the corresponding replacement char from the function and it all works fine for me now. Maybe the intent was to sanitize '~' from the query string, but that can also can destroy a perfectly valid uri.

Thank you for verifying. I posted a bug report.
- http://bugs.cacti.net/bug_view_advanced ... ug_id=2064


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Tue Oct 04, 2011 1:26 pm 
Offline

Joined: Thu May 05, 2011 7:37 am
Posts: 1
rony wrote:
[*]bug#0001876: PHP function strip_quotes causes HEX values to be truncated


Seems to me that this bugfix adds another bug:
http://svn.cacti.net/viewvc/cacti/tags/0.8.7h/lib/functions.php?r1=6233&r2=6252
Code:
lib/functions.php:
function is_hexadecimal($hexstr) {
< return preg_match('/^[a-fA-F0-9 \t]*$/', $hexstr);
> return preg_match('/^[a-fA-F0-9: \t*$/', $hexstr);


In 0.8.7h if a script returns multiple values like:
"a:100 b:200 c:300"
such string matches above regexp and is considered a single HEX value.
Maybe we should use more strict regexp to detect HEX values?

I'm using templates from Percona to monitor MySQL servers and some data templates became broken - they return values like:"aa:500 ab:300 ac:200"


Top
 Profile  
 
 Post subject: Re: Release of Cacti 0.8.7h
PostPosted: Tue Oct 04, 2011 6:15 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
preg's are not good for everything. This appears to be a case here....

_________________
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: Re: Release of Cacti 0.8.7h
PostPosted: Thu Oct 13, 2011 11:39 am 
Offline
Cacti User

Joined: Tue Jan 26, 2010 6:12 am
Posts: 140
I Thank you Cacti Developer Group for Released this Version which Reduce My total Polling time by 40seconds.

With 0.8.7g

10/13/2011 07:07:49 AM - WEATHERMAP: Poller[0] STATS: Weathermap 0.97a run complete - Thu, 13 Oct 2011 07:07:49 IST: 7 maps were run in 19 seconds with 9 warnings.
10/13/2011 07:07:30 AM - SYSTEM THOLD STATS: Time:41.8643 Tholds:22138 Hosts:0
10/13/2011 07:06:48 AM - SYSTEM STATS: Time:106.7874 Method:spine Processes:4 Threads:15 Hosts:825 HostsPerProcess:207 DataSources:52765 RRDsProcessed:24532

With 0.7.8h

10/13/2011 07:52:09 AM - WEATHERMAP: Poller[0] STATS: Weathermap 0.97a run complete - Thu, 13 Oct 2011 07:52:09 IST: 7 maps were run in 19 seconds with 9 warnings.
10/13/2011 07:51:50 AM - SYSTEM THOLD STATS: Time:46.7667 Tholds:22138 Hosts:0
10/13/2011 07:51:03 AM - SYSTEM STATS: Time:61.8720 Method:spine Processes:4 Threads:15 Hosts:825 HostsPerProcess:207 DataSources:52765 RRDsProcessed:24532

Only Thing which was must for me is query_ifHighSpeed which resolved by TheWitness by providing rrd.php & Interface.xml

By this Cacti is Truly Future Ready (10G Port Traffic Monitor)

Waiting for Patch of 0.8.7h ....




thold plugin 0.4.6 screenshots


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 86 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 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