Source#
Logging → SSources
A Source determines which log messages a node stores or sends to a Destination. It acts as a filter that selects messages based on the originating process, severity, content, or a combination of these criteria.
The deployment of a Source is driven by a Log, which determines the nodes that the Source will be configured on.
Severities#
Log messages can have different severities. The filter options described below can exclude messages that do not match a specified severity or messages below a specified severity.
The severities in the Source resource follow the severities as described in RFC 5424, which are listed below from more critical (top) to less critical (bottom):
- Emergency (level 0)
- Alert (level 1)
- Critical (level 2)
- Error (level 3)
- Warning (level 4)
- Notice (level 5)
- Informational (level 6)
- Debug (level 7)
OS-specific mappings#
Not every operating system uses these severity levels natively. An overview of severity mappings can be found below.
Severity operators follow these conventions:
Exactmatches the OS severity that corresponds to the specified syslog severity.Minimummatches the corresponding OS severity and all more critical OS severities.
Severity mapping per operating system
SR Linux follows the syslog naming conventions for severity levels.
| SR OS Severity | Syslog Level | Syslog Severity |
|---|---|---|
| critical | 0 | Emergency |
| critical | 1 | Alert |
| critical | 2 | Critical |
| major | 3 | Error |
| warning | 4 | Warning |
| minor | 5 | Notice |
| cleared / indeterminate | 6 | Informational |
| N/A | 7 | Debug |
Facilities#
On Linux-based operating systems, logging facilities distinguish messages from the underlying operating system from messages generated by routing processes.
Filtering by facility is not supported on SR OS.
Subsystems#
A log message is generated by a particular process, such as the AAA process for login events or BGP for BGP events. In EDA, these processes are called subsystems. Log messages can be sourced from a combination of subsystems, which may be named differently on different operating systems.
There are two ways of specifying which messages the Source will capture:
- By selecting generic subsystems, for which a translation to their OS-specific counterpart is determined by the
Sourceabstraction - By selecting OS-specific subsystems, exposing every subsystem available on that particular operating system
Generic subsystems#
The Source abstraction aims to match subsystems as defined in a particular operating system to a common, generic name. These generic subsystems are grouped in three categories:
- Security subsystems
- Operational subsystems
- Routing subsystems
For any particular operating system, a generic subsystem may translate to zero, one, or many subsystem names.
The GNXI operational subsystem
The GNXI subsystem is a generic subsystem that matches the following subsystem names:
- SR Linux:
gnmi,gnoi,gnpsi,gnsi,gribi,grpc - SR OS: there are no dedicated subsystems for programmable gRPC interfaces
In this example, selecting the generic GNXI subsystem in the operational category configures six subsystems on SR Linux nodes and none on SR OS nodes.
A user can select multiple generic subsystems.
Warning
If the selected subsystems do not translate into any subsystems on a particular operating system (for example, if none of the selected routing subsystems are supported on the node), the Source is not valid.
Exhaustive list of generic subsystem mappings#
List of generic EDA subsystems
AAALinuxTLS
AlarmCFLOWDChassisGNXILicenseLog
NETCONFNTPSFLOWSNMPTWAMP
ACLARPBFDBGPDHCPEVPNFIBFilterInterfaceISISLAG
LDPLLDPMirrorMPLSMulticastOSPFQoSStaticRouteSTPVXLAN
Generic subsystem mapping for SR Linux
| Generic subsystem | SR Linux applications |
|---|---|
AAA | aaa, accounting |
Linux | linux |
TLS | tls |
| Generic subsystem | SR Linux applications |
|---|---|
Alarm | alarm |
CFLOWD | cflowd |
Chassis | chassis |
GNXI | gnmi, gnoi, gnpsi, gnsi, gribi, grpc |
License | license |
Log | log |
NETCONF | netconf |
NTP | / |
SFLOW | sflow |
SNMP | / |
TWAMP | twamp |
| Generic subsystem | SR Linux applications |
|---|---|
ACL | acl |
ARP | arpnd |
BFD | bfd |
BGP | bgp |
DHCP | dhcp |
EVPN | evpn |
FIB | fib |
Filter | / |
Interface | / |
ISIS | isis |
LAG | lag |
LDP | / |
LLDP | lldp |
Mirror | mirror |
MPLS | mpls |
Multicast | igmp, mld, pim |
OSPF | ospf |
QoS | qos |
StaticRoute | staticroute |
STP | stp |
VXLAN | vxlan |
Generic subsystem mapping for SR OS
| Generic subsystem | SR OS applications |
|---|---|
AAA | security, radius, ldap |
Linux | / |
TLS | tls |
| Generic subsystem | SR OS applications |
|---|---|
Alarm | / |
CFLOWD | cflowd |
Chassis | chassis |
GNXI | / |
License | / |
Log | logger |
NETCONF | / |
NTP | ntp |
SFLOW | sflow |
SNMP | snmp |
TWAMP | / |
| Generic subsystem | SR OS applications |
|---|---|
ACL | / |
ARP | / |
BFD | bfd |
BGP | bgp |
DHCP | dhcp, dhcps |
EVPN | / |
FIB | / |
Filter | filter |
Interface | port |
ISIS | isis |
LAG | lag |
LDP | ldp |
LLDP | lldp |
Mirror | mirror |
MPLS | mpls, mpls-tp, sr-mpls |
Multicast | igmp, igmp-snooping, mld, mld-snooping, pim, pim-snooping |
OSPF | ospf |
QoS | / |
StaticRoute | / |
STP | stp |
VXLAN | / |
OS-specific subsystems#
Not all generic subsystems translate to a subsystem on every operating system. Similarly, not every subsystem on an operating system is linked to a generic subsystem.
Subsystem extensions allow the user to choose from all subsystems that are available on an operating system. This provides the greatest level of flexibility, but prevents the Source from being deployed across multiple operating systems.
Dependencies#
The Source resource does not have any dependencies.
Referenced resources#
The Source does not reference any other EDA resources.
Examples#
Custom Resource Definition#
To browse the Custom Resource Definition, go to crd.eda.dev.
Source
SPEC
SourceSpec defines the desired state of Source
-
Syslog facilities that messages will be sourced from. When left empty, every facility is matched.
-
Facility selects logs by syslog-style facility for a given operating system and severity comparison.
-
Facility name or identifier used when matching log records for this operating system.
default: "All"enum: "All", "Kernel", "User", +22 more -
Severity level used together with the severity operator when evaluating log records for this facility.
enum: "Debug", "Informational", "Notice", +5 more -
How log record severity is compared to the configured Severity for this facility (at or above the level, or exactly that level).
enum: "Minimum", "Exact"
-
-
-
Optional message filtering: evaluate log message text against filter rules and allow or deny forwarding based on the match mode.
-
Whether log messages that match the filter rules are forwarded or blocked.
default: "Allow"enum: "Allow", "Deny" -
Filter rules applied to log message text. If the message matches at least one rule, it is forwarded or blocked according to the match mode.
-
-
Which subsystems to include in the log records. If no subsystems are selected, all subsystems will be included.
-
Operational subsystems.
-
Routing-related subsystems.
-
Security-related subsystems.
-
Severity level to filter on.
enum: "Debug", "Informational", "Notice", +5 more -
Operator to determine which severity levels to filter on.
enum: "Minimum", "Exact"
STATUS
SourceStatus defines the observed state of Source