Join our Newsletter — 33% off our NHI Course
Home› Guides› Mainframe SMF Security Monitoring: Record Selection, Forwarding and…
Guide SOC & Detection Engineering

Mainframe SMF Security Monitoring: Record Selection, Forwarding and SIEM Detections

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

Most security operations centres can see every Windows logon in the estate and almost nothing that happens on the z/OS systems that run payments, policies and payroll. The data exists: System Management Facilities (SMF) records every RACF decision, job start, TCP/IP connection and Db2 audit event. What is missing is a pipeline that selects the right record types, gets them off the mainframe in near real time, parses binary records into fields a SIEM can query, and turns them into detections an analyst who has never used ISPF can triage. This guide is for detection engineers and SOC leads building that pipeline with mainframe systems programmers. It covers record selection, SMFPRMxx and log stream design, the real-time interface, parsing and field mapping, starter detections and how to measure the feed. Platforms and products are named only to explain the data path. For evidence handling during an incident, see the Mainframe Incident Response and Forensics Guide; for RACF configuration, see the Mainframe Identity and RACF Security Guide.

Key takeaways

  • Select by question, not by volume. Type 80 (RACF), type 30 (jobs and address spaces), type 119 (TCP/IP, FTP, TN3270) and type 102 (Db2 audit) answer most SOC questions; data set and catalog records are high volume and best forwarded with filters.
  • Log streams first, then real time. The SMF real-time interface needs SMF in log stream recording mode; in-memory resources named on INMEM are protected by FACILITY profiles of the form IFA.IFASMF.name.
  • Parse on or near the platform. SMF records are binary with self-defining sections; ship parsed, named fields (user, event, qualifier, resource, source IP) rather than raw hex.
  • Start with ten detections the SOC can triage. Privileged RACF commands, SETROPTS changes, logon failure bursts, FTP from new addresses, Db2 grants and audit trace stops cover the highest-value behaviours.
  • Monitor the feed as a detection. A silent mainframe source looks exactly like a quiet mainframe; alert on gaps per system and record type.

Why SMF is different from other log sources

  • Format: SMF records are binary, with a standard header, a record type and subtype, and triplets (offset, length, count) pointing to sections. They are not text lines a syslog collector can read.
  • Volume and cost: a busy LPAR writes millions of records a day, most of them performance and accounting data. Forwarding everything can cost more in SIEM ingestion than the mainframe security budget.
  • Configuration ownership: SMF recording is set in the SMFPRMxx parmlib member and changed with SET SMF=xx by systems programmers. Security teams usually do not own it and need a change process.
  • What gets audited depends on RACF: type 80 content depends on RACF audit options (SETROPTS AUDIT, LOGOPTIONS, UAUDIT and profile AUDIT settings). If RACF is not told to log an event, no SIEM can find it.
  • Identity semantics: user IDs are eight characters, many are started tasks and batch IDs, and surrogate and OMVS UIDs complicate attribution. See the Mainframe Service Accounts and Batch Job Identity Guide.

Record selection: what to forward and why

Record typeSourceSecurity valueForwarding advice
80RACFLogons and job initiation (event 1 JOBINIT), resource access (2 ACCESS), user and group changes (10 ADDUSER, 13 ALTUSER, 14 CONNECT, 17 DELUSER), PERMIT (19), RDEFINE and RALTER (21, 20), SETROPTS (24), RVARY (25), z/OS UNIX events, RACDCERT (66)Forward all, real time. This is the core identity feed.
81, 83RACF81: RACF initialisation at IPL; 83: security label changes and other security events including R_auditx and LDAP subtypesForward all; low volume.
30z/OSJob, step and address space start and end, program name, submitterForward subtypes for job start and end; filter interval records.
119Communications ServerTCP connection initiation (1) and termination (2), TN3270E session initiation and termination (20, 21), FTP server transfer completion (70), FTP server logon failure (72), FTP server session (104), IPSec tunnel events (73 to 80), VTAM 3270 IDS events (81), OpenSSH (94 to 98)Forward subtypes 1, 2, 20, 21, 70, 72, 104 and 81; others on demand.
102Db2 for z/OSAudit trace: authorisation failures, grants and revokes, use of SYSADM and DBADM authority, trusted context useForward audit IFCIDs only, not performance traces.
90z/OSSystem changes such as SET commands and dynamic changes to system listsForward all; low volume, high value for persistence.
14, 15, 17, 18DFSMSData set read, update, scratch and renameFilter to sensitive data set prefixes or forward to cheaper storage.
110CICSTransaction monitoring and statisticsUsually not needed for SOC detections; use for investigations.

Type 80 event names and numbers come from the RACF auditable event table (89 codes as published). The event code qualifier field (SMF80EVQ) carries the outcome, such as success or the reason for a failure, so parse it rather than inferring success from the event code alone.

Pipeline architecture: from SMFPRMxx to the SIEM

Recording configuration

  • Log stream recording: record SMF to log streams rather than SYS1.MANx data sets. Log streams allow routing record types to different streams with LSNAME and DEFAULTLSNAME, and record signing (RECSIGN) applies to records written to log streams.
  • In-memory resources: add an INMEM parameter per in-memory resource, with a name of the form IFASMF.rname, the RESSIZMAX size and the TYPE list. Record types named on INMEM are not written to the DEFAULTLSNAME stream, so to keep a durable copy list the type on both INMEM and an LSNAME.
  • Access control: each in-memory resource is protected by a FACILITY class profile IFA.IFASMF.rname, with READ access for the collector's user ID. If that SAF check fails when SET SMF=xx is issued, SMF rejects the whole SMFPRMxx member, so test in a lower environment first.

Collection

The SMF real-time interface lets a collector query available resources (IFAMQRY), connect (IFAMCON), read records in a loop as they are written (IFAMGET) and disconnect (IFAMDSC). Commercial and IBM collectors use this interface or read log streams directly, parse the records, and send them over TCP or TLS to the SIEM or a streaming platform. Batch alternatives, such as nightly IFASMFDP dumps transferred by FTP, leave up to a day of activity unseen and should be a fallback only.

ApproachLatencyMainframe costWhen to use
Real-time interface with on-platform parsingSecondsCollector address space CPU, partly offloadable to zIIP depending on productProduction LPARs with RACF, TCP/IP and Db2 feeds
Log stream reader with off-platform parsingSeconds to minutesLower on-platform CPU; parsing load moves to distributed serversWhere mainframe CPU is tightly constrained
Scheduled dump and transferHoursLow; batch jobDevelopment LPARs, compliance archives, recovery when the real-time feed fails

Transport and the collector identity

The collector is a non-human identity with READ to every security event on the system. Give it a dedicated protected user ID (no password, started task or batch only), READ only on the IFA profiles it needs, and TLS with certificate authentication to the receiving endpoint, using AT-TLS policy where the product supports it. Alert on any change to its RACF profile, and keep its certificate and keyring under the same rotation process as other machine credentials.

Parsing and field mapping

Normalise SMF fields to the SIEM's common schema so mainframe events join identity, VPN and endpoint data. Map at least these fields:

Common fieldType 80Type 119Type 30
Timestamp and systemHeader time and date, system IDHeader time and date, system IDHeader time and date, system ID
UserUser ID, group, and for commands the target user or profileLogged-on user for FTP and TN3270 recordsJob owner user ID
Action and outcomeEvent code (SMF80EVT) and qualifier (SMF80EVQ)Subtype; FTP reply codesSubtype; completion code
ObjectResource or data set name, class, access level requested and allowedFile name, bytes transferredJob name, step, program
NetworkTerminal or port of entry where presentLocal and remote IP and portNot applicable
  • Enrich user IDs: join RACF user IDs to the HR or identity directory and tag started task, batch and human IDs. Without this, analysts cannot tell a scheduler ID from a person.
  • Preserve raw: keep the original record or a hash of it in cold storage for investigations, alongside signature records if record signing is on.
  • Decode once: keep the mapping of event codes and qualifiers in a lookup table owned by the detection team, versioned with z/OS releases.

Starter detections

These rules are behaviour descriptions to implement in your SIEM's query language. Tune thresholds on 30 days of baseline.

DetectionLogicATT&CK
Privileged attribute grantedType 80 ALTUSER (13) or ADDUSER (10) adding SPECIAL, OPERATIONS or AUDITOR, outside an approved changeT1098
New user created by an unusual administratorType 80 ADDUSER (10) by an ID that has not created users in the baseline periodT1136
Security options changedAny type 80 SETROPTS (24), especially audit or password rule changesT1685
Access granted to sensitive resourcesType 80 PERMIT (19) or RALTER (20) on APF libraries, parmlib, RACF database data sets or FACILITY profiles such as IFA.*T1098
Logon failure burstType 80 JOBINIT (1) failures for one user or one source above threshold; type 119 subtype 72 FTP logon failuresT1110
Revoked or dormant ID usedSuccessful JOBINIT for an ID with no activity for 90 days, or after an HR leaver dateT1078
FTP transfer to a new destinationType 119 subtype 70 to a remote IP not seen in the baseline, or with byte counts far above the user's normT1048
Db2 privilege changeType 102 audit records for GRANT of SYSADM, DBADM or SECADM, or grants on audited tablesT1098
Audit trace stoppedDb2 audit trace stop, RACF audit options reduced, or SMF recording changes in type 90T1685
Mass data set updates by one jobType 15 updates across many data sets from one job in a short windowT1486

For each rule, document the RACF or Db2 setting it depends on. A SETROPTS detection is useless if command auditing is off, and a Db2 grant rule fails silently if the SECMAINT audit category is not active in an audit policy. Db2 audit policies are rows in SYSIBM.SYSAUDITPOLICIES with categories including CHECKING, VALIDATE, OBJMAINT, EXECUTE, CONTEXT, SECMAINT, SYSADMIN and DBADMIN, started with START TRACE using the AUDTPLCY option; policies can be defined to start at Db2 startup, and secure or tamper-proof policies resist being stopped by the administrators being audited. See IBM Db2 Security.

Implementation: phased rollout

  1. Agree scope (weeks 1 to 2): SOC, mainframe security and systems programming agree the questions the SOC must answer, the LPARs in scope and an ingestion budget.
  2. Check audit settings (weeks 2 to 4): review RACF audit options and Db2 audit policies against the detection list. Raise changes through normal change control.
  3. Pilot one LPAR (weeks 4 to 8): enable log stream recording and an INMEM resource on a development or test LPAR, define the IFA profile, run the collector, and validate parsing against known test actions (create a test user, change a test profile, run an FTP transfer).
  4. Production rollout by ring: one production LPAR, then the rest of the sysplex. Monitor collector CPU and SMF buffer warnings at each step.
  5. Detections in audit mode: run starter rules as dashboards for two to four weeks, tune, then promote to alerts with runbooks that name the mainframe on-call contact.
  6. Rollback: keep the previous SMFPRMxx member; reverting is a SET SMF=xx to the old member. Because a failed SAF check rejects the new member, validate profiles before activation.

Decision guidance

  • Everything vs selected types: forward selected types and subtypes in real time to the SIEM, and everything else to a cheaper data lake or archive for investigations.
  • Parse on-platform vs off-platform: on-platform parsing simplifies the SIEM side and reduces bytes on the wire; off-platform parsing saves mainframe CPU. Many sites parse type 80 and 119 on-platform and send bulk types raw to the lake.
  • Small estates: one or two LPARs can start with a single collector and the ten detections above. Large sysplexes need per-LPAR collectors, a feed health dashboard and a shared lookup of user ID types.
  • SIEM vs dedicated mainframe tooling: dedicated tools give deep RACF context; a SIEM gives correlation with the rest of the estate. The SOC needs at least the identity and network events in the SIEM either way.

Detection and measurement

  • Feed latency: median time from SMF record write to SIEM index for type 80 (target under one minute).
  • Feed gaps: intervals with no type 80 records from a production LPAR; alert at a threshold that reflects normal activity.
  • Coverage: percentage of production LPARs and Db2 subsystems feeding the SIEM.
  • Parse error rate: records that fail to parse, by type, after z/OS or product upgrades.
  • Time to alert on privileged change: from a test ALTUSER SPECIAL to an alert in the SOC queue.
  • Ingestion cost per LPAR: tracked monthly to keep filtering decisions honest.

Treat the feed itself as a monitored source. See Log Source Health Monitoring and the Log Source Coverage Matrix Template.

Framework mapping

Pipeline areaNIST CSF 2.0NIST SP 800-53 r5CIS Controls v8.1
Record selection and audit settingsPR.PS-04AU-2, AU-128.2
Forwarding and centralisationPR.PS-04AU-68.9
Record integrity and collector protectionPR.PS-04AU-98.3
RetentionPR.PS-04AU-118.10
Detections and reviewDE.CM-09, DE.AE-02AU-6, SI-48.11

Common failure patterns

  • Nightly batch only: SMF dumped and sent once a day, so detections fire long after the activity.
  • RACF not auditing what the rules expect: detections written for commands that RACF is not set to log.
  • Raw records in the SIEM: hex blobs nobody can query, so the feed exists but nothing uses it.
  • Unprotected collector: a collector user ID with broad authority and a password, which becomes an attractive target itself.
  • No feed health alert: an INMEM or collector failure goes unnoticed for weeks because the SOC reads silence as normal.
  • No mainframe contact in the runbook: alerts reach analysts who cannot judge whether a PERMIT was planned.

Practitioner checklist

  • Agree the SOC questions, LPARs and ingestion budget with mainframe security and systems programming.
  • Confirm RACF audit options and Db2 audit policies produce the events your detections need.
  • Record SMF to log streams and define INMEM resources for the security record types.
  • Protect each in-memory resource with an IFA.IFASMF profile and grant READ only to the collector ID.
  • Run the collector under a protected ID with TLS and certificate authentication to the SIEM.
  • Parse records into named fields and enrich user IDs with human, batch or started task type.
  • Deploy the ten starter detections in audit mode, then promote with runbooks.
  • Alert on feed gaps per LPAR and record type.
  • Re-test parsing and detections after every z/OS, Db2 or collector upgrade.

Standards and references

Related NHI Mgmt Group resources: Mainframe Identity and RACF Security Guide · IBM z/OS Security Hardening Guide · Mainframe Incident Response and Forensics Guide · Detection Engineering Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.