Page MenuHomeVyOS Platform

Rewrite remote logging (syslog) to XML/Python
Closed, ResolvedPublic

Description

We need to extend configurable options for remote logging
like now we missing settings for port, protocol and more things
before implementing this, better first to move from Perl to python

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

syncer triaged this task as Normal priority.Jul 6 2018, 8:35 PM
syncer created this task.
syncer created this object with visibility "Public (No Login Required)".
c-po renamed this task from Rewrite remote logging to XML/Python to Rewrite remote logging (syslog) to XML/Python.Jul 10 2018, 8:00 PM
hagbard changed the task status from Open to In progress.Jul 11 2018, 11:05 PM
hagbard added a subscriber: c-po.

@syncer, @c-po /opt/vyatta/etc/logrotate/global is generated as well (logrotate for syslog files), where should I place the new one just under /etc/logrotate.d? It's going to be generated via the cli config, so an image update wouldn't do anything bad.
Also, I'm going to created different config files, rather than 1 global one. That way, we could later drop in database logging support and the such. As far as I have seen, you can currently only log to a remote host.

Yup, that's what I think too.

vyatta did place there 2 files for logrotation already:
/etc/logrotate.d/vyatta-config-logs
/etc/logrotate.d/vyatta-ipsec-logs

but:
/opt/vyatta/etc/logrotate/global

I was thinking to rename global to vyos-logrotate or vyos-syslogrotate or something like that, to make sure I don't interfere with any debian based packages aka:

(debian squueze, my desktop):
dpkg -S /etc/logrotate.d/rsyslog
rsyslog: /etc/logrotate.d/rsyslog

That should avoid then headaches when 1.3 is being done.

Do you guys have a mailing list or anyhing where dev stuff is being discussed?

Now I found out the mystery from logrotate, vyatta put the logrotate files into persistent storage since they are triggered by rsyslog itself. I have them currently moved to /etc/logroate.d since they are configured with a size. But this might be prone to a race condition. @c-po I think we need some kind of persistent storage for vyos as well if we want to decom /opt/vyatta at one point. Would be also good for T741.
I'm going to be busy with testing and work this week and I know you are busy as well, so no rush on an answer.

Syslog rewrite is now almost done, I currently testing everything, so I think if all goes well, I open a pull request next week for it. I'm still not sure how I should handle 'set system syslog user...', the help text states that it logs to the logged in user, but I didn't find anything implemented in the old perl script.

Hi Guys, @dmbaturin

during my test I found the follwing:

  1. vyatta-cfg-system creates /etc/rsyslog.d/vyatta-log.conf
  2. I removed the syslog stuff from vyatta-cfg-system, rebuild the package and updated, /etc/rsyslog.d/vyatta-log.conf was generated so it's not being removed.

Shall I take care of the removal in my vyos-1x script or in vyatta-cfg-system?

@syncer , @c-po
I can also check from the python script if /etc/rsyslog.d/vyatta-log.conf exists and if it does I remove it, since it's generated anyway.
That file is basically the last item (well and the user implementation) I have to work on.

merged by Daniil. Please assign bugs to me, if any come up. I tested everything multiple times carefully, but you never know, so I take full responsibility :0.