Definition: Security logging means recording security-relevant events in IT systems, such as logins, permission changes or access to sensitive data. Security monitoring means reviewing these records all the time and raising an alarm when something looks odd. Together, they make sure attacks can be detected and investigated.
What is Security Logging and Monitoring?
Every IT system creates records, known as logs. They capture who did what and when. For security, only certain events matter. Security logging picks these out, collects them centrally and protects them against tampering.
But logs alone help little if no one reads them. This is where security monitoring comes in. It checks the logs all the time for patterns that point to an attack. If it spots something, it alerts the people in charge.
Logging and Monitoring: The Difference
- Logging is recording. It answers the question: what happened?
- Monitoring is watching. It answers the question: is something odd happening right now?
- Alerting is reporting. It makes sure a person reacts.
An example: a server logs every failed login. That is logging. A rule notices 500 failed attempts in one minute for the same account. That is monitoring. The security team gets a message and locks the account. That is alerting with a response.
In IT operations, "monitoring" often also means watching availability and performance, such as the load on a server. Security monitoring, by contrast, focuses on attacks and misuse.
Which Events Should Be Logged?
- Logins: successful and failed logins, especially for admins and remote access.
- Accounts and rights: new accounts, changed groups, granted admin rights.
- Access to sensitive data: who accessed confidential files or databases, and when.
- Configuration changes: on servers, firewalls and cloud services.
- Network: firewall, VPN, proxy and DNS logs.
- Devices: alerts from antivirus or EDR, programs started on critical systems.
- Applications: security-relevant events in your own applications, such as denied access.
Not in the log: passwords, session tokens, full card numbers and other secrets. Otherwise the log itself becomes a target.
How Security Logging and Monitoring Works
- Define sources: Which systems deliver security-relevant logs?
- Sync the clocks: All systems use the same time. Only then can events from different sources be matched.
- Collect centrally: Logs flow into one central system. Read more under log management.
- Protect: Logs are stored so that attackers cannot delete or change them. Their integrity must be ensured.
- Review: A SIEM links events and spots patterns based on set rules.
- Alert and respond: Alerts go to a team with clear roles, such as a security operations center. For serious cases, the incident response plan applies.
- Keep and delete: Set retention periods per log type and stick to them.
Why Security Logging and Monitoring Matter
- Detect attacks early: Many attacks leave traces in the logs long before damage is done.
- Investigate incidents: After an attack, the logs show how the attacker got in and what they did. Without logs, this often stays unclear.
- Meet obligations: Standards and laws require logging and monitoring (see below).
- Improve operations: Logs also reveal errors and bottlenecks in IT.
The OWASP Top 10:2025 also shows how important the topic is. It lists "Security Logging and Alerting Failures" as its own category, A09. Read more under OWASP Top 10.
Requirements from Standards and Laws
- ISO 27001: Annex A of the 2022 edition has its own controls for logging (A 8.15) and for monitoring activities (A 8.16). See ISO 27001.
- NIS-2: Companies in scope must detect, handle and report security incidents on time. This is hardly possible without logging and monitoring. See NIS-2.
- GDPR: Logs often contain personal data. Purpose, access and deletion periods must be set out. See GDPR.
- Co-determination: In Germany, where there is a works council, it has a say in the technical monitoring of staff. Involve it early.
Common Mistakes
- Collecting everything, reviewing nothing: Large amounts of data without rules and owners bring no security.
- Too many alerts: If you keep getting unimportant messages, you miss the important ones. Rules need regular tuning.
- Gaps in sources: Cloud services or remote access are missing from logging.
- Unprotected logs: Attackers wipe their tracks if the logs sit on the same system and are not secured.
- No tests: Whether an alert really fires only shows in a test, for example an attack simulation.
Conclusion
Security logging records what happens in your systems. Security monitoring makes sure someone reacts when something is wrong. The two belong together. If you capture the key sources, protect your logs and link alerts to clear owners, you detect attacks early and can investigate them properly later.
FAQ about Security Logging & Monitoring
What is the difference between logging and monitoring?
Logging records events, for example every login. Monitoring reviews these records all the time and raises an alarm when something looks odd. Logging is the basis, monitoring turns it into detection.
How long should you keep logs?
There is no single deadline. The period depends on the purpose, legal rules and data protection. Set the periods per log type and document them. To investigate attacks, logs should go back far enough, because many attacks are only found after weeks.
What is a SIEM?
A SIEM (security information and event management) collects logs from many sources in one place. It links events together and creates alerts based on set rules. This reveals patterns that would not show up in a single log.
May you store logs with staff data?
Yes, if there is a clear purpose such as IT security and data protection is respected. Logs often contain personal data. Access, purpose and deletion periods must therefore be set out. In Germany, where there is a works council, it has a say in technical monitoring.
What does not belong in a log?
Passwords, session tokens, full card numbers and other secrets never belong in a log. Otherwise the log itself becomes a target. Other personal data should also only be recorded as far as needed.
Which logs should you start with?
With logins and permission changes in Active Directory and cloud services, with firewall and VPN logs, and with alerts from antivirus or EDR. These sources reveal most attacks early.
More terms in “Endpoint & Monitoring”
- Backup
- Endpoint Detection & Response (EDR)
- Endpoint Security
- Extended Detection & Response (XDR)
- Log Management
- Patch Management
- Security Operations Center (SOC)
- SIEM
- SIEM Optimization