mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-01 21:33:02 +02:00
confd: add support for local syslog facilities
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -57,6 +57,8 @@ static const char *fxlate(const char *facility)
|
||||
|
||||
if (!strncmp(facility, "ietf-syslog:", 12))
|
||||
f = &facility[12];
|
||||
if (!strncmp(facility, "infix-syslog:", 13))
|
||||
f = &facility[13];
|
||||
|
||||
if (!strcmp(f, "all"))
|
||||
return "*";
|
||||
@@ -64,6 +66,12 @@ static const char *fxlate(const char *facility)
|
||||
return "security";
|
||||
if (!strcmp(f, "cron2"))
|
||||
return "cron_sol";
|
||||
if (!strcmp(f, "rauc"))
|
||||
return "local0";
|
||||
if (!strcmp(f, "container"))
|
||||
return "local1";
|
||||
if (!strcmp(f, "web"))
|
||||
return "local7";
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ MODULES=(
|
||||
# NOTE: ietf-tls-client must be version matched with ietf-tls-server, used by netopeer2!
|
||||
"ietf-tls-client@2023-12-28.yang" # used by ietf-syslog (remote)
|
||||
"ietf-syslog@2024-03-21.yang -e file-action -e file-limit-size -e remote-action"
|
||||
"infix-syslog@2024-07-16.yang"
|
||||
"infix-syslog@2024-07-18.yang"
|
||||
"iana-hardware@2018-03-13.yang"
|
||||
"ietf-hardware@2018-03-13.yang -e hardware-state"
|
||||
"infix-hardware@2024-04-25.yang"
|
||||
|
||||
+30
-15
@@ -14,22 +14,20 @@ module infix-syslog {
|
||||
|
||||
organization "KernelKit";
|
||||
contact "kernelkit@googlegroups.com";
|
||||
description "Infix augments and deviations to ietf-system.";
|
||||
description "Infix augments and deviations to ietf-syslog, draft 32.";
|
||||
|
||||
revision 2024-07-16 {
|
||||
description "Add support local facility names and log format selection.";
|
||||
reference "internal";
|
||||
}
|
||||
revision 2024-07-14 {
|
||||
description "Add support for remote server.";
|
||||
reference "internal";
|
||||
}
|
||||
revision 2024-07-13 {
|
||||
description "Support for global log rotation and drop defaults + unit.";
|
||||
reference "internal";
|
||||
}
|
||||
revision 2024-07-12 {
|
||||
description "Initial revision, tls transport disabled.";
|
||||
revision 2024-07-18 {
|
||||
description "Initial revision, based on IETF syslog YANG draft 32.
|
||||
The following changes have been made in this model:
|
||||
|
||||
- Add support for global file rotation settings
|
||||
- Add support for acting as a remote server
|
||||
- Add support for local facility names
|
||||
- Add support for log format selection per action
|
||||
- Disable TLS transport, not yet supported
|
||||
- Disable facility override, not yet supported
|
||||
- Removed 1 log file default
|
||||
- Replaced default 'megabytes' unit with 'kilobytes'";
|
||||
reference "internal";
|
||||
}
|
||||
|
||||
@@ -37,6 +35,23 @@ module infix-syslog {
|
||||
* Identities
|
||||
*/
|
||||
|
||||
identity rauc {
|
||||
base syslog:syslog-facility;
|
||||
description "Local facility for the RAUC firmware update subsystem, local0.";
|
||||
}
|
||||
|
||||
identity container {
|
||||
base syslog:syslog-facility;
|
||||
description "Local facility reserved for Docker containers, local1.";
|
||||
}
|
||||
|
||||
identity web {
|
||||
base syslog:syslog-facility;
|
||||
description "Local facility reserved for web server, local7.";
|
||||
}
|
||||
|
||||
// Log format
|
||||
|
||||
identity format-type {
|
||||
description "This identity is used as a base for all log formats.";
|
||||
reference "RFC 5424: The Syslog Protocol";
|
||||
Reference in New Issue
Block a user