Which logs to keep, retention tiers that beat 30 days, stopping attackers deleting evidence, and the PDPL tension with long security retention.
By Blue Edge Team | Published Sep 08, 2026 | Updated Oct 03, 2026 | 13 min read
Security logging is the practice of recording events relevant to detecting and investigating security incidents, and retention is how long those records are kept. Thirty days is the most common retention period and the most common mistake, because intrusions frequently go undetected for longer than that, so the initial compromise has already aged out before anyone starts investigating.
The moment that exposes a logging programme is the third day of an incident response. The team knows a service account was misused on Tuesday. They need to know how the attacker obtained it, which means going back to whenever that account was first touched.
That is when someone checks the retention setting and finds ninety days of firewall logs, thirty days of authentication logs, and nothing at all from the application. The investigation stops, not because the evidence never existed, but because it was deleted on a schedule nobody revisited after it was configured.
This guide covers which logs matter most, what should never be written to a log at all, how long each source should be kept and why the answer is tiered rather than uniform, how to stop an attacker deleting the evidence, and how Saudi organisations reconcile long security retention with data protection obligations.
Security logging is the practice of recording events across systems that are relevant to detecting, investigating and evidencing security incidents. Retention is how long those records are kept. Monitoring is whether anything examines them.
The three are separate, and organisations frequently have one without the others. A server writing detailed authentication events to a local file is logging. If nobody collects that file and it rolls over every week, there is no retention. If nothing evaluates the events, there is no monitoring. All three are needed for the investment to produce anything.
The distinction between log management and a security information and event management platform follows the same line. Log management collects, stores and searches. A SIEM adds correlation, detection rules and alerting on top. Both are useful, and the order matters: correlation across the wrong log sources produces less value than plain searchable storage of the right ones. Get collection and retention right before spending on correlation. The same principle applies as in network monitoring, where visibility precedes automation.
Collect in order of detection value rather than ease of collection. The list below is roughly the priority order for a business with limited budget and limited ingest capacity.
Authentication events. Successful and failed logins, multi-factor challenges and results, password changes and account lockouts. Log successes as well as failures, because an attacker using stolen credentials produces a successful login, not a failed one. A log of failures alone records the attempts that did not work.
Privilege and permission changes. New administrator accounts, group membership changes, role assignments and permission grants. This is the highest-value category for detecting an attacker establishing persistence, and it is usually low volume, which makes it cheap to keep for a long time.
Account lifecycle events. Creation, deletion, enabling and disabling of accounts, particularly service accounts.
Security control changes. Firewall rule modifications, security policy edits, endpoint agent removal and, critically, any event indicating that logging itself was disabled or cleared.
Cloud control plane activity. API calls, resource creation and deletion, identity and access management changes, and access to key management services.
Network events. Firewall allow and deny decisions, VPN session establishment, and DNS queries. DNS is frequently overlooked and is among the most useful sources for identifying command and control activity.
Endpoint telemetry. Process execution, script interpreter activity and persistence mechanism creation.
Email events. Message trace, blocked deliveries and, in particular, mailbox rule creation. Attackers who compromise a mailbox routinely create forwarding or deletion rules to hide their activity, which is a well-established step in business email compromise.
Sensitive data access. Reads of personal or financial records, bulk exports and unusual query volumes against databases holding regulated data.
One requirement underpins all of them. Every system must have accurate, synchronised time from a common source using the Network Time Protocol, recorded with an explicit time zone or in coordinated universal time. Logs from unsynchronised systems cannot be correlated into a reliable timeline, and a few minutes of clock drift across servers is enough to make the sequence of an attack unprovable.
Logs are a data store, and verbose logging quietly creates a second copy of exactly the information the primary systems were built to protect.
Never write the following into a log:
That last point causes most real exposures. Debug logging that captures entire HTTP request bodies will record login submissions, personal data entered into forms and any credential passed in a header. Debug settings enabled during troubleshooting and never turned off are a recurring finding, and they connect directly to secrets management practice: a credential written to a log is exposed exactly as if it were hardcoded, and needs the same rotation response.
The practical control is filtering at capture rather than redaction after the fact. Once the data reaches the log platform it has been replicated to storage, indexes and backups, and removing it from all of them is considerably harder than never writing it.
Log access deserves the same treatment as access to the systems being logged. If a support engineer can read the logs and the logs contain customer personal data, that engineer has access to customer personal data regardless of what their permissions on the application say.

