Hello,
I would like to ask why if i enable the email alert configuration there we're no data inject to mysql database. Anyone encountered this problem?
Actually, I can receive an email alert but no logs can be display in phplogcon (web) the same what i've received from email
Please give me an idea on how to. Here's my configuration:
==========================
# for help with rsyslog configuration, visit
# http://www.rsyslog.com or the wiki at
# http://wiki.rsyslog.com
# rsyslog v3: load input modules
# If you do not load inputs, nothing happens!
# You may need to set the module load path if modules are not found.
# Enable e-mail notification module with ommail
$ModLoad ommail.so
$ActionMailSMTPServer 123.123.123.123
$ActionMailFrom root@syslogmoh.com
$ActionMailTo operator@syslogmoh.com
$template mailSubject,"MOH Alert on %hostname%"
$template mailBody,"RSYSLOG Alert\r\nmsg='%msg%'"
$ActionMailSubject mailSubject
# make sure we receive a mail only once in six
# hours (21,600 seconds ;))
#$ActionExecOnlyOnceEveryInterval 21600
$ActionExecOnlyOnceEveryInterval 60
# the if ... then ... mailBody must be on one line!
if $msg contains 'disk error then :ommail:;mailBody
# Enable MySQL module with ommysql
$ModLoad ommysql.so
$template phpsyslog,"insert into SystemEvents(host, facility, priority, level, tag, datetime, msg, seq) values ('%HOSTNAME%',%syslogfacility%,%syslogpriority%, '%sysloglevel%', '%syslogtag%', '%timereported:::date-mysql%', '%msg%', '%seq%')", SQL
$template phpsyslog,"insert into SystemEvents (Message, Facility,FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%',%syslogpriority%, '%timereported:::date-mysql%', '%timegenerated:::date-mysql%', %iut%, '%syslogtag%')",sql
*.* :ommysql:127.0.0.1,phpsyslog,username,password
$ModLoad immark.so # provides --MARK-- message capability
$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command)
$ModLoad imklog.so # kernel logging (formerly provided by rklogd)
# Remote Logging (we use TCP for reliable delivery)
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$WorkDirectory /rsyslog/spool # where to place spool files
#$ActionQueueFileName uniqName # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
#$WorkDirectory /var/log/rsyslog/ # default location for work (spool) files
#$MainMsgQueueFileName mainq # set file name, also enables disk mode
# ######### Receiving Messages from Remote Hosts ##########
# TCP Syslog Server:
# provides TCP syslog reception and GSS-API (if compiled to support it)
$ModLoad imtcp.so # load module
$InputTCPServerRun 514 # start up TCP listener at port 514
# UDP Syslog Server:
$ModLoad imudp.so # provides UDP syslog reception
$UDPServerRun 514 # start a UDP syslog server at standard port 514
*.* ~ # discards everything
=======
Thank you in advanced.
--coroy
MODERATOR EDIT: turned off smilies for better readibility


