Discussion:
date ranges with systemd-journal-gatewayd
(too old to reply)
Jameson Graef Rollins
2018-01-11 00:46:08 UTC
Permalink
Raw Message
Hello. Is it possible to specify date ranges with
systemd-journal-gatewayd (i.e. equivalent of --since= and --until= in
journalctl)? I see there is a "Range:" header option that allows
restricting entries by "cursor", but I can't figure out how to translate
dates into that interface.

What about the possibility of adding something like a
"date=<since>:<until>" option to the Range: header that would allow
restricting entries by date?

Thanks so much.

jamie.
Jameson Graef Rollins
2018-01-11 03:03:06 UTC
Permalink
Raw Message
Hello, I'm having another systemd-journal-gatewayd issue...

I'm finding that journal-gatewayd is not returning all logs that are
actually available in the journal to users with appropriate privileges.

In particular, I have a service whose managed ExecStart program is
writing to stdout and stderr, all of which are captured by journald.
Using journalctl I can see all the process output in the logs. However,
none of this output is available via journal-gatewayd.

Why are these logs being filtered by journal-gatewayd? How can I force
it to not filter any logs from the journal?

Thanks for the help.

jamie.
Lennart Poettering
2018-01-24 10:54:04 UTC
Permalink
Raw Message
On Mi, 10.01.18 19:03, Jameson Graef Rollins (***@finestructure.net) wrote:

> Hello, I'm having another systemd-journal-gatewayd issue...
>
> I'm finding that journal-gatewayd is not returning all logs that are
> actually available in the journal to users with appropriate privileges.
>
> In particular, I have a service whose managed ExecStart program is
> writing to stdout and stderr, all of which are captured by journald.
> Using journalctl I can see all the process output in the logs. However,
> none of this output is available via journal-gatewayd.
>
> Why are these logs being filtered by journal-gatewayd? How can I force
> it to not filter any logs from the journal?

Hmm, this might be an access control issue? systemd-journal-gatewayd.service
runs in the "systemd-journal" group, which should normally have access
to all journal files, by means of appropriate ACL entries. Consider
checking whether the ACLs are all set up properly, so that that group
gets proper access.

Lennart

--
Lennart Poettering, Red Hat
Lennart Poettering
2018-01-24 10:51:11 UTC
Permalink
Raw Message
On Mi, 10.01.18 16:46, Jameson Graef Rollins (***@finestructure.net) wrote:

> Hello. Is it possible to specify date ranges with
> systemd-journal-gatewayd (i.e. equivalent of --since= and --until= in
> journalctl)? I see there is a "Range:" header option that allows
> restricting entries by "cursor", but I can't figure out how to translate
> dates into that interface.

Cursors won't help you to filter by date.

Filtering by date is not available currently in
systemd-journal-gatewayd. But adding this does make sense. Please file
a github RFE issue about this. Or even better, post a github PR that
adds this!

Lennart

--
Lennart Poettering, Red Hat
Jameson Graef Rollins
2018-01-24 16:36:59 UTC
Permalink
Raw Message
On Wed, Jan 24 2018, Lennart Poettering <***@poettering.net> wrote:
> On Mi, 10.01.18 16:46, Jameson Graef Rollins (***@finestructure.net) wrote:
>
>> Hello. Is it possible to specify date ranges with
>> systemd-journal-gatewayd (i.e. equivalent of --since= and --until= in
>> journalctl)? I see there is a "Range:" header option that allows
>> restricting entries by "cursor", but I can't figure out how to translate
>> dates into that interface.
>
> Cursors won't help you to filter by date.
>
> Filtering by date is not available currently in
> systemd-journal-gatewayd. But adding this does make sense. Please file
> a github RFE issue about this. Or even better, post a github PR that
> adds this!

Thanks for the response, Lennart. I actually see now that an RFE has
already been submitted:

https://github.com/systemd/systemd/issues/4883

I'll look into making a patch.

jamie.
Loading...