Retention is really three separate questions that get collapsed into one. The detection window is how long before you would notice something. The investigation window is how far back you need to go once you do, which must comfortably exceed the detection window. The regulatory window is what a regulator or contract requires, and it is often longer than either.
The table below gives working retention figures by source. Hot means immediately searchable. Total includes archived storage that can be restored when needed.
| Log source | Primary detection value | Hot, searchable | Total retention |
|---|---|---|---|
| Authentication events | Credential abuse, brute force, impossible travel | 90 days | 12 months or more |
| Privilege and permission changes | Attacker persistence, insider misuse | 90 days | 12 to 24 months |
| Cloud control plane activity | Resource abuse, IAM tampering, key access | 90 days | 12 months or more |
| Firewall and VPN logs | Lateral movement, unusual remote access | 90 days | 6 to 12 months |
| DNS query logs | Command and control, data exfiltration channels | 30 to 90 days | 6 months |
| Endpoint process telemetry | Malware execution, script abuse | 30 days | 6 months |
| Email trace and mailbox rules | Business email compromise, hidden forwarding | 90 days | 12 months |
| Sensitive data access | Bulk export, unusual query volume | 90 days | 12 months or as regulation requires |
| Application error logs | Exploitation attempts, misconfiguration | 30 days | 90 days |
| CCTV and video | Physical incidents, facility investigations | Per facility classification | Commonly 90 days minimum in KSA |
Thirty days is the most common retention setting and it is shorter than the period intrusions routinely go undetected, which means the evidence of the initial compromise is deleted before anyone knows to look for it. The answer to the cost problem is tiering rather than shortening. Keep the last ninety days immediately searchable, push older data into cheaper archive storage that can be restored during an investigation, and keep low-volume high-value sources such as privilege changes for far longer than everything else because they cost almost nothing to store.
Reduce volume by filtering at the source rather than at ingest, since most platforms charge for what arrives. Dropping routine informational events at the collector is far cheaper than paying to store them and then excluding them from every search.
Clearing logs is a standard step for an intruder who intends to stay, so a log that only exists on the compromised host is not evidence.
Four controls address it:
Forward off the host immediately. Ship events to a central platform in near real time, so clearing a local log removes the copy the attacker can reach but not the one that matters. The gap between the event and the forward is your exposure, and it should be seconds.
Detect log clearing as an event in its own right. On Windows systems, event ID 1102 records that the security audit log was cleared, and equivalent events exist for audit daemon tampering on Linux. Almost nothing legitimate generates these on a production server, which makes them high-confidence alerts rather than noise.
Separate log storage from the administrators of the logged systems. If the same account that administers the servers can also delete the log archive, the logs protect nothing against an attacker who obtains that account. Use distinct credentials and, where the platform supports it, write-once or immutable retention that cannot be shortened or purged within its configured period.
Preserve chain of custody for anything that may become evidence. Record who exported what and when, hash the exported files, and store them separately. This matters when an incident becomes a legal or regulatory matter, and it is far easier to establish beforehand than to reconstruct afterwards. Fold it into the data breach response plan rather than improvising during an incident.
A practical test is worth running. Ask whether an attacker holding your most privileged account could delete or alter the log archive. If the answer is yes, the retention policy describes an intention rather than a control.

Three considerations shape logging and retention for organisations in the Kingdom, and the first is a genuine tension rather than a checklist item.
Security retention and data protection pull in opposite directions. Logs containing usernames, IP addresses, device identifiers and records of individual activity are personal data, so retaining them is processing under the Personal Data Protection Law (PDPL) administered by the Saudi Data and Artificial Intelligence Authority. Data protection principles push toward collecting less and keeping it for shorter periods. Security practice pushes toward collecting more and keeping it longer. Both positions are correct, and the reconciliation is documentation rather than compromise.
Four steps resolve it in practice. Establish and record the basis on which security logs are retained, and treat security and fraud prevention as the stated purpose rather than leaving it unexamined. Define a retention period per log source with a written justification, instead of an open-ended policy of keeping everything indefinitely. Minimise personal data at capture using the filtering described earlier, so the archive contains what an investigation needs and not the contents of every form submission. And restrict access to the log platform to the people who genuinely require it, since broad read access to logs is broad access to personal data.
Regulatory frameworks expect event logging and monitoring. The National Cybersecurity Authority's Essential Cybersecurity Controls (ECC) include cybersecurity event logs and monitoring management among their control domains, covering collection, protection and review of logs. Financial institutions carry the additional obligations of the SAMA Cybersecurity Framework. Separately, video retention for covered facilities is set by the Implementing Regulation of the Law of the Use of Security Surveillance Cameras administered by the Ministry of Interior, with a 90-day minimum commonly cited in the Saudi market and the applicable period depending on facility classification.
Where logs are stored is a residency question. A cloud SIEM holds a searchable record of your organisation's activity, including personal data of employees and customers. If that platform stores and indexes data outside Saudi Arabia, it is a cross-border transfer and belongs in the same assessment as any other. Confirm the storage region contractually, ask whether an in-Kingdom region is available, and establish who at the provider can access the data. For regulated workloads this frequently makes an in-Kingdom or self-hosted platform the simpler position.
Blue Edge, a technology distributor based in Dammam, Saudi Arabia, distributes NinjaOne endpoint and patch management and KnowBe4 security awareness training, which generate endpoint and human-risk telemetry alongside the infrastructure logs described here.

Six mistakes account for most logging programmes that fail when they are needed.
No time synchronisation. Logs from servers with drifting clocks cannot be correlated into a reliable timeline, which makes the sequence of an attack unprovable no matter how complete the collection.
Logging failures but not successes. An attacker using valid stolen credentials generates a successful login. A log recording only failures captures the attempts that did not work.
Thirty-day retention across the board. It is shorter than the period intrusions commonly go unnoticed, so the evidence of the initial compromise is gone before the investigation starts.
Logs deletable by the same account that administers the systems. An attacker with that account removes the record of everything they did.
Verbose application logging capturing personal data and credentials. Debug settings enabled during troubleshooting and never disabled turn the log platform into an unclassified store of regulated data.
Collecting without reviewing. Collection is not monitoring. Logs nobody examines and no rule evaluates provide evidence after an incident and no chance of catching one during it.

The most useful change most organisations can make to their logging is not buying a bigger platform. It is looking at the retention setting on each source individually rather than applying one number to everything.
Privilege changes, account creation and administrative activity are low volume and extremely high value, so they can be kept for a year or two at negligible cost. Endpoint process telemetry is enormous and its value decays quickly, so a shorter hot window with archive behind it is the sensible position. A single uniform retention period gets both of those wrong at once.
Then fix the two things that make logs worthless regardless of how long they are kept. Synchronise time across every system from a common source. And make sure the log archive cannot be deleted by the account an attacker is most likely to obtain.
Finally, write down what each source is kept for and why. That document answers the security question and the data protection question at the same time, and it is the difference between a retention policy and a storage setting nobody has revisited since installation.
Logging is recording events, retention is keeping those records for a defined period, and monitoring is having something evaluate them. Organisations frequently have one without the others, such as a server writing detailed events to a local file that nobody collects and nothing examines. Logging without monitoring provides evidence after an incident but no chance of detecting one while it is happening.
Log both. An attacker using stolen credentials produces a successful authentication event, not a failed one, so a log of failures alone records only the attempts that did not work. Successful logins also provide the baseline needed to identify unusual access, such as a service account signing in from an unexpected location or an administrator authenticating outside normal hours.
Because intrusions frequently go undetected for longer than 30 days. By the time an organisation identifies suspicious activity, the events showing how the attacker first obtained access have already been deleted, so the investigation cannot reach the origin. Keep 90 days immediately searchable, archive older data to cheaper storage that can be restored, and retain low-volume high-value sources such as privilege changes for a year or more.
Forward events off the host to a central platform in near real time, so clearing a local log does not remove the copy that matters. Alert on log clearing itself, since Windows event ID 1102 and equivalent audit tampering events are almost never legitimate on a production server. Store logs where the administrators of the logged systems cannot delete them, using separate credentials and immutable retention where available.
Because correlating events across systems requires that their timestamps agree. A few minutes of clock drift between a firewall, a domain controller and an application server is enough to make the order of events unclear, which undermines both the investigation and any use of the logs as evidence. Synchronise every system from a common Network Time Protocol source and record timestamps with an explicit time zone or in coordinated universal time.
Blue Edge works with organisations across Saudi Arabia on endpoint management, patching and security awareness.
Call +966 53 9855 188 or contact our team to discuss your requirements.
NinjaOne in Saudi ArabiaBlue Edge Company is a value-added technology distributor based in Dammam, Saudi Arabia, supplying interactive displays, smart building systems, networking infrastructure and IT security software to businesses and residential projects across the Kingdom, with installation and technical support.
Learn more about Blue Edge →Published 8 September 2026 • Last updated 3 October 2026 • This article is reviewed when standards, regulations or product guidance change.