All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Leblond <eric@regit.org>
To: Petteri Matilainen <pmatil@gmail.com>, netfilter@vger.kernel.org
Subject: Re: [ULOGD2] Timestamp without year in logemu
Date: Tue, 03 Jan 2017 21:58:44 +0100	[thread overview]
Message-ID: <1483477124.14368.7.camel@regit.org> (raw)
In-Reply-To: <8f188faf-3890-c157-74ed-22808f915b05@gmail.com>

Hello,

On Tue, 2017-01-03 at 21:28 +0200, Petteri Matilainen wrote:
> Hello list,
> 
> I'm using iptables firewall and I'm logging blocked packets with
> NFLOG 
> target and ULOGD2. I have the following configuration in ulogd.conf:
> 
> # this is a stack for logging packets to firewall.log after a
> collect 
> via NFLOG
> stack=firewall6:NFLOG,base6:BASE,ifi6:IFINDEX,ip2str6:IP2STR,print6:P
> RINTPKT,logemu6:LOGEMU
> 
> [logemu6]
> file="/var/log/firewall.log"
> sync=1
> 
> The logging itself works just fine, but I noticed the timestamps are 
> missing the year, like so:
> 
> Apr 23 10:38:04 Router In_New_TCP IN=eth0 OUT=...
> 
> Any ideas why? This causes problems with the system I'm using to
> graph 
> the logs and make statistics. My system is Debian with kernel
> 3.16.7. 
> Ulogd version is 2.0.4. I found an online manual for ulogd2 which 
> mentioned a LOCAL filter but my ulogd does not recognize it.

I've just checked the code and it is using (since 2006) ctime which
does not return the year.

It may not work for you but if you use the JSON output, you will get
something nicely formated and will get the year.

BR,
-- 
Eric Leblond <eric@regit.org>

  reply	other threads:[~2017-01-03 20:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 19:28 [ULOGD2] Timestamp without year in logemu Petteri Matilainen
2017-01-03 20:58 ` Eric Leblond [this message]
2017-01-04  5:37   ` Petteri Matilainen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483477124.14368.7.camel@regit.org \
    --to=eric@regit.org \
    --cc=netfilter@vger.kernel.org \
    --cc=pmatil@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.