Skip to main content

SyslogForwardSection

Struct SyslogForwardSection 

Source
pub struct SyslogForwardSection {
    pub host: String,
    pub facility: u8,
    pub enterprise_number: u32,
}
Expand description

[audit.forward.syslog] section.

Example:

[audit.forward.syslog]
host = "siem.internal:514"
facility = 1            # 1 = user-level (default)
enterprise_number = 99999  # your own IANA PEN; defaults to the doc/test PEN

Fields§

§host: String

Receiver address (host:port). Mandatory.

§facility: u8

Syslog facility number (default 1 = user-level messages).

§enterprise_number: u32

IANA Private Enterprise Number used to build the syslog SD-ID (sysknife@<enterprise_number>, see RFC 5424 §7.2.2).

Defaults to DOCUMENTATION_PEN, RFC 5612’s reserved documentation/test PEN — see the warning comment on format_rfc5424 in sysknife-daemon::audit_forward. Operators forwarding into a regulated SIEM should set this to their own assigned PEN; see SyslogForwardSection::validate.

Implementations§

Source§

impl SyslogForwardSection

Source

pub fn validate(&self) -> Result<(), String>

Reject an enterprise_number of 0, which is not a valid IANA PEN (the registry’s enterprise-numbers file starts numbering at 1). Called at config-parse time, alongside any facility validation.

Every other u32 value is accepted: IANA PENs are allocated sequentially with no reserved upper gap, so any nonzero u32 is a syntactically valid PEN even if it has not actually been assigned to this operator.

Trait Implementations§

Source§

impl Debug for SyslogForwardSection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SyslogForwardSection

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.