FreeBSD: rsyslog/mysql

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

FreeBSD: rsyslog/mysql

Postby efk on Sat Jan 05, 2008 8:50 pm

I'm having a heck of a time getting rsyslog to actually talk to mysql. I've set it up on a few servers now to rule out possible environment issues, and I'm stuck.

First the OS version:
FreeBSD cobalt.somedomain.com 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #1: Mon Oct 29 20:08:06 CST 2007 root@cobalt.somedomain.com:/usr/obj/usr/src/sys/GENERIC i386



rsyslog version:
rsyslogd 2.0.0, compiled with:
FEATURE_PTHREADS (dual-threading): Yes
FEATURE_REGEXP: Yes
FEATURE_LARGEFILE: Yes
FEATURE_NETZIP (message compression): Yes
SYSLOG_INET (Internet/remote support): Yes
FEATURE_GSSAPI (GSSAPI Kerberos 5 support): No
FEATURE_DEBUG (debug build, slow code): No

See http://www.rsyslog.com for more information.


Config:
#load the mysql module
ModLoad MySQL

#test config
#udpReception="Yes"
#udpPort="514"
#tcpReception="Yes"
#tcpPort="514"

# Log To a MySQL Database
Local0.* >localhost,syslog,sysloguser,syslogpass;


rsyslogd -d -n -f /usr/local/etc/rsyslog.conf -r514 -t514 output:
Starting.
134672384: rsyslog 2.0.0.
134672384: Called init.
134672384: Unloading non-static modules.
134672384: Clearing templates.
134672384: cfline: 'ModLoad MySQL'
134672384: - traditional PRI filter
134672384: symbolic name: Called logerr, msg: unknown priority name ""
134672384: config line NOT successfully processed
134672384: Called logerr, msg: the last error occured in /usr/local/etc/rsyslog.conf, line 2
134672384: cfline: 'Local0.* >localhost,syslog,sysloguser,syslogpass;'
134672384: Called logerr, msg: warning: selector line without actions will be discarded
134672384: - traditional PRI filter
134672384: symbolic name: * ==> 255
134672384: symbolic name: Local0 ==> 128
134672384: tried selector action for builtin-file: -2001
134672384: tried selector action for builtin-fwd: -2001
134672384: tried selector action for builtin-shell: -2001
134672384: tried selector action for builtin-discard: -2001
134672384: tried selector action for builtin-usrmsg: -2001
134672384: config line NOT successfully processed
134672384: Called logerr, msg: the last error occured in /usr/local/etc/rsyslog.conf, line 11
134672384: cfline: 'Local1.* /var/log/test.log'
134672384: Called logerr, msg: warning: selector line without actions will be discarded
134672384: - traditional PRI filter
134672384: symbolic name: * ==> 255
134672384: symbolic name: Local1 ==> 136
134672384: tried selector action for builtin-file: 0
134672384: Module builtin-file processed this config line.
134672384: template: ' TradFmt' assigned
134672384: cfline: 'mail.* /var/log/maillog'
134672384: selector line successfully processed
134672384: - traditional PRI filter
134672384: symbolic name: * ==> 255
134672384: symbolic name: mail ==> 16
134672384: tried selector action for builtin-file: 0
134672384: Module builtin-file processed this config line.
134672384: template: ' TradFmt' assigned
134672384: selector line successfully processed
134672384: Opened UNIX socket `/var/run/log' (fd 3).
134672384: Opened 2 syslog UDP port(s).
134672384: Allocating buffer for 200 TCP sessions.
134672384: Opened 2 syslog TCP port(s).
134672384: Worker thread started with state 0.

Active selectors:
Selector 1:
X X X X X X X X X X X X X X X X X FF X X X X X X X
Actions:
builtin-file: /var/log/test.log
Instance data: 0x806f200
RepeatedMsgReduction: 1
Resume Interval: 30
Suspended: 0
Disabled: 0
Exec only when previous is suspended: 0



Selector 2:
X X FF X X X X X X X X X X X X X X X X X X X X X X
Actions:
builtin-file: /var/log/maillog
Instance data: 0x806f400
RepeatedMsgReduction: 1
Resume Interval: 30
Suspended: 0
Disabled: 0
Exec only when previous is suspended: 0




134672384: Template: Name=' TradFmt'
134672384: Entry(80720c0): type 2, (FIELD), value: 'TIMESTAMP'
134672384: Entry(8072100): type 1, (CONSTANT), value: ' '
134672384: Entry(8072140): type 2, (FIELD), value: 'HOSTNAME'
134672384: Entry(8072180): type 1, (CONSTANT), value: ' '
134672384: Entry(80721c0): type 2, (FIELD), value: 'syslogtag'
134672384: Entry(8072200): type 2, (FIELD), value: 'msg' [drop last LF in msg]
134672384: Entry(8072240): type 1, (CONSTANT), value: '
'
134672384: Template: Name=' WallFmt'
134672384: Entry(8072280): type 1, (CONSTANT), value: '

Message from syslogd@'
134672384: Entry(80722c0): type 2, (FIELD), value: 'HOSTNAME'
134672384: Entry(8072300): type 1, (CONSTANT), value: ' at '
134672384: Entry(8072340): type 2, (FIELD), value: 'timegenerated'
134672384: Entry(8072380): type 1, (CONSTANT), value: ' ...

'
134672384: Entry(80723c0): type 2, (FIELD), value: 'syslogtag'
134672384: Entry(8072400): type 2, (FIELD), value: 'msg'
134672384: Entry(8072440): type 1, (CONSTANT), value: '

'
134672384: Template: Name=' StdFwdFmt'
134672384: Entry(8072480): type 1, (CONSTANT), value: '<'
134672384: Entry(80724c0): type 2, (FIELD), value: 'PRI'
134672384: Entry(8072500): type 1, (CONSTANT), value: '>'
134672384: Entry(8072540): type 2, (FIELD), value: 'TIMESTAMP'
134672384: Entry(8072580): type 1, singleWorker: queue EMPTY, waiting for next message.
134672384: (CONSTANT), value: ' '
134672384: Entry(80725c0): type 2, (FIELD), value: 'HOSTNAME'
134672384: Entry(8072600): type 1, (CONSTANT), value: ' '
134672384: Entry(8072640): type 2, (FIELD), value: 'syslogtag'
134672384: Entry(8072680): type 2, (FIELD), value: 'msg'
134672384: Template: Name=' StdUsrMsgFmt'
134672384: Entry(80726c0): type 1, (CONSTANT), value: ' '
134672384: Entry(8072700): type 2, (FIELD), value: 'syslogtag'
134672384: Entry(8072740): type 2, (FIELD), value: 'msg'
134672384: Entry(8072780): type 1, (CONSTANT), value: '

'
134672384: Template: Name=' StdDBFmt' [SQL-Format (MySQL)]
134672384: Entry(80727c0): type 1, (CONSTANT), value: 'insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values (''
134672384: Entry(8072800): type 2, (FIELD), value: 'msg'
134672384: Entry(8072840): type 1, (CONSTANT), value: '', '
134672384: Entry(8072880): type 2, (FIELD), value: 'syslogfacility'
134672384: Entry(80728c0): type 1, (CONSTANT), value: ', ''
134672384: Entry(8072900): type 2, (FIELD), value: 'HOSTNAME'
134672384: Entry(8072940): type 1, (CONSTANT), value: '', '
134672384: Entry(8072980): type 2, (FIELD), value: 'syslogpriority'
134672384: Entry(80729c0): type 1, (CONSTANT), value: ', ''
134672384: Entry(8072a00): type 2, (FIELD), value: 'timereported' [Format as MySQL-Date]
134672384: Entry(8072a40): type 1, (CONSTANT), value: '', ''
134672384: Entry(8072a80): type 2, (FIELD), value: 'timegenerated' [Format as MySQL-Date]
134672384: Entry(8072ac0): type 1, (CONSTANT), value: '', '
134672384: Entry(8072b00): type 2, (FIELD), value: 'iut'
134672384: Entry(8072b40): type 1, (CONSTANT), value: ', ''
134672384: Entry(8072b80): type 2, (FIELD), value: 'syslogtag'
134672384: Entry(8072bc0): type 1, (CONSTANT), value: '')'
134672384: Template: Name=' StdPgSQLFmt' [SQL-Format (standard SQL)]
134672384: Entry(8072c00): type 1, (CONSTANT), value: 'insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values (''
134672384: Entry(8072c40): type 2, (FIELD), value: 'msg'
134672384: Entry(8072c80): type 1, (CONSTANT), value: '', '
134672384: Entry(8072cc0): type 2, (FIELD), value: 'syslogfacility'
134672384: Entry(8072d00): type 1, (CONSTANT), value: ', ''
134672384: Entry(8072d40): type 2, (FIELD), value: 'HOSTNAME'
134672384: Entry(8072d80): type 1, (CONSTANT), value: '', '
134672384: Entry(8072dc0): type 2, (FIELD), value: 'syslogpriority'
134672384: Entry(8072e00): type 1, (CONSTANT), value: ', ''
134672384: Entry(8072e40): type 2, (FIELD), value: 'timereported' [Format as PgSQL-Date]
134672384: Entry(8072e80): type 1, (CONSTANT), value: '', ''
134672384: Entry(8072ec0): type 2, (FIELD), value: 'timegenerated' [Format as PgSQL-Date]
134672384: Entry(8072f00): type 1, (CONSTANT), value: '', '
134672384: Entry(8072f40): type 2, (FIELD), value: 'iut'
134672384: Entry(8072f80): type 1, (CONSTANT), value: ', ''
134672384: Entry(8072fc0): type 2, (FIELD), value: 'syslogtag'
134672384: Entry(8073000): type 1, (CONSTANT), value: '')'
134672384: Loaded Module: Name='builtin-file', IFVersion=1, type=output module.
134672384: Entry points:
134672384: queryEtryPt: 0x805c388
134672384: doAction: 0x805b750
134672384: parseSelectorAct: 0x805bc6c
134672384: dbgPrintInstInfo: 0x805b29c
134672384: freeInstance: 0x805b6a8
134672384:
134672384: Loaded Module: Name='builtin-fwd', IFVersion=1, type=output module.
134672384: Entry points:
134672384: queryEtryPt: 0x805a2d4
134672384: doAction: 0x80599b4
134672384: parseSelectorAct: 0x8059d18
134672384: dbgPrintInstInfo: 0x805979c
134672384: freeInstance: 0x8059704
134672384:
134672384: Loaded Module: Name='builtin-shell', IFVersion=1, type=output module.
134672384: Entry points:
134672384: queryEtryPt: 0x8058d80
134672384: doAction: 0x8058bec
134672384: parseSelectorAct: 0x8058c38
134672384: dbgPrintInstInfo: 0x8058bcc
134672384: freeInstance: 0x8058bac
134672384:
134672384: Loaded Module: Name='builtin-discard', IFVersion=1, type=output module.
134672384: Entry points:
134672384: queryEtryPt: 0x805c834
134672384: doAction: 0x805c704
134672384: parseSelectorAct: 0x805c730
134672384: dbgPrintInstInfo: 0x805c6e8
134672384: freeInstance: 0x805c710
134672384:
134672384: Loaded Module: Name='builtin-usrmsg', IFVersion=1, type=output module.
134672384: Entry points:
134672384: queryEtryPt: 0x8059528
134672384: doAction: 0x8059290
134672384: parseSelectorAct: 0x80592bc
134672384: dbgPrintInstInfo: 0x8058f88
134672384: freeInstance: 0x8058f5c
134672384:

Sytem Line Configuration Commands:
Command 'dynafilecachesize':
type : 6
pData: 0x0
Hdlr : 0x805b340
Owner: 0x805c370

Command 'dirowner':
type : 2
pData: 0x8065a2c
Hdlr : 0x0
Owner: 0x805c370

Command 'dirgroup':
type : 3
pData: 0x8065a30
Hdlr : 0x0
Owner: 0x805c370

Command 'fileowner':
type : 2
pData: 0x8065a24
Hdlr : 0x0
Owner: 0x805c370

Command 'filegroup':
type : 3
pData: 0x8065a28
Hdlr : 0x0
Owner: 0x805c370

Command 'dircreatemode':
type : 5
pData: 0x80648a4
Hdlr : 0x0
Owner: 0x805c370

Command 'filecreatemode':
type : 5
pData: 0x80648a0
Hdlr : 0x0
Owner: 0x805c370

Command 'createdirs':
type : 4
pData: 0x8065a34
Hdlr : 0x0
Owner: 0x805c370

Command 'failonchownfailure':
type : 4
pData: 0x8065a20
Hdlr : 0x0
Owner: 0x805c370

Command 'resetconfigvariables':
type : 1
pData: 0x0
Hdlr : 0x805c30c
Owner: 0x805c370

type : 1
pData: 0x0
Hdlr : 0x804c5c0
Owner: 0x0

Command 'mainmsgqueuesize':
type : 6
pData: 0x8065b84
Hdlr : 0x0
Owner: 0x0

Command 'repeatedmsgreduction':
type : 4
pData: 0x8065960
Hdlr : 0x0
Owner: 0x0

Command 'actionexeconlywhenpreviousissuspended':
type : 4
pData: 0x8065964
Hdlr : 0x0
Owner: 0x0

Command 'actionresumeinterval':
type : 6
pData: 0x0
Hdlr : 0x804cdd0
Owner: 0x0

Command 'controlcharacterescapeprefix':
type : 7
pData: 0x806446c
Hdlr : 0x0
Owner: 0x0

Command 'escapecontrolcharactersonreceive':
type : 4
pData: 0x806595c
Hdlr : 0x0
Owner: 0x0

Command 'dropmsgswithmaliciousdnsptrrecords':
type : 4
pData: 0x8065884
Hdlr : 0x0
Owner: 0x0

Command 'droptrailinglfonreception':
type : 4
pData: 0x8064468
Hdlr : 0x0
Owner: 0x0

Command 'template':
type : 1
pData: 0x0
Hdlr : 0x804ff44
Owner: 0x0

Command 'outchannel':
type : 1
pData: 0x1
Hdlr : 0x804ff44
Owner: 0x0

Command 'allowedsender':
type : 1
pData: 0x2
Hdlr : 0x804ff44
Owner: 0x0

Command 'modload':
type : 1
pData: 0x0
Hdlr : 0x804e6e8
Owner: 0x0

Command 'includeconfig':
type : 1
pData: 0x0
Hdlr : 0x804fcb4
Owner: 0x0

Command 'umask':
type : 5
pData: 0x0
Hdlr : 0x804ceb8
Owner: 0x0

Command 'debugprinttemplatelist':
type : 4
pData: 0x8064464
Hdlr : 0x0
Owner: 0x0

Command 'debugprintmodulelist':
type : 4
pData: 0x8064460
Hdlr : 0x0
Owner: 0x0

Command 'debugprintcfsyslinehandlerlist':
type : 4
pData: 0x806445c
Hdlr : 0x0
Owner: 0x0

Command 'moddir':
type : 8
pData: 0x806590c
Hdlr : 0x0
Owner: 0x0



Allowed UDP Senders:
No restrictions set.

Allowed TCP Senders:
No restrictions set.

Messages with malicious PTR DNS Records are not dropped.
Control characters are replaced upon reception.
Control character escape sequence prefix is '#'.
Main queue size 10000 messages.
134672384: logmsg: syslog.info<46>, flags 5, from '', msg [origin software="rsyslogd" swVersion="2.0.0" x-pid="68124"][x-configInfo udpReception="Yes" udpPort="514" tcpReception="Yes" tcpPort="514"] restart
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: restarted.
134672384: Debugging enabled, SIGUSR1 to turn off debugging.
134672384: logmsg: syslog.err<43>, flags 5, from '', msg unknown priority name ""
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: logmsg: syslog.err<43>, flags 5, from '', msg the last error occured in /usr/local/etc/rsyslog.conf, line 2
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: logmsg: syslog.err<43>, flags 5, from '', msg warning: selector line without actions will be discarded
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: logmsg: syslog.err<43>, flags 5, from '', msg the last error occured in /usr/local/etc/rsyslog.conf, line 11
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: logmsg: syslog.err<43>, flags 5, from '', msg warning: selector line without actions will be discarded
134672384: Message has legacy syslog format.
134674432: Lone worker is running...
134672384: EnqueueMsg signaled condition (0)
134674432: Lone worker is running...
134672384: Listening on UDP syslogd socket 6 (IPv6/port 514).
134674432: Lone worker is running...
134672384: Listening on UDP syslogd socket 7 (IPv4/port 514).
134674432: Lone worker is running...
134672384: Listening on TCP syslogd socket 8 (IPv6/port 514).
134674432: Lone worker is running...
134672384: Listening on TCP syslogd socket 9 (IPv4/port 514).
134674432: Lone worker is running...
134672384: ----------------------------------------
134674432: singleWorker: queue EMPTY, waiting for next message.
134672384: Calling select, active file descriptors (max 9): 3 6 7 8 9
134672384: No select activity.
134672384: Listening on UDP syslogd socket 6 (IPv6/port 514).
134672384: Listening on UDP syslogd socket 7 (IPv4/port 514).
134672384: Listening on TCP syslogd socket 8 (IPv6/port 514).
134672384: Listening on TCP syslogd socket 9 (IPv4/port 514).
134672384: ----------------------------------------
134672384: Calling select, active file descriptors (max 9): 3 6 7 8 9
134672384:
Successful select, descriptor count = 1, Activity on: 7
134672384: Host name for your address (192.168.3.254) unknown
134672384: Message from inetd socket: #7, host: 192.168.3.254
134672384: Message length: 61, File descriptor: 7.
134672384: logmsg: local0.crit<130>, flags 2, from '192.168.3.254', msg logged with logger -p local0.crit ---> this doesn't work
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: Listening on UDP syslogd socket 6 (IPv6/port 514).
134672384: Listening on UDP syslogd socket 7 (IPv4/port 514).
134672384: Listening on TCP syslogd socket 8 (IPv6/port 514).
134672384: Listening on TCP syslogd socket 9 (IPv4/port 514).
134672384: ----------------------------------------
134672384: Calling select, active file descriptors (max 9): 3 6 7 8 9
134674432: Lone worker is running...
134674432: singleWorker: queue EMPTY, waiting for next message.
134672384:
Successful select, descriptor count = 1, Activity on: 7
134672384: Host name for your address (192.168.3.254) unknown
134672384: Message from inetd socket: #7, host: 192.168.3.254
134672384: Message length: 61, File descriptor: 7.
134672384: logmsg: local0.crit<130>, flags 2, from '192.168.3.254', msg logged with logger -p local0.crit ---> this doesn't work
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: Listening on UDP syslogd socket 6 (IPv6/port 514).
134672384: Listening on UDP syslogd socket 7 (IPv4/port 514).
134672384: Listening on TCP syslogd socket 8 (IPv6/port 514).
134672384: Listening on TCP syslogd socket 9 (IPv4/port 514).
134672384: ----------------------------------------
134672384: Calling select, active file descriptors (max 9): 3 6 7 8 9
134674432: Lone worker is running...
134674432: singleWorker: queue EMPTY, waiting for next message.
134672384:
Successful select, descriptor count = 1, Activity on: 7
134672384: Host name for your address (192.168.3.254) unknown
134672384: Message from inetd socket: #7, host: 192.168.3.254
134672384: Message length: 61, File descriptor: 7.
134672384: logmsg: local0.crit<130>, flags 2, from '192.168.3.254', msg logged with logger -p local0.crit ---> this doesn't work
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: Listening on UDP syslogd socket 6 (IPv6/port 514).
134672384: Listening on UDP syslogd socket 7 (IPv4/port 514).
134672384: Listening on TCP syslogd socket 8 (IPv6/port 514).
134672384: Listening on TCP syslogd socket 9 (IPv4/port 514).
134672384: ----------------------------------------
134672384: Calling select, active file descriptors (max 9): 3 6 7 8 9
134674432: Lone worker is running...
134674432: singleWorker: queue EMPTY, waiting for next message.
134672384:
Successful select, descriptor count = 1, Activity on: 7
134672384: Host name for your address (192.168.3.254) unknown
134672384: Message from inetd socket: #7, host: 192.168.3.254
134672384: Message length: 61, File descriptor: 7.
134672384: logmsg: local0.crit<130>, flags 2, from '192.168.3.254', msg logged with logger -p local0.crit ---> this doesn't work
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: Listening on UDP syslogd socket 6 (IPv6/port 514).
134672384: Listening on UDP syslogd socket 7 (IPv4/port 514).
134672384: Listening on TCP syslogd socket 8 (IPv6/port 514).
134672384: Listening on TCP syslogd socket 9 (IPv4/port 514).
134672384: ----------------------------------------
134672384: Calling select, active file descriptors (max 9): 3 6 7 8 9
134674432: Lone worker is running...
134674432: singleWorker: queue EMPTY, waiting for next message.
134672384:
Successful select, descriptor count = 1, Activity on: 7
134672384: Host name for your address (192.168.3.254) unknown
134672384: Message from inetd socket: #7, host: 192.168.3.254
134672384: Message length: 61, File descriptor: 7.
134672384: logmsg: local0.crit<130>, flags 2, from '192.168.3.254', msg logged with logger -p local0.crit ---> this doesn't work
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: Listening on UDP syslogd socket 6 (IPv6/port 514).
134672384: Listening on UDP syslogd socket 7 (IPv4/port 514).
134672384: Listening on TCP syslogd socket 8 (IPv6/port 514).
134672384: Listening on TCP syslogd socket 9 (IPv4/port 514).
134672384: ----------------------------------------
134672384: Calling select, active file descriptors (max 9): 3 6 7 8 9
134674432: Lone worker is running...
134674432: singleWorker: queue EMPTY, waiting for next message.
134672384: Select interrupted.
134672384: Listening on UDP syslogd socket 6 (IPv6/port 514).
134672384: Listening on UDP syslogd socket 7 (IPv4/port 514).
134672384: Listening on TCP syslogd socket 8 (IPv6/port 514).
134672384: Listening on TCP syslogd socket 9 (IPv4/port 514).
134672384: ----------------------------------------
134672384: Calling select, active file descriptors (max 9): 3 6 7 8 9
^C134672384: DoDie called.
134672384: Select interrupted.
134672384: exiting on signal 2
134672384: logmsg: syslog.info<46>, flags 5, from '', msg [origin software="rsyslogd" swVersion="2.0.0" x-pid="68124"] exiting on signal 2.
134672384: Message has legacy syslog format.
134672384: EnqueueMsg signaled condition (0)
134672384: Freeing log structures.
134672384: Initiating worker thread shutdown sequence...
134674432: Lone worker is running...
134674432: Worker thread terminates
134672384: Worker thread terminated.
134672384: Closing socket 9.
134672384: Closing socket 8.
134672384: Unloading module builtin-file
134672384: Unloading module builtin-fwd
134672384: Unloading module builtin-shell
134672384: Unloading module builtin-discard
134672384: Unloading module builtin-usrmsg
134672384: Clean shutdown completed, bye.
cobalt#


It should be noted that logging to files both locally and remotely works fine, but actually getting rsyslog to touch mysql has yet to work. What am I doing wrong?
efk
New
 
Posts: 3
Joined: Sat Jan 05, 2008 8:41 pm

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

RE: FreeBSD: rsyslog/mysql

Postby rgerhards on Sat Jan 05, 2008 9:39 pm

As usual (at least with me), it is just a small detail ;)

Enhanced config line directives start with $-Sign. So it is $ModLoad and not ModLoad. I guess everything works fine after you have changed that (but you need to make sure the ommsql module is somewhere in the default search path, where it should have been placed by make install.

BTW: very nice error report, easy to follow and all I need. Thanks!

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: FreeBSD: rsyslog/mysql

Postby mbiebl on Sat Jan 05, 2008 9:42 pm

rsyslogd 2.0.0, compiled with:
FEATURE_PTHREADS (dual-threading): Yes
FEATURE_REGEXP: Yes
FEATURE_LARGEFILE: Yes
FEATURE_NETZIP (message compression): Yes
SYSLOG_INET (Internet/remote support): Yes
FEATURE_GSSAPI (GSSAPI Kerberos 5 support): No
FEATURE_DEBUG (debug build, slow code): No

See http://www.rsyslog.com for more information.


Have you built rsyslog with ./configure --enable-mysql?
Do you have a /(usr/local/)lib/rsyslog/ommysql.so?

#load the mysql module
ModLoad MySQL


Try with
$ModLoad MySQL

Note the leading "$"!

HTH,
Michael
mbiebl
Avarage
 
Posts: 19
Joined: Wed Dec 05, 2007 12:46 am

Re: RE: FreeBSD: rsyslog/mysql

Postby efk on Sat Jan 05, 2008 11:17 pm

rgerhards wrote:As usual (at least with me), it is just a small detail ;)

Enhanced config line directives start with $-Sign. So it is $ModLoad and not ModLoad. I guess everything works fine after you have changed that (but you need to make sure the ommsql module is somewhere in the default search path, where it should have been placed by make install.

BTW: very nice error report, easy to follow and all I need. Thanks!

Rainer


That did it, I greatly appreciate the insight! I knew it coudln't be that hard. I was using msyslog but since the project isn't being actively developed I didn't want to continue to use that. Not only that, but rsyslog recently made it into the freebsd ports tree (which is how I built it).

I must take issue with the dollar-sign in the config-file variables. This is very akward in comparison to the standard config files for most other *nix/oss software. Generally, if you're calling a variable already declared within the config the dollar sign would be necessary and this would mimic behavior that most of us are already familiar with. I point to the postfix configuration file for a good example of how a configuration file should be laid out.
efk
New
 
Posts: 3
Joined: Sat Jan 05, 2008 8:41 pm

Re: FreeBSD: rsyslog/mysql

Postby efk on Sat Jan 05, 2008 11:18 pm

Have you built rsyslog with ./configure --enable-mysql?
Do you have a /(usr/local/)lib/rsyslog/ommysql.so?

HTH,
Michael


I appreciate the response, I should have included how I built the software - sorry about that.

I used the rsyslogd-mysql port from within freebsd to build it out - and that includes all the necessary build options.

Eric
efk
New
 
Posts: 3
Joined: Sat Jan 05, 2008 8:41 pm

RE: Re: FreeBSD: rsyslog/mysql

Postby rgerhards on Tue Jan 08, 2008 7:02 pm

I have to admit that I myself do not like the config file format. It was a decision based on backward-compatibility needs and very early in the project. Using the $-sign wasn't good.

... but: for the time being, that is how it is. There are more important things on the agenda than the config file format. But I've already blogged last summer about possible future config file formats. When I am done with the next important features (like store-and-forward and full expression support), I'll probably go back to the config file format issue.

Sorry there is no more satisfying response at this time. And, btw, I am glad it worked out ;)

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Google Ads



Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests

cron