Project

General

Profile

Todo #9808

status_logs_settings.php: Add GUI option for syslog format

Added by Jim Pingle about 1 year ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Logging
Target version:
Start date:
10/03/2019
Due date:
% Done:

100%

Estimated time:

Description

On FreeBSD 12.x, syslogd now supports a choice for log format:

     -O format
             Select the output format of generated log messages.  The values
             bsd and rfc3164 are used to generate RFC 3164 log messages.  The
             values syslog and rfc5424 are used to generate RFC 5424 log
             messages, having RFC 3339 timestamps with microsecond precision.
             The default is to generate RFC 3164 log messages.

This would be useful to have on status_logs_settings.php, defaulting to the stated default value (rfc3164)

Associated revisions

Revision b16c3a12 (diff)
Added by Jim Pingle 11 months ago

Add option for RFC5424 syslog format. Implements #9808

Revision ef30c0a7 (diff)
Added by Jim Pingle 11 months ago

Move syslog format var to syslog.inc. Issue #9808

In some cases, PHP is unhappy with calls to gettext() in globals.inc

History

#1 Updated by Jim Pingle about 1 year ago

There is a bit more work involved as the log parsers will need updated to deal with the different format:

https://forum.netgate.com/post/868808

The time string format is RFC 3339 extended, which does have support in the PHP datetime code if we want to parse it and reformat vs displaying as-is: https://www.php.net/manual/en/class.datetimeinterface.php#datetime.constants.rfc3339_extended

#2 Updated by Russell Morris about 1 year ago

Hi,

I have RFC 5424 manually running here, to export to my syslog collector. And you're right, the local syslog is not displaying then. Is there a mod you want me to try? More than willing to work on it here also. Is there a particular PHP file you're referring to?

Thanks!

#3 Updated by Jim Pingle 11 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#4 Updated by Jim Pingle 10 months ago

  • Status changed from Feedback to Resolved

This option has been in and working for a while. No negative side effects that I can see other than #10155 which is being tracked separately.

Logs can be set to either format. Both display in the GUI even when there is a mix of formats in the same log file.

If further problems are discovered they can be tracked in their own separate issues.

Also available in: Atom PDF