[rsyslog-notify] Forum Thread: Queue not working on Mongodb restart - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Wed Feb 5 14:26:24 CET 2014


User: nicktodd 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24186#p24186

Message: 
----------
Hi,

I have the following set up:

client { nginx access log -> imfile -> omrelp (with queue) } -> server {
imrelp -> ommongodb (with queue) }

It all works fine and when the server does down (tested by rebooting) the
logs on the client get queued and transfered when the server is back up.

The problem is when the server remains available (from the client
perspective) but when mongodb server goes down; via 'service mongodb
restart' or whatever. When this happens the logs are not queued on the
server side or at least if they are they never get persisted. Part of the
problem might be that every time I restart mongo things don't get back to
normal until I restart rsyslog as well. Would this remove anything that is
queued?

Here is the config stuff that matters:

Client:

module(load="imfile")
module(load="omrelp")

input(type="imfile" File="/var/log/nginx/access.log" Tag="access"
StateFile="access")

action(
    type="omrelp"
    target="{{ stats_node_ip }}"
    port="10514"
    queue.type="LinkedList"
    queue.filename="accessLogForwarding"
    queue.saveonshutdown="on"
    ) 

Server:

module(load="imrelp")
module(load="mmjsonparse")
module(load="ommongodb")

input(type="imrelp" port="10514")

template(name="mongodball" type="subtree" subtree="$!")

action(type="mmjsonparse")
if $parsesuccess == "OK" then {
        action(type="ommongodb"
                server="127.0.0.1"
                db="accesslogs"
                collection="rawdata"
                uid="id"
                pwd="pwd"
                template="mongodball"
                queue.type="linkedlist"
                queue.timeoutenqueue="0"
                queue.filename="mongodbQueue"
                queue.dequeuebatchsize="200"
                queue.size="500000"
                queue.timeoutenqueue="0"
                action.resumeretrycount="-1"
        )
}

Thanks in advance.


More information about the rsyslog-notify mailing list