Syslog Plugin Empty Problem

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
desscartes
Cacti User
Posts: 96
Joined: Fri Mar 14, 2014 1:16 am

Syslog Plugin Empty Problem

Post by desscartes »

Hi everybody,

I finished all steps on [HowTo] http://forums.cacti.net/viewtopic.php?f ... 25#p253025 but still there is no logs. I can access database but all table ıs empty where is my problem? do I have to add devıce l for syslog?(lıke threshold) or all logs have to write with syslog? Is there any step for device on GUİ?

please help..

here my syslog-ng conf;

Code: Select all

@version: 3.0
#Default configuration file for syslog-ng.
#
# For a description of syslog-ng configuration file directives, please read
# the syslog-ng Administrator's guide at:
#
# http://www.balabit.com/dl/html/syslog-ng-admin-guide_en.html/bk01-toc.html
#

options {
};

######
# sources
source s_local {
# message generated by Syslog-NG
internal();
# standard Linux log source (this is the default place for the syslog()
# function to send logs to)
unix-stream("/dev/log");
# messages from the kernel
file("/proc/kmsg" program_override("kernel: "));






};
#@version: 3.1
#Bare minimum syslog-ng configuration

options { long_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
          owner("root"); group("adm"); perm(0640); stats_freq(0);
          bad_hostname("^gconfd$");
};

# we are using udp, and this is a collector for net traffic only
#
source s_all {
        udp();
#        internal();
#        unix-stream("/dev/log");
#        file("/proc/kmsg" log_prefix("kernel: "));
};

destination d_mysql {
        sql(type(mysql)
        host("localhost") username("cacti") password("*************")
        database("syslog")
        table("syslog_incoming")
        columns("facility", "priority", "date", "time", "host", "message")
        values("$FACILITY", "$PRIORITY", "$YEAR-$MONTH-$DAY",  "$HOUR:$MIN:$SEC", "$HOST_FROM", "$MSG")
        indexes("facility", "priority", "date", "time", "host", "msg"));
};

log {
source(s_all);
destination(d_mysql);
};

######
# destinations
destination d_messages { file("/var/log/messages"); };


log {
source(s_local);
destination(d_messages);
};

source net {
    udp();
};

destination d_mysql {
    pipe("/tmp/mysql.pipe"
    template("INSERT INTO syslog_incoming (host, facility, priority, date, time, message) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC',
'$MSG' );\n")
    template-escape(yes)
     );
};

log { source(net); destination(d_mysql); };
log { source(s_all); destination(d_mysql); };
here my tables:

Code: Select all

mysql> select * from syslog_alert;
Empty set (0.00 sec)

mysql> select * from syslog_facalities;
ERROR 1146 (42S02): Table 'syslog.syslog_facalities' doesn't exist
mysql> select * from syslog_facilities;
Empty set (0.00 sec)
here my syslog_proccess.php:

Code: Select all

[root@dess syslog]# php /var/www/html/cacti-0.8.8a/plugins/syslog/syslog_process.php --debug
PHP Warning:  Module 'ldap' already loaded in Unknown on line 0
SYSLOG: Syslog Table is NOT Partitioned
SYSLOG: Deleted 0,  Syslog Message(s) (older than 2014-09-21)
SYSLOG: Unique ID = 90
SYSLOG: Found   0,  New Message(s) to process
SYSLOG: Stats   0,  Record(s) to the 'syslog_statistics' table
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: Deleted 0,  Syslog Statistics Record(s)
SYSLOG: Deleted 0,  Syslog alarm log Record(s)
SYSLOG: Processing Reports...
SYSLOG: We have 0 Reports in the database
SYSLOG: Finished processing Reports...
10/21/2014 04:58:59 PM - SYSTEM SYSLOG STATS:Time:0.15 Deletes:0 Incoming:0 Removes:0 XFers:0 Alerts:0 Alarms:0 Reports:0


here my syslog ;
Computer Science Eng.

Cenk Durak
desscartes
Cacti User
Posts: 96
Joined: Fri Mar 14, 2014 1:16 am

Re: Syslog Plugin Empty Problem

Post by desscartes »

any solutıons?
Computer Science Eng.

Cenk Durak
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest