[syslog-ng] sqlsyslogd sometimes does not starts

Shane Presley shane.presley at gmail.com
Wed Jun 15 00:28:55 CEST 2005


I've been having the same problem with my script that takes the pipe
file and puts it into Oracle (using sqlplus).

It starts, but eventually dies.

I may just change and use cron, instead of an ever-running service.

Shane

On 6/13/05, Metal Gear <finattack at gmail.com> wrote:
> Hi,
>  i m using a script which logs certain alerts to mysql db. It mostly wotks
> fine but sometimes i see that i m not getting the alerts into mysql db i
> have to then manually start the service. I m using the following code for
> the above mentioned purpose which is being taken from
> http://www.vermeer.org/display_doc.php?doc_id=1#scripts. I
> m getting the logs in flat files but none in the mysql db.
>  
>  Thanks
>  
>  #!/bin/bash
>  #
>  # sqlsyslogd This is a daemon that takes syslog-ng input and pipe it into
>  # a MySQL database.
>  #
>  # chkconfig: 2345 92 10
>  # description: sqlsyslogd bridges syslog-ng and mysql.
>  # author: Josh Kuo Thu 2004/08/12 13:21:56 PDT
>  
>  . /etc/rc.d/init.d/functions
>  
>  case "$1" in
>  start)
>  if [ -x /tmp/mysql.pipe ]; then
>  mkfifo /tmp/mysql.pipe
>  else
>  # if the service is already running, do not start another one
>  PIDS=`pidofproc mysql`
>  if [ "$PIDS" ]; then
>  gprintf "sqlsyslogd is already running.\n"
>  exit 1
>  fi
>  mysql -u DBUSERNAME --password=PASSWORD DBNAME < /tmp/mysql.pipe &
>  fi
>  ;;
>  stop )
>  killproc mysql
>  ;;
>  
>  *)
>  gprintf "Usage: sqlsyslogd {start|stop}\n"
>  exit 1;
>  esac
>  exit 0;
>  
> _______________________________________________
> syslog-ng maillist  -  syslog-ng at lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at
> http://www.campin.net/syslog-ng/faq.html
> 
> 
> 
>


More information about the syslog-ng mailing list