Syslog 1.0 Released

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

Re: awesome!

Post by zorrosam »

zorrosam wrote:
zorrosam wrote:
trungtano wrote:Hi

I update this package: php-adodb-4.95-2.a.fc11.noarch

but nothing happen
great plugin and really a good job my friend!
Hi,

Houston i have a problem :-) ...

With the last version i'm not able to log any info in the syslog table.

The syslog.incoming is populated correctly ... but the script

/usr/bin/php -q /var/www/cacti/plugins/syslog/syslog_process.php

doesn't work anymore ... and tha data are not moved on the main table.

What can i do?

[root@patroclo syslog]# /usr/bin/php -q /var/www/cacti/plugins/syslog/syslog_process.php
PHP Deprecated: Function split() is deprecated in /var/www/cacti/plugins/syslog/syslog_process.php on line 70
08/10/2010 01:44:31 PM - SYSTEM SYSLOG STATS:Time:0.17 Deletes:0 Incoming:0 Removes:0 XFers:0 Alerts:0 Alarms:0 Reports:0

any help is appreciate!
ok ... the problem is the php 5.3

//list($micro,$seconds) = split(" ", microtime());
list($micro,$seconds) = explode(" ", microtime());

i have changed this row ... and no more errors ... but ... when i execute the script the syslog tables is not populated!

why?!
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Turn off deprecation warnings in PHP. Then, run the syslog_process in debug mode. Check the Cacti Log for errors. Post your findings.

Code: Select all

php -q syslog_process.php --force --debug
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
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

....

Post by zorrosam »

TheWitness wrote:Turn off deprecation warnings in PHP. Then, run the syslog_process in debug mode. Check the Cacti Log for errors. Post your findings.

Code: Select all

php -q syslog_process.php --force --debug
TheWitness
[root@patroclo nagios]# /usr/bin/php -q /var/www/cacti/plugins/syslog/syslog_process.php --debug
SYSLOG: Syslog Table is NOT Partitioned
SYSLOG: Deleted 0, Syslog Message(s) (older than 2010-07-11 days)
SYSLOG: Unique ID = 41
SYSLOG: Found 0, New Message(s) to process
SYSLOG: Found 0, Removal Rule(s) to process
SYSLOG: Found 0, Alert Rules to process
SYSLOG: Moved 0, Message(s) to the 'syslog' table
SYSLOG: Deleted 0, Already Processed Message(s) from incoming
SYSLOG: Updated 0, Hosts in the syslog hosts table
SYSLOG: Processing Reports...
SYSLOG: We have 0 Reports in the database
SYSLOG: Finished processing Reports...
08/10/2010 02:43:10 PM - SYSTEM SYSLOG STATS:Time:1.06 Deletes:0 Incoming:0 Removes:0 XFers:0 Alerts:0 Alarms:0 Reports:0

... the database in remote ... not in the local machine.

I have changed the settings in the config.php after the installation of the new plugin ... maybe for this reason the tables has some problems??
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

native database of cacti?!

Post by zorrosam »

ok ... maybe i have understood ... in the last ver we have the possibility to use the cactidb or not ... if i prefer use the external db i have to set to false the variable in the config.php and change all the parameters for the access to the alternative db.

is correct?
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

Re: native database of cacti?!

Post by zorrosam »

zorrosam wrote:ok ... maybe i have understood ... in the last ver we have the possibility to use the cactidb or not ... if i prefer use the external db i have to set to false the variable in the config.php and change all the parameters for the access to the alternative db.

