Skip to content

OpenTelemetry

Signalith takes logs over OTLP/HTTP, so an OpenTelemetry Collector or an app's OpenTelemetry SDK can send to it. Fluent Bit stays the default agent; use the Collector when your hosts already run one, or when you would rather have one agent for logs, metrics and traces. Signalith keeps only the logs.

Set up a Collector

Open Add data, pick OpenTelemetry, and choose where the Collector runs:

  • Linux: reads /var/log/auth.log or /var/log/secure, or the systemd journal, like the Fluent Bit agent.
  • Windows: reads the Security, System and Application event logs, Code Integrity, Microsoft Defender, Sysmon when Include Sysmon is on, and PowerShell script blocks when Include PowerShell is on.

Either way the Collector also listens on 127.0.0.1:4317 (gRPC) and 127.0.0.1:4318 (HTTP) for apps on that host that export OTLP logs, and passes those on too.

To read AWS CloudTrail with a Collector, choose AWS CloudTrail instead (see AWS CloudTrail), for Microsoft Entra ID and Azure logs, Entra ID and Azure (see Entra ID and Azure), and for Google Cloud's audit logs, Google Cloud (see Google Cloud).

The page gives the steps and a complete config.yaml for the Collector Contrib distribution (otelcol-contrib, 0.100 or later; 0.129 or later on Windows): it already holds this server's address, an agent token of its own (made when you copy or download the configuration) and, over HTTPS, Signalith's CA certificate to check the server with. It keeps unsent logs and its place in each log on disk, so a restart or an outage of Signalith neither loses nor repeats events.

If the Collector already sends elsewhere, keep your config and add Signalith's parts to it: the otlphttp/signalith exporter (and file_storage/signalith, which it uses), plus a pipeline, or add the exporter to an existing logs pipeline.

Send from your own Collector or SDK

Any OTLP/HTTP sender works. Point it at:

Setting Value
Logs endpoint https://<server>:7779/api/otlp/v1/logs (or endpoint https://<server>:7779/api/otlp, to which the exporter adds /v1/logs), on the agent port, not the web page's port
Header Authorization: Bearer <agent token>; make one on Add data under Agent tokens, or with signalith tokens create (see Agent tokens). It must be made for OpenTelemetry (purpose otel) or for no purpose: a token made for Fluent Bit, osquery or the Signalith Agent is refused with 403 (see Token purposes)
Encoding protobuf (application/x-protobuf, the Collector's default) or JSON (application/json)
Compression gzip (the Collector's default) or none
CA Signalith's CA certificate (/api/tls/ca.pem), unless the server has a certificate your systems trust

For example, with curl:

curl --cacert signalith-ca.pem https://siem.example.com:7779/api/otlp/v1/logs \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"resourceLogs":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"shop"}}]},
       "scopeLogs":[{"logRecords":[{"severityText":"ERROR","body":{"stringValue":"payment failed"}}]}]}]}'

Only logs are taken: gRPC, metrics and traces are not. Over plain HTTP to the HTTPS port, OTLP follows server.tls.plaintext_ingest, as the agents do.

How records are mapped

Records from the Collector's own receivers for sources Signalith already parses are mapped as the Fluent Bit agent's records are, so the built-in detections fire whichever agent collects them:

Receiver Becomes
windowseventlog (Security log 4624, 4625, 4648, 4656, 4657, 4661, 4662, 4663, 4688, 4697, 4698, 4706, 4719, 4720, 4726, 4728, 4732, 4738, 4756, 4768, 4769, 4794, 5136, 5145, 5156, 5157; System 7045; Microsoft Defender 1006-1009, 1015, 1116-1119, 1121-1128, 1150, 1151, 2000-2004, 2006, 3002, 5000, 5001, 5004, 5007-5013, 5101; Sysmon 1, 3, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 22, 23, 26; PowerShell 4104) Authentication, Endpoint, Change, Network_Traffic, Image_Load, Filesystem, Registry, Network_Resolution, Script, Malware
filelog on auth.log or secure (or any syslog-format file) Authentication and Change for sshd, sudo, su and account changes
filelog on a web server's access log (a file whose name has access in it; include_file_path: true) Web, as the agent's (see Web server access logs)
journald as the agent's journal input
syslog as Signalith's own syslog receiver

Both of the windowseventlog receiver's event_data_format settings work (map, the default in recent versions, and array).

Any other record is an Other event with sourcetype=otel:

  • message is the body (a structured body as JSON, with its top-level keys also as fields).
  • Attributes, then resource attributes, become fields, with dots turned into underscores (http.route becomes http_route). Common semantic-convention names map onto Signalith's own: user.name and enduser.id to user, client.address and source.address to src, server.address and destination.address to dest (and their ports to src_port and dest_port), http.request.method to http_method, http.response.status_code to status, url.full to url, user_agent.original to http_user_agent, process.pid, process.executable.path and process.command_line to process_id, process_path and process, and file.path and file.name to file_path and file_name.
  • The resource's host.name is host, and service.name is service.
  • severity is the severity text (or the name of the severity number), and severity_id the number; trace_id, span_id and otel_scope (the instrumentation scope) are kept, so a search can follow one request.

Every record also gets host, service, trace_id and span_id when it has them.

The event's time is the record's own time, else the time in its log line, else when the Collector saw it. As for every source, a time older than ingest.max_event_age or more than an hour ahead is filed under the time it arrived (see Ingest limits).

Limits and errors

The same limits as agent batches apply: up to 16 MB per request (also after gzip is undone), 200,000 records of at most 1 MB each, values nested at most 32 levels. A record that is split into several events (an Event Hub message's records, or the Okta, Kubernetes or GitHub events a body holds) counts as that many records. In OTLP/JSON a record may hold at most 65,536 objects, lists and list entries. Every record's event carries a copy of its resource's attributes and its scope's name, so a request may come to at most 64 MB counting both once per record (and the resource's host.name once for each event of a record that is split into several); a request over that is refused with 413 before anything from it is stored. Each attribute list (a resource's, a record's, or a map value) keeps its first 256 attributes, a scope name and service.name their first 256 bytes, and host.name its first 255. A record over the size or nesting limit, or one that does not decode, is turned away on its own: the rest of the batch is stored, and the record is counted in the answer's partial success with a message saying why. A request over a limit or that does not decode as a whole is refused with 4xx and a message saying why, and nothing from it is stored; the Collector logs the message and drops the batch, so keep batches small (the generated config's batch processor sends at most 5,000 records). When Signalith is busy or OpenSearch is down the answer is 503 with Retry-After, and the Collector keeps the batch and sends it again; so is a batch OpenSearch could only partly take for now (it is too busy, or its disk is full). Records already stored from a batch sent again are recognised and not stored twice. Records OpenSearch turns away for good are counted in the answer's partial success.