From: Steve Grubb <sgrubb@redhat.com>
To: Linux-audit <linux-audit@redhat.com>
Subject: Audit format utility
Date: Tue, 23 Sep 2014 18:03:48 -0400 [thread overview]
Message-ID: <7024971.pEsk4Tjhkf@x2> (raw)
Hello,
I have been doing some thinking about allowing user defined formats to be
declared as a parameter to ausearch. Before I commit to that, I thought it
might be interesting to create a "mockup". I have placed a utility here:
http://people.redhat.com/sgrubb/files/auformat.tar.gz
Just untar it and run make.
$ ./auformat
Usage: auformat <format-string> [path-to-log] --fill
What this means is that you can give it a path to a file. If you don't do that,
it will read from stdin. Then it will output the fields that you specify. To
specify fields start with a % and then put the name as seen in logs. A couple examples:
%auid %pid %path %exe
This will dump the raw value. But suppose you wanted the interpreted values?
Tell it to interpret by giving uppercase:
%AUID %SYSCALL %RES %PATH
Not all events have all fields. By default it will emit a message to stderr
about this. But, you can give it --fill which will print "(none)" in that case.
So, a use might be:
# ausearch --start today -m login --raw | ~sgrubb/test/auformat/auformat "%time %AUID %ses %RES\n"
The app also has 4 virtual field names: date, time, milli, serial. These
relate to the event timestamp which you couldn't specify any other way.
In any event, I am putting this out to see what people think.
-Steve
next reply other threads:[~2014-09-23 22:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 22:03 Steve Grubb [this message]
2014-09-25 16:16 ` Audit format utility LC Bruzenak
2014-09-26 3:05 ` Steve Grubb
2014-09-26 15:24 ` LC Bruzenak
2014-09-28 4:52 ` Burn Alting
2014-10-01 18:44 ` Steve Grubb
2014-10-01 21:44 ` Burn Alting
2014-10-02 21:23 ` Steve Grubb
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=7024971.pEsk4Tjhkf@x2 \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox