Skip to content

Latest commit

 

History

History
239 lines (171 loc) · 5.71 KB

36-best_worst_practices.md

File metadata and controls

239 lines (171 loc) · 5.71 KB
SPDX-FileCopyrightText SPDX-License-Identifier title author footer description keywords color class style
© 2024 Menacit AB <[email protected]>
CC-BY-SA-4.0
Logging course: Best and worst practices
Joel Rangsmo <[email protected]>
© Course authors (CC BY-SA 4.0)
Description of some best and worst logging practices
logging
siem
course
#ffffff
invert
section.center { text-align: center; } table strong { color: #d63030; } table em { color: #2ce172; }

Best (and worst) practices

More or less painful lessons

bg right:30%


There's lots more to learn about successfully implementing logging.

The following (opinionated) slides cover some of these lessons.

bg right:30%


Setup retention/rotation

No one (but the NSA) can afford to store logs forever.

Before ingesting a new log source, make sure to check and communicate retention requirements/policy.

Backup log data whenever required, but be aware of the cost.

bg right:30%


Retention in OpenSearch

Backups are provided by the "Scheduled snapshots" feature.

While possible to delete specific documents (log events) in OpenSearch, the most straight forward way is to rotate (delete) whole indicies.

Don't store log events with different retention requirements in the same index.

Retention/Rotation/Storage tier migration is handled by "State management policies".

bg right:30%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


bg center 100%


Tagging log types

Grouping log sources commonly searched together.

Spend the time before everything is burning during an incident.

In OpenSearch, we can utilize "index patterns" (sometimes) or "index aliases".

bg right:30%


bg center 100%


bg center 100%


bg center 100%


Monitoring ingestion

bg right:30%


Documenting known unknowns

bg right:30%


Working with Sigma

bg right:30%


Schedule alert-review

bg right:30%


Source/Query cost analysis

bg right:30%


Make it a procurement requirement

bg right:30%


Including logging in SDLC

bg right:30%


Sell it as BI!

bg right:30%


UTC is your friend

bg right:30%


While just scratching the surface, I hope these topics gave you some insights!

bg right:30%