Syslog 1.0 Released

Announcements concerning Plugins for Cacti

Moderators: Moderators, Developers

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

Re: awesome!

#61 Post by zorrosam » Tue Aug 10, 2010 6:55 am

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?

[[email protected] 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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#62 Post by TheWitness » Tue Aug 10, 2010 6:57 am

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

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

....

#63 Post by zorrosam » Tue Aug 10, 2010 7:44 am

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
[[email protected] 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?!

#64 Post by zorrosam » Tue Aug 10, 2010 7:48 am

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?!

#65 Post by zorrosam » Tue Aug 10, 2010 7:55 am

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?
[[email protected] 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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#66 Post by TheWitness » Tue Aug 10, 2010 8:36 am

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

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

here we go

#67 Post by zorrosam » Tue Aug 10, 2010 8:42 am

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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#68 Post by TheWitness » Tue Aug 10, 2010 8:50 am

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

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

#69 Post by zorrosam » Tue Aug 10, 2010 9:44 am

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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#70 Post by TheWitness » Tue Aug 10, 2010 12:26 pm

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

trungtano
Cacti User
Posts: 90
Joined: Fri Apr 10, 2009 1:57 am
Contact:

#71 Post by trungtano » Tue Aug 10, 2010 11:50 pm

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

#72 Post by zorrosam » Wed Aug 11, 2010 2:33 am

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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#73 Post by TheWitness » Wed Aug 11, 2010 7:00 am

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

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

????

#74 Post by zorrosam » Wed Aug 11, 2010 8:44 am

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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#75 Post by TheWitness » Wed Aug 11, 2010 2:33 pm

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

Post Reply