[rsyslog-notify] Forum Thread: port number on remote DB - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Tue Jan 28 01:11:13 CET 2014


User: astaran 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24139#p24139

Message: 
----------
I'm working with a remote postgres DB and cannot write to it with a port
number.  I've tested the insert statement in the config below and it works
fine and I need to specify port 54000 with our local setup.

If I include the port, I get "no connection to server" (see below) and
absolutely nothing in a tcpdump.  Remove the port and still get no
connection to server, which is expected since no port is given and I get
some data showing in the tcpdump.  It appears that it's choking on a port
specification on the remote db.  

How does one specify a port in rsyslog?


[b:2rr13rg7]Relevant portions of the config:[/b:2rr13rg7]
------------------------------------------------------------
#rsyslog v3 config file

$ModLoad imuxsock.so    # provides support for local system logging (e.g.
via logger command)
$ModLoad imklog.so      # provides kernel logging support (previously done
by rklogd)
#$ModLoad immark.so     # provides --MARK-- message capability

# Provides UDP syslog reception
$ModLoad imudp.so
$UDPServerRun 514

$ModLoad ompgsql

$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

$template pgmsg,"insert into systemevents (message) values('msg')",SQL

cron.* :ompgsql:web-wxlogdb-pre01:54000,systemlog,postgres,pgpwd;pgmsg
------------------------------------------------------------

[b:2rr13rg7]When I get a cron msg as config'd above, rsyslog returns this
in a log message file yet absolutely nothing is in a tcp dump: 
[/b:2rr13rg7]
       Jan 28 00:03:02 web-wxrsyslog-pre01 rsyslogd: db error (1): no
connection to the server

[b:2rr13rg7]If I remove the ":54000" I get this in tcp dump while still
getting while still getting the error shown above (expected)[/b:2rr13rg7]
    00:05:02.333828 IP web-wxrsyslog-pre01.32782 >
web-wxlogdb-pre01.postgres: Flags [S], seq 1572670207, win 14600, options
[mss 1460,sackOK,TS val 622793476 ecr 0,nop,wscale 7], length 0
    00:05:02.334124 IP web-wxlogdb-pre01.postgres >
web-wxrsyslog-pre01.32782: Flags [R.], seq 0, ack 1572670208, win 0, length
0
    00:05:07.333866 ARP, Request who-has web-wxrsyslog-pre01 tell
web-wxlogdb-pre01, length 46
    00:05:07.333884 ARP, Reply web-wxrsyslog-pre01 is-at 00:50:56:9b:45:8e
(oui Unknown), length 28


More information about the rsyslog-notify mailing list