Feature-Request -- log to syslog server

HI there
is it possible to make a Feature Request ???

can you mnake it happen that ALL logging goes to a syslog server ???

many thanks in advance
micheal

Hi Megasound,

i have the same request. and did send it today to the Author or Urbackup.
well, just after i´d a idea!
…as rsyslog does have the feature to “attach”, or “read”, other text files and show their content into the systlog message flow. once in there you can of course redirect to other syslog destinations if you like.
so the setup is like this:

  • one linux server01 running RSYSLOG
  • same server01 running UrbackupServerInstance
  • another server02 remotly as syslog server

now i run urbackup on server01 and it will store its messages in /var/log/urbackup.log and this is not visible in syslog on server01. yet. :slight_smile:
on server01 make urbackup log file /var/log/urbackup.log readable to the rsysloguser (eventually you might have to do: chmod o+r /var/log/urbackup.log)
now create a new conf file on server01 /etc/rsyslog.d/urbackup.conf and fill with the following content:
# load module to read from local files
$ModLoad imfile
# for each local log file path, duplicate the 5 lines below and edit lines 1-3
$InputFileName /var/log/urbackup.log
$InputFileTag UrBackup:
$InputFileStateFile UrBackup_statefile01
$InputFilePersistStateInterval 100 # update state file every 100 lines
$InputRunFileMonitor

on server01 now restart rsyslog: service rsyslog restart

on server01 now check your syslog (vor me /var/log/messages):
—snip------
Feb 15 20:54:09 svg-server UrBackup: 2017-02-15 20:54:00: svg-nucpc-w10: Calculating file tree differences…
Feb 15 20:54:09 svg-server UrBackup: 2017-02-15 20:54:00: svg-nucpc-w10: Calculating tree difference size…
Feb 15 20:54:09 svg-server UrBackup: 2017-02-15 20:54:01: svg-nucpc-w10: Linking unchanged and loading new files…
Feb 15 20:55:19 svg-server UrBackup: 2017-02-15 20:55:13: Waiting for file transfers…
Feb 15 20:58:59 svg-server UrBackup: 2017-02-15 20:58:59: Waiting for file hashing and copying threads…
Feb 15 20:59:09 svg-server UrBackup: 2017-02-15 20:59:00: Saving file metadata…
Feb 15 20:59:09 svg-server UrBackup: 2017-02-15 20:59:00: Writing new file list…
Feb 15 20:59:09 svg-server UrBackup: 2017-02-15 20:59:01: All metadata was present
Feb 15 20:59:09 svg-server UrBackup: 2017-02-15 20:59:03: Transferred 1.02615 GB - Average speed: 29.3861 MBit/s
—snip------

well, if your rsyslog on server01 is configured in “/etc/rsyslog.conf” to redirect to another server02, the you also get the messages or urbackup of server01 on server02 log file.

however, this is a workaround and rsyslog will re-read the urbackup,log each 100 seconds (or whatever you specified in the /etc/rsyslog.d/urbackup.conf file) using I/O powers of the server01. having Urbackup using the syslog framework would be the most cool solution.

have fun!
Stephan

At this point you could just use systemd-journald . That often wasn’t an option 3 years ago.

@uroni for some reason urbackup server duplicates log entries in the syslog (CentOS 7). Is there a way to disable that?

Just in case somebody faced same issue. It can be solved on the rsyslog side:

if $programname != "urbackupsrv" then {
*.debug         /var/log/debug
}

Is there an option to disable logging to systemd? I was able to disable logging to syslog (see above), but urbackup still floods the system logs, like:

$ journalctl -f
...
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: Loading file "data.keystream.len"
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: Flushing FileClient...
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: GT: Loaded file "data.keystream.len"
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: Loading file "data.len"
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: PT: Hashing file "data.keystream.len"
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: GT: Loaded file "data.len"
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: Loading file "data_i.len"
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: PT: Hashing file "data.len"
Jul 25 13:44:23 filer-1.my.domain urbackupsrv[1400]: Flushing FileClient...

I’d like to keep urbackup’s logs in its own file. Is that possible?

of course I meant logging to journald, sorry