syslog plugin and superlinks plugin not working together

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
esplinter
Posts: 14
Joined: Wed Oct 31, 2007 7:12 pm

syslog plugin and superlinks plugin not working together

Post by esplinter »

Hi

I have a problem using syslog plugin and superlinks plugin together.

My syslog plugin was working perfectly but when I activated superlinks plugin suddenly syslog stopped working. Every filter I had defined on syslog plugin dissapeared and I start getting this error on /var/log/httpd/error_log

Code: Select all

[Thu Nov 01 02:21:55 2007] [error] [client 192.168.0.20] PHP Warning:strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string. in var/www/cacti/plugins/syslog/syslog_remove.php on line 87, referer: http://localhost:8888/cacti/plugins/syslog/syslog.php
when I deactivate superlinks plugin syslog started working again, every filter came back and the error on apache log error dissapears.

I also tried changing the order in the plugins array.
I have tried this order:

$plugins = array();
$plugins[] = 'superlinks';
$plugins[] = 'update';
$plugins[] = 'settings';
$plugins[] = 'syslog';


and also this one:

$plugins = array();
$plugins[] = 'update';
$plugins[] = 'settings';
$plugins[] = 'syslog';
$plugins[] = 'superlinks';

After each change on the plugin array I restarted apache and tried but I still get the same error. By the moment the only solution I found is to deactivate superlinks plugins.


Im using cacti 0.8.7, plugin architecture 1.3, syslog 0.5.1 and superlinks 0.6 on centos5 x86_64.

¿¿any idea about this?? If someone wants a more detailed log or any special test I can do it and send it back.

many thanks in advance for any help.
Last edited by esplinter on Thu Nov 01, 2007 8:52 am, edited 1 time in total.
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Did you get the version of Superlinks that was released today? if not, give it a try.
User avatar
esplinter
Posts: 14
Joined: Wed Oct 31, 2007 7:12 pm

no luck

Post by esplinter »

no luck :(

I tried the version released by TheWitness and still getting the same error
User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

Try this order

Post by chrisgapske »

Try this order I have found that settings should always go fisrt.


$plugins = array();
$plugins[] = 'settings';
$plugins[] = 'thold';
$plugins[] = 'monitor';
$plugins[] = 'manage';
$plugins[] = 'syslog';
//$plugins[] = 'reportit';
$plugins[] = 'update';
//$plugins[] = 'mactrack';
$plugins[] = 'weathermap';
$plugins[] = 'tools';
$plugins[] = 'cycle';
$plugins[] = 'zond';
$plugins[] = 'docs';
$plugins[] = 'superlinks';
User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

Post by chrisgapske »

Another quick question you did not alter the syslog that you downloaded from Jimmy did you ?
User avatar
esplinter
Posts: 14
Joined: Wed Oct 31, 2007 7:12 pm

no luck again

Post by esplinter »

hi

I have just tried this order:
$plugins = array();
$plugins[] = 'settings';
$plugins[] = 'syslog';
$plugins[] = 'update';
$plugins[] = 'superlinks';

restarted apache and try and still fails.

I get the same error on apache error_log and I can´t see the filters declared on syslog plugin but the are active because still filter the syslog entries I configured not to show.

When I deactivate superlinks plugin I can see the syslog filters on the web interface again and the error on apache log error dissapears.

Also, I havent changed the syslog plugin code. I just put it on the plugins folder, chown -R cacti:cacti on it and added to the plugins array.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Does your Apache error_log add any value? Post a few lines if there is anything to see.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
esplinter
Posts: 14
Joined: Wed Oct 31, 2007 7:12 pm

developer mailed me

Post by esplinter »

hi TheWitness

there is nothing important too look at in my apache error log. Just this other error that is not important:

Code: Select all

[Thu Nov 01 20:51:05 2007] [error] [client 192.168.0.20] File does not exist: /var/www/cacti/plugins/syslog/images/shadow.gif, referer: http://localhost:8888/cacti/plugins/syslog/syslog_remove.php?id=434
the developer, Jimmy Conner, answered my mail and told me:
I believe I found the issue. Since syslog allows you to use a completely
different Database than Cacti (for good reasons, don't want to crash the
cacti DB) it does it own DB connect call. Later, it also includes
global_arrays.php which contains a plugin hook. During this hook
superlink is starting up its own DB call (since normally cacti doesn't
have a proper DB connection yet, but that is fixed in PA v2.0), which is
then overriding my connection. I see several ways to get around it, and
will see about implementing one of them and releasing a new version.

Jimmy
so I think the best solution is wait for his new release and give him thanks again for his great work :)
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well the issue is this, and it sucks. If you have two MySQL databases that you are connecting to in ADODB, they must have different UserID's. If the both use "cactiuser", the second connection will attempt to use the first. It's stupid, but documented at the ADODB site. So, different database, different User.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
niomix
Posts: 15
Joined: Fri Nov 02, 2007 2:52 am

Different database, different User.

Post by niomix »

It doesn't work.
I've the same issue, i try to use 2 different DB cactiDB087 and syslogDB087 with 2 different user, cacti and cactisyslog, but the problem persist.
Do you have idea for different work around ?
Thank you
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Syslog assumes that if it changes to a different database then that change will stick. Superlinks also makes it's own database connection (but doesn't assume it will still be there later, so will re-open it).

As a result, if you use Syslog with a different syslog database, you can't use Superlinks. I believe that syslog would need a change to get around this.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
esplinter
Posts: 14
Joined: Wed Oct 31, 2007 7:12 pm

Post by esplinter »

hi

this issue is solved on last syslog plugin release.

Right now I am using syslog plugin 0.5.2 and superlinks 0.72 and they are working ok.
niomix
Posts: 15
Joined: Fri Nov 02, 2007 2:52 am

Post by niomix »

YES !! solved !!!
Thankyou very much !

cacti 0.8.7
syslog 0.5.2
superlink 0.72
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests