2

I'm using systemd-journal-upload on serveral nodes to forward their journals to a single systemd-journal-remote sink, loghost01:

/var/log/journal
├── <foo-bar>
│   ├── system.journal
│   └── user-1000.journal
└── remote
    ├── remote-x.x.x.x.journal
    └── ...

This worked out the box for me on Debian 9 and systemd 232.

But I would like to have a redundant system, say loghost02, which works as a second systemd-journal-remote instance that also receives the uploaded journals.

Unfortunately, adding another URL to /etc/systemd/journal-upload.conf (on the uploading nodes) does not work:

[Upload]
URL=http://<REMOTE_IP_01>:<REMOTE_PORT>  # this is ignored
URL=http://<REMOTE_IP_02>:<REMOTE_PORT>  # this is working

# enable HTTPS
...

The config docs are silent on this issue.

How would I achieve redundancy in this scenario?

1

You can run one or more instances interactively with:

/usr/lib/systemd/systemd-journal-upload \
--url=https://my.server.domain \
--key=path_to_key.key \
--cert=path_to_cert.crt \
--trust=path_to_trust.crt \
--save-state=/var/tmp/state.my.server.domain

and change the url, ssl info or state file as you need for each. Since you can do this, you can also make your own unit files for them and not use the default setup. All you did in your example is redefine URL before starting.

0

You have to achieve redundancy on the receiving end, by using a web service with redundant infrastructure to receive the logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.