is correct?
[root@patroclo syslog]# /usr/bin/php -q /var/www/cacti/plugins/syslog/syslog_process.php --debug
SYSLOG: Syslog Table is NOT Partitioned
SYSLOG: Deleted 0, Syslog Message(s) (older than 2010-07-11 days)
SYSLOG: Unique ID = 64
SYSLOG: Found 100, New Message(s) to process
SYSLOG: Found 5, Removal Rule(s) to process
SYSLOG: Deleted 0, Messages for removal rule 'login failure'
SYSLOG: Deleted 14, Messages for removal rule 'Loss of Cell Delin'
SYSLOG: Deleted 33, Messages for removal rule 'Loss of Signal'
SYSLOG: Deleted 37, Messages for removal rule 'Loss of Power'
SYSLOG: Deleted 37, Messages for removal rule 'Loss of Frame'
SYSLOG: Found 0, Alert Rules to process
SYSLOG: Moved , Message(s) to the 'syslog' table
SYSLOG: Deleted 63, Already Processed Message(s) from incoming
SYSLOG: Updated 0, Hosts in the syslog hosts table
SYSLOG: Processing Reports...
SYSLOG: We have 0 Reports in the database
SYSLOG: Finished processing Reports...
08/10/2010 02:52:57 PM - SYSTEM SYSLOG STATS:Time:0.18 Deletes:0 Incoming:100 Removes:37 XFers:0 Alerts:0 Alarms:0 Reports:0
You have new mail in /var/spool/mail/root

... now the script works ... but no message in the video ... and no more message in the syslog table. why?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You need to show your Cacti Log.
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
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

here we go

Post by zorrosam »

TheWitness wrote:You need to show your Cacti Log.
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"INSERT INTO `syslogdslam`.`syslog` (logtime, priority_id, facility_id, host_id, message) SELECT TIMESTAMP(`date`, `time`), priority_id, facility_id, host_id, message FROM (SELECT date, time, priority_id, facility_id, host_id, message FROM syslog_incoming AS si INNER JOIN syslog_facilities AS sf ON sf.facility=si.facility INNER JOIN syslog_priorities AS sp ON sp.priority=si.priority INNER JOIN syslog_hosts AS sh ON sh.host=si.host WHERE status=113) AS merge'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1044', SQL:"USE syslogdslam'
08/10/2010 03:41:07 PM - SYSTEM SYSLOG STATS:Time:5.67 Deletes:0 Incoming:72 Removes:23 XFers:0 Alerts:0 Alarms:0 Reports:0

... and one question.

i need once again this row in my crontab?

*/1 * * * * cacti /usr/bin/php -q /var/www/cacti/plugins/syslog/syslog_process.php

...or is for old version?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Relative to cron. No, not required. Relative to your error messages:
ERROR 1044: Access denied for user: <user> to database <database>
In other words, your Cacti system does not have access to your remote system. You need to fix the permissions error, and then re-install.

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
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

Post by zorrosam »

TheWitness wrote:Relative to cron. No, not required. Relative to your error messages:
ERROR 1044: Access denied for user: <user> to database <database>
In other words, your Cacti system does not have access to your remote system. You need to fix the permissions error, and then re-install.

TheWitness
... but sorry.

Cacti for moving the data from incoming table to syslog table uses the parameters from config.php Is correct? In that path i have set up all the variables correctly. If Cacti needs of others setting ... where i have to do it?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

config.php in the syslog plugin directory. However, you need to setup permissions first. Try connection as follows:

Code: Select all

mysql -u<user> -p<password> -h<hostname> syslog
If this works, then Syslog will work.

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?
trungtano
Cacti User
Posts: 90
Joined: Fri Apr 10, 2009 1:57 am
Contact:

Post by trungtano »

Hi TheWitness

Thank you very much, now it running well!

Thanks you

Best regard
TrungNguyen
User avatar
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

problem with refresh

Post by zorrosam »

trungtano wrote:Hi TheWitness

Thank you very much, now it running well!

Thanks you

Best regard
TrungNguyen
.... ok .. now i'm using the internal db in cacti and it works.

but ... sorry but even if the refresh of the page is setup to 1 min ... the page is not refresh automatically. why?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It was removed for performance reasons.
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
zorrosam
Cacti User
Posts: 244
Joined: Thu May 03, 2007 3:17 pm
Location: Italy

????

Post by zorrosam »

TheWitness wrote:It was removed for performance reasons.
... and now we have to refresh manually the page?

Bad news ... on my side NMC Monitoring and other groups found useful this feature for check during the day any troubles in the network ...
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I can add it back if it causes consternation.
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests