Skip to content

Security Logs


Security Monitoring > Security Logs is used to find ingested raw records and parsed fields. For example, after receiving an anomalous login signal, you can find related records by occurrence time and source IP, and verify who initiated the login and whether the operation succeeded.

If you want to create detection rules, first verify data sources, fields, and values here, then use the confirmed conditions for detection. Regular logs already found in Logs can be ingested into Security Logs through Data Forwarding.

Ingest and Verify Logs

If workspace logs already exist, choose Data Forwarding. When an application needs to send Security Logs directly, use the write API. Both methods can be verified in the receiving workspace using a known record.

Ingest Through Data Forwarding

You can forward to this workspace or another workspace on the same site. Before configuration, confirm that you have Data Forwarding management permissions for the source workspace and Security Logs write permission for the receiving workspace. When forwarding to another workspace, you also need the receiving workspace's Client Token.

  1. In the source workspace, go to Logs > Data Forwarding and click Create.
  2. Enter a rule name, set the data source to Logs, and filter by source or business scope, for example, forward only login audit logs. If left blank, all logs from the data source are forwarded and count toward the receiving workspace's Security Logs ingestion volume.
  3. Set the forwarding destination to Security Monitoring - Security Logs and select the receiving workspace.
    • Select This Workspace to write logs to the current workspace.
    • Select Current Site Workspace Forwarding and enter the receiving workspace's Client Token. After validation passes, verify the workspace ID displayed in the UI to confirm the recipient is correct.
  4. Save and enable the rule. In the source workspace, find a log generated after the rule was enabled that matches the filter conditions, and note its occurrence time and key content in the raw text.
  5. Switch to the target workspace and go to Security Monitoring > Security Logs. Select a range that covers the log's occurrence time, then search by keywords from the raw text to confirm the log has been received.

For complete configuration instructions, see Data Forwarding to Security Logs.

Ingest Through the API

Existing applications can send raw text or JSON through the Dataway Security Logs write API. Before ingestion, prepare the target workspace's Dataway HTTPS root address and write token, and confirm that the receiving environment supports Security Logs and format=text raw text mode.

The following request writes a raw JSON record to the audit.demo source. Replace DATAWAY with the actual HTTPS root address without the query string and trailing slash, then replace DW_TOKEN with the receiving workspace's write token.

DATAWAY="https://dataway.example.com"
DW_TOKEN="<目标工作空间的写入 Token>"

curl -sS -i --request POST "$DATAWAY/v1/write/security_logging?format=text&source=audit.demo" \
  --header "X-Token: $DW_TOKEN" \
  --header 'Content-Type: text/plain; charset=utf-8' \
  --data-binary '{"event_id":"security-log-example","actor":"alice","action":"login","status":"failure","ip":"203.0.113.10"}'

When using raw text mode, send data according to the following requirements.

  • format=text saves the entire request body as the message of one log. Provide source as the log source. When sending raw JSON, also use text/plain; charset=utf-8 as in the example above.
  • The body must be non-empty UTF-8 text, with a maximum size of 1 MiB both in transit and after decompression. Split multiple events into separate requests; do not send NDJSON or vendor batches as a single event.
  • The initial time is the ingestion time. If you need business event time or separate JSON fields, configure the corresponding parsing rules.

After confirming the HTTP status is 2xx, go to Security Monitoring > Security Logs in the receiving workspace. Select the sending time range and search by source:audit.demo for records whose raw text contains security-log-example to confirm the log has been written.

If the response contains dataway.cached, the request has been cached; query again later. For API parameters and error responses, see Dataway Security Logs Write API.

Check Whether Parsing Is Required

If you only need to verify the raw text, search by keyword directly. If you need to filter by information or write detection conditions, open the details to confirm whether the relevant fields and values already exist. For example, if the login result is still a piece of text in message, you can extract it as the status field in Security Monitoring > Integration in the receiving workspace. After completion, verify with a new log. For operations, see Test and Enable a Rule.

Query Logs

Select Workspace and Time Range

Query in the workspace that receives the logs. When logs are forwarded to another workspace, switch to the receiving workspace first, then select the time range.

  • Standard Query is used to view logs within the standard retention period and is suitable for daily troubleshooting.
  • Long-term Query is used to query logs beyond the standard retention period but still within the long-term retention period. After selecting this mode, select the date and time range to query.

For example, with a 30-day standard retention and 180-day total retention, use Standard Query for the last 7 days and Long-term Query for logs from 45 days ago. The queryable range depends on the receiving workspace's storage settings.

When querying, select a time range that covers the event. When verifying ingestion, expand the range first, then narrow it around the event after finding the logs.

If log times differ from expectations, verify the original time, time zone, and how the parsing rules handle time. For time selection methods, see Explorer Time Widget.

Use Search and Field Filters

Combine conditions using field names and actual values in the logs.

