Runbooks / Siem Syslog

Syslog forwarding (RFC 5424)

Operator runbook for piping IdentityMesh logs straight to an on-prem syslog collector — Splunk Heavy/Universal Forwarders with a syslog input, IBM QRadar, ArcSight ESM/SmartConnectors, Graylog, RSyslog, Logstash with the syslog codec. This is an opt-in sibling to the default Serilog file + Windows Event Log sinks; nothing is enabled by default.

If your SIEM is happy reading log files or the Application Event Log directly, prefer that — see siem-integration.md for the full surface map. Use syslog when the collector is the contract you have to meet (most on-prem SIEMs without OTLP support treat syslog as the primary ingest channel).

Why a syslog sink

What gets shipped

Every Serilog event the Sync Engine emits — same lines that go to the rolling file at <install dir>\logs\identitymesh-YYYYMMDD.log — is forwarded to the syslog collector when the sink is enabled. Enrichers (MachineName, ThreadId, RequestId, CycleId, InstanceName) ride along as RFC 5424 structured-data fields.

The Admin API and Relay Agent each have their own Serilog configuration. The pattern below applies to all three; copy the fragment into the matching appsettings.json for whichever component(s) you want to forward.

Enabling syslog forwarding

The Sync Engine ships with a sample at:

<install dir>\appsettings.Syslog.example.json

Copy the Serilog.Using array entry and a Serilog.WriteTo block into the live appsettings.json (or, preferred for a host-specific override, appsettings.Production.json which the host honours via ASP.NET environment conventions). Restart the IdentityMesh service.

{
  "Serilog": {
    "Using": [
      "Serilog.Sinks.Console",
      "Serilog.Sinks.File",
      "Serilog.Sinks.EventLog",
      "Serilog.Sinks.Syslog"
    ],
    "WriteTo": [
      {
        "Name": "TcpSyslog",
        "Args": {
          "host": "syslog.corp.example",
          "port": 1468,
          "appName": "IdentityMesh",
          "framingType": "OCTET_COUNTING",
          "format": "RFC5424",
          "facility": "Local0"
        }
      }
    ]
  }
}

Key knobs:

FieldMeaning
host / portTarget syslog collector. Default port 1468 is the IETF reserved TCP port.
appNameRFC 5424 APP-NAME field. Pick a per-component value if you forward multiple — e.g. IdentityMesh, IdentityMesh.Admin.Api, IdentityMesh.Relay.Agent.
formatRFC5424 (modern, structured-data, recommended) or RFC3164 (BSD legacy — only if your collector chokes on 5424).
framingTypeOCTET_COUNTING (RFC 6587 § 3.4.1, recommended for TCP) or NON_TRANSPARENT_FRAMING for \n-delimited.
facilityRFC 5424 facility — Local0Local7 are the conventional application-log slots.

TLS variant (production)

For traffic that crosses host boundaries — and especially across network segments — wrap the TCP connection in TLS. Replace host / port with the TLS endpoint and add the cert config:

{
  "Name": "TcpSyslog",
  "Args": {
    "host": "syslog.corp.example",
    "port": 6514,
    "appName": "IdentityMesh",
    "framingType": "OCTET_COUNTING",
    "format": "RFC5424",
    "facility": "Local0",
    "secureProtocols": "Tls12, Tls13",
    "certProvider": "Serilog.Sinks.Syslog.CertificateStoreProvider, Serilog.Sinks.Syslog"
  }
}

Port 6514 is the registered RFC 5425 TLS-syslog port. The cert provider above resolves the client certificate from the local machine cert store; alternative providers ship with the package for file-based certs. Verify with your collector’s TLS docs.

UDP variant (trusted network only)

{
  "Name": "UdpSyslog",
  "Args": {
    "host": "syslog.corp.example",
    "port": 514,
    "appName": "IdentityMesh",
    "format": "RFC5424",
    "facility": "Local0"
  }
}

UDP is fire-and-forget. A dropped packet is a lost log line; there is no retransmit. Use only inside a trusted segment where loss is tolerable. Production deployments should prefer TCP/TLS.

Format choice — RFC 5424 vs RFC 3164

Switch by changing the format arg in the WriteTo block — the sink emits the chosen format, no other change required.

Collector-side examples

These are pointer-style recipes. Your collector docs are authoritative; verify ports / parser names against your install.

rsyslog (Linux relay → file or onward forward)

# /etc/rsyslog.d/30-identitymesh.conf
module(load="imtcp")
input(type="imtcp" port="1468")

template(name="ImTemplate" type="string"
         string="%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag% %msg%\n")

if $programname startswith 'IdentityMesh' then {
    action(type="omfile" file="/var/log/identitymesh.log" template="ImTemplate")
    stop
}

Reload with systemctl restart rsyslog. Aim a tail -f at the output file from a separate shell while you trigger a sync run to confirm flow.

Splunk (Heavy Forwarder syslog input)

# inputs.conf on the Heavy Forwarder
[tcp://1468]
sourcetype = identitymesh:syslog
index = identitymesh
connection_host = ip

Add a props.conf stanza if you want to break events on the RFC 5424 leading <PRI> token; Splunk’s default line-breaking handles octet-counting framing without further tuning.

Failure modes

If the syslog collector is part of your compliance contract, pair this sink with the audit-table feed (audit-retention.md) so you have an authoritative durable evidence channel that doesn’t depend on the syslog hop being healthy.

Configurable fields cheat-sheet

ConcernWhere to set it
Severity floorSerilog.MinimumLevel.Default / per-component overrides
Per-event fieldsSerilog enrichers — already wired (MachineName, ThreadId, request scope)
App-name in syslogappName arg on the TcpSyslog / UdpSyslog block
Facilityfacility arg — Local0Local7 recommended for app logs
TransportTcpSyslog (recommended) / UdpSyslog (trusted network) / TLS via secureProtocols
Framing (TCP)framingTypeOCTET_COUNTING (default, RFC 6587) or NON_TRANSPARENT_FRAMING