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>.
// A remote syslog host is configured (logging host, in any VRF)#[must_match_regex]/^logging (vrf \S+ )?host \S+/mlogging buffered 10000logging trap informationallogging vrf MGMT host 192.0.2.20logging vrf MGMT host 192.0.2.21logging format timestamp high-resolutionlogging vrf MGMT source-interface Management1Why: Two syslog hosts are set in the MGMT VRF.
logging buffered 10000logging trap informationallogging vrf MGMT source-interface Management1Why: There is no logging host line.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
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.
// Log timestamps use high resolution (logging format timestamp high-resolution)#[must_match_regex]/^logging format timestamp high-resolution\b/mlogging buffered 10000logging trap informationallogging vrf MGMT host 192.0.2.20logging vrf MGMT host 192.0.2.21logging format timestamp high-resolutionlogging vrf MGMT source-interface Management1Why: High-resolution timestamps are on.
logging buffered 10000logging trap informationallogging vrf MGMT source-interface Management1Why: 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:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
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.
Related reference
- Arista EOS policy templates: every rule in
eos-logging.policy, its references and known limitations. - Policy Definitions: the definition file format and every method.
- Policy Assignments: run a definition against your devices.
- Policy Compliance Results: read the pass and fail results.