Skip to content
Guides & References

EOS logging

Worked examples for the Arista EOS logging template: a remote syslog host in any VRF, and high-resolution log timestamps.

Policy LibraryUpdated
Platform
arista-eos
Minimum version
rConfig 8.0.0
Editions
Pro, Vector, Enterprise
On this page

EOS logging

Rules for logging: send logs off the switch, and stamp them precisely enough to line up events across devices. They come from the eos-logging policy template.

Every example on this page was checked with rConfig Pro's policy engine on

Each of the 4 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template.

All the rules come from eos-logging.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The Arista EOS templates page lists the file’s known limitations. Run the rules against show running-config.

Rule Method Since
Remote syslog host must_match_regex 8.0.0
High-resolution timestamps must_match_regex 8.0.0

Remote syslog host

Logs kept only on the switch are lost on a reload and can be wiped by an attacker. This rule needs at least one logging host line, with or without vrf <name>.

Definition
// A remote syslog host is configured (logging host, in any VRF)
#[must_match_regex]
/^logging (vrf \S+ )?host \S+/m
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
logging buffered 10000
logging trap informational
logging vrf MGMT host 192.0.2.20
logging vrf MGMT host 192.0.2.21
logging format timestamp high-resolution
logging vrf MGMT source-interface Management1

Why: Two syslog hosts are set in the MGMT VRF.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
logging buffered 10000
logging trap informational
logging vrf MGMT source-interface Management1

Why: There is no logging host line.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AU-2
HIPAA (45 CFR) 164.312(b)
ISO/IEC 27001:2022 Annex A A.8.15

Tested with: sample excerpts from EOS 4.32.2F (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


High-resolution timestamps

High-resolution timestamps add fractions of a second to each log line, so events from different devices can be put in order. This rule needs logging format timestamp high-resolution.

Definition
// Log timestamps use high resolution (logging format timestamp high-resolution)
#[must_match_regex]
/^logging format timestamp high-resolution\b/m
passPassing config: Hardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
logging buffered 10000
logging trap informational
logging vrf MGMT host 192.0.2.20
logging vrf MGMT host 192.0.2.21
logging format timestamp high-resolution
logging vrf MGMT source-interface Management1

Why: High-resolution timestamps are on.

failFailing config: Unhardened DCS-7280CR3 sample (EOS 4.32.2F, synthetic)
logging buffered 10000
logging trap informational
logging vrf MGMT source-interface Management1

Why: There is no logging format timestamp line, so timestamps use the default format.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AU-3
HIPAA (45 CFR) 164.312(b)
ISO/IEC 27001:2022 Annex A A.8.15

Tested with: sample excerpts from EOS 4.32.2F (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Type to search.