Query Purpose Example Matching Method
Full-text search failed password English is case-insensitive; matches both failed and password.
Consecutive phrase #"failed password" Matches the consecutive phrase; keep the full #"...".
Log source source:audit.demo Restricts to the source; replace the value with actual data.
Combined conditions source:audit.demo AND status:failure Both conditions must be met; use uppercase AND.
Missing field -actor:* Finds records missing a field; this example uses actor.

Tokenized search requires records to contain all tokens. To match a consecutive phrase, use phrase search with the # prefix.

For syntax, see Text and Phrase Search, Field Filter Operators, and Combined Conditions.

To use functions, aggregations, or complex expressions, click DQL on the right side of the search bar. The following example uses SL to query raw logs from the audit.demo source.

SL::`audit.demo`:(message) LIMIT 100

For more syntax, see DQL Query.

Use Quick Filters and Display Columns

  • Quick Filters. First select the log source to limit the application, then use parsed operation results to filter failed records. Available fields and values depend on the actual data.
  • Display Columns. The list displays time and message by default. To compare multiple logs, add columns such as source, account, source IP, or operation result.

Adding display columns only adjusts list presentation and does not parse or generate fields. For configuration details, see Display Columns and Quick Filters.

Select a Display Type

The Explorer provides List, Top List, Time Series Chart, Pie Chart, Treemap, and Grouped Table.

First limit logs by time and conditions, then select a display type.

Display Type Applicable Questions
List Verify log time, raw text, and fields, and validate ingestion and parsing.
Top List Compare log volume across sources, access subjects, or source IPs to find the most active objects.
Time Series Chart Observe changes in log volume over time and locate periods with concentrated failures or sudden request spikes.
Pie Chart Compare the proportions of different sources or execution results in the query results.
Treemap Compare the sizes of different groups and quickly identify groups with larger proportions.
Grouped Table Compare statistics by multiple fields, for example, compare the counts of different operation results across services.

Fields used for chart analysis must already exist in the logs. For example, to compare by access subject, first confirm whether the logs include the corresponding field and valid values.

In List, use Status Distribution to select the period to investigate. When investigating recurring errors, switch to Pattern to identify recurring patterns among groups of similar logs.

If AI Analysis appears on the right side of the list, narrow the log range first, then use it to summarize clues in the current results. Verify against the raw text. For details, see List and Asset Analysis.

Security Logs and Signals

After receiving a Signal, first note the involved log source, time, and object. Query the raw text in Security Logs within the same range to further verify the risk. Records already found can also be used to verify new detection conditions.

Investigate a Batch of Failed Logins

First extract login event fields for audit.demo logs, then verify the periods and objects with concentrated failures.

  1. Open Security Logs in the receiving workspace and select the time range to investigate. Search source:audit.demo AND action:login AND status:failure to filter failed login records.
  2. Use Time Series Chart to find periods with concentrated failures. After narrowing the time range, use Top List to compare log volume by source IP.
  3. Return to List and add actor, ip, and status in Display Columns. To check whether an account later logged in successfully, filter by account, remove the failure condition, and extend the query range to after the failures. Then compare the source IPs of successful and failed records.
  4. If you need to continuously check for such issues, write a detection rule using the same source and fields, or use AI-generated rules to describe the conditions. After enabling, view hit results in Signals, then query the raw text by the involved time and object.

FAQ

Cannot Find Logs

First verify the receiving workspace and write status according to the ingestion method.

  • Data Forwarding: Check whether the rule is enabled and whether the source workspace has newly generated logs that match the filter conditions. When forwarding to another workspace, also verify the Client Token, the workspace ID displayed in the UI, and write permissions.
  • API Write: Check the HTTP response and verify the receiving workspace's ingestion address and write token. If the response contains dataway.cached, query again later.

After confirming the receiving workspace, check whether the query mode covers the target date. Clear field filters and search by raw text keywords first. If other members can find the same log, check your query permissions and data access scope.

Logs Exist but Fields Are Missing or Values Are Incorrect

  1. Determine whether the list is not displaying the field or the log itself lacks the field. First check the log content and parsing results; if necessary, add the target field in Display Columns.
  2. If the field has not been extracted, check in Security Monitoring > Integration in the receiving workspace whether the parsing rule is enabled and whether the rule's Source matches the log.
  3. Test the parsing script with the actual raw text and verify the field path, name, type, and value. Then verify the output with a new log to confirm consistency with the query or detection conditions.

Permissions and Billing

Configuring forwarding, parsing, and detection rules requires management permissions for the corresponding modules. The visibility of ingested logs is controlled by the receiving workspace's data access policies. For configuration permissions and data access scope, see Role Management and Data Access.

Forwarding to Security Logs within the same site is free. The receiving workspace charges ingestion fees based on the raw log volume before parsing and compression. After long-term storage is enabled, only data beyond the standard retention period that is still retained is counted as long-term storage. Logs matching parsing rules also count toward Central Pipeline usage.

For detailed billing rules, see Security Logs Billing.