Logs: what to collect, how to centralise them and how to use them

When an incident happens, logs are the system’s memory: they tell you who did what, when and from where. But you must have collected, protected and kept them. The NIST SP 800-92 guide to security log management gives a simple framework.

Technician in front of a network equipment rack
Illustration

What to collect first

  • Successful and failed sign-ins, especially on administrator accounts.
  • Changes to permissions, configuration and accounts.
  • Firewall and network device events.
  • Errors and access in business applications and the website.
  • Sensitive actions: deletion, data export, access outside normal hours.

Five principles to apply

  1. Centralise: one place where logs from all systems arrive, so they can be correlated.
  2. Synchronise clocks (NTP): without reliable time you cannot rebuild a timeline.
  3. Protect integrity: attackers often start by erasing their tracks; keep a copy out of reach of the monitored servers.
  4. Set the retention period according to your legal obligations and investigation needs, then document it.
  5. Review and alert: a log nobody reads is useless.

Alert without drowning the team

A few well-chosen rules beat hundreds of ignored alerts: bursts of failed sign-ins, a new administrator account, a sign-in from an unusual country, a critical service stopping. Tune thresholds as false positives appear.

Check that it works

Once a quarter, simulate a scenario (for example a suspicious administrator sign-in) and check that the event appears, an alert goes out and someone knows what to do.

An alert rule example

If ten failed sign-ins on an administrator account occur in under five minutes, followed by a successful sign-in from a never-seen address, trigger a high-priority alert: the scenario suggests a password guessed by repeated attempts. Expected response: lock the account, check the address, change the password and look for actions taken during the session.

Keeping logs that contain personal data is itself regulated: see our article on the obligations under the 2008 Senegalese law.

Frequently asked questions

How long should logs be kept?

There is no single duration: it depends on legal obligations, contracts and the need to reconstruct an incident. Set it in writing and keep the logs most useful to an investigation longer.

Do I need a SIEM?

Not necessarily at the start. Centralising critical logs in a tool, even an open-source one, and defining a few useful alerts already delivers the essentials. A full SIEM is justified when volume and teams demand it.

Do logs contain personal data?

Often yes: usernames, IP addresses. They therefore fall under data protection and must be secured.

What if nothing is monitored today?

Start with administrator sign-ins, the firewall and backups, then extend.

Log analysis and monitoring

Collect, centralise and watch your logs to catch problems before your customers do.

See the service