[systemd-devel] Accessing journal entries
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Fri May 16 16:59:46 PDT 2014
On Fri, May 16, 2014 at 07:48:43PM +0200, Lennart Poettering wrote:
> On Mon, 28.04.14 10:03, Rupak Ganguly (rupakg at gmail.com) wrote:
>
> > I am trying to access the journal using the HTTP interface, as described
> > here:
> > http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html
> >
> > I want to filter journal entries by starting date/time or until a specific
> > date/time and by number of lines. These are similar to journalctl's
> > --since, --until and -n switches.
> >
> > The question was, can it done by the HTTP API exposed by journal ?
>
> Yes you can. Consider checking browse.html (as available from the HTTP
> server, and also found in src/journal/browse.html), which will tell you
> how to put together the Range: HTTP field for this. Basically you just
> have to specifiy the journal "cursor" where to start from, plus the
> number of entries, separated by ":".
>
> A journal "cursor" identifies each message and is dumped as part of the
> verbose message output.
The man page [1] also describes this. If anything is unclear, please
complain.
Zbyszek
[1] http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html#Supported%20URLs
More information about the systemd-devel
mailing list