Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Smart Web Security
  • Getting started
    • All guides
    • Address lists
    • Viewing operations
    • Configuring monitoring
    • Setting up alerts
    • Configuring logs via Smart Web Security
    • Configuring logs via Application Load Balancer
    • Migrating to the new condition format in the API, CLI, and Terraform
    • Overview
    • Security profiles
    • WAF profiles
    • ARL (request limit)
    • Rules
    • Conditions
    • Lists
    • Managing bot traffic
    • Protecting domains
    • Response templates
    • Logging
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Metrics
  • Audit Trails events
  • Release notes

In this article:

  • Audit logs
  • Logs of HTTP requests and triggered rules
  • Working with logs
  • Enable logging
  • Viewing logs
  • Examples of preset log filters
  • Filters for active rules
  • Filters for rules in logging mode
  1. Step-by-step guides
  2. Configuring logs via Smart Web Security

Configuring logging via Smart Web Security

Written by
Yandex Cloud
Updated at December 1, 2026
View as Markdown
  • Audit logs
  • Logs of HTTP requests and triggered rules
  • Working with logs
    • Enable logging
    • Viewing logs
  • Examples of preset log filters
    • Filters for active rules
    • Filters for rules in logging mode

This method provides detailed logs of request checks by security rules, WAF, and ARL. In the profile, you can select the rule types and verdicts to be logged. Logging via Application Load Balancer saves the load balancer's HTTP requests along with the result of the Smart Web Security check.

To write logs, Smart Web Security integrates the following services:

  • Monium Logs: For security profile logs. The logs contain information about HTTP requests and triggered rules, including WAF and ARL, and are stored in Monium projects.
  • Audit Trails: Collects Smart Web Security audit events. These are records of security events and actions with resources.

Audit logsAudit logs

There are two types of events in Audit Trails:

  • Management events, which include actions related to Yandex Cloud resource configuration, such as creating or deleting a security profile.
  • Data events, which include actions performed on resources within Yandex Cloud services, e.g., triggering a rule from a WAF profile.

Events can be written to an Object Storage bucket, a Monium project, or a data stream in Data Streams.

Logs of HTTP requests and triggered rulesLogs of HTTP requests and triggered rules

Request verification logs can be written via the Smart Web Security profile to Monium Logs or via the L7 Application Load Balancer to Cloud Logging. Logging via a security profile provides more analysis options.

Security profile logs are sent to the folder__<directory_id> Monium project, which specifies the ID of the directory containing the profile. You can view logs in the Smart Web Security or Monium UI.

Logs from proxy servers and L7 load balancers are sent to the selected log group in Cloud Logging. Proxy server logs are also available in the Smart Web Security UI, and load balancer logs, in the Application Load Balancer UI.

Log analysis enables you to configure and monitor Smart Web Security performance:

  • Test security rules, WAF, and ARL in Logging only (dry run) mode. In this mode, the system does not block user requests but logs rule matches.
  • View the number of blocked and allowed requests, evaluate and adjust rule performance.
  • View detailed request information and identify false positives.

In some cases, traffic may be blocked during attacks. When this happens, the logs will include the sws_service_rule service rule label.

Working with logsWorking with logs

To get started with Smart Web Security logs:

  1. Enable and set up logging.
  2. View and filter logs.

Enable loggingEnable logging

Logging can be enabled when creating a security profile or proxy server, as well as when editing them.

Note

To configure logging in a security profile, you need the smart-web-security.editor role on the folder containing the profile. To view logs in Monium, you need a role with log read permissions.

Security profile (Monium)
Proxy server (Cloud Logging)
Audit Trails
  1. In the management console, select the folder containing the Smart Web Security profile.

  2. Navigate to Smart Web Security.

  3. In the left-hand panel, select  Security profiles.

  4. In the row with the profile you need, click and select Edit.

  5. Enable Write logs.

  6. In the Send logs to field, select Monium.

  7. Configure the log filters:

    1. Under Log requests for rules, select the rule types:

      • Base rules.
      • Smart Protection.
      • Web Application Firewall.
      • Advanced Rate Limiter.
    2. Under Log requests with verdict, select the verdicts:

      • ALLOW.
      • DENY.
      • Sent for challenge: CAPTCHA or JS challenge.
    3. For requests with the ALLOW verdict, specify the percentage of logs to skip in the How many logs with the ALLOW verdict should not be recorded field: 0% to log all requests, and 100% to log none.

  8. Click Save.

  1. In the management console, select the folder containing the proxy server.

  2. Navigate to Smart Web Security.

  3. In the left-hand panel, select  Domain security.

  4. In the row of the proxy server in question, click and select Edit.

  5. Enable Log requests.

  6. Select the Cloud Logging log group to write logs to or create a new one.

  7. Optionally, to reduce the volume of logs, create a discard rule:

    1. Under Add rule, click Rules for discarding logs.
    2. Select HTTP codes or HTTP code classes for which you want to reduce log entries.
    3. Specify the share of logs to discard, ranging from 0% (all logs are recorded) to 100% (no logs are recorded).

    For other HTTP codes, add separate rules.

  8. Click Save.

Configure the logging of Smart Web Security events to an Object Storage bucket. Before creating a trail, prepare a bucket and service account.

  1. In the management console, select the folder containing the Smart Web Security profile.
  2. Navigate to Audit Trails.
  3. Click Create trail.
  4. In the Log destination field, select Object Storage.
  5. In the Bucket field, select the prepared bucket.
  6. Disable Control plane log collection.
  7. Under Data plane log collection, clear the list and select Smart Web Security.
  8. Under Service account, select the prepared account with the storage.uploader role for the bucket and the audit-trails.viewer role for the folder containing the security profile.
  9. Under General information, enter a name for the trail, e.g., trail-sws.
  10. Click Create.

The system will log all data events from Smart Web Security in the current folder, ignoring management events.

For other ways to enable event logging, see this article.

To make Yandex Smart Web Security deliver its events to Audit Trails:

  1. In the management console, select the folder containing the Smart Web Security profile.

  2. Navigate to Smart Web Security.

  3. In the left-hand panel, select Security profiles.

  4. In the row with the security profile you need, click and select Edit.

  5. Enable Write logs.

  6. In the Send logs to field, select Audit Trails.

  7. Configure the log filters:

    1. Under Log requests for rules, select the rule types:

      • Base rules.
      • Smart Protection.
      • Web Application Firewall.
      • Advanced Rate Limiter.
    2. Under Log requests with verdict, select the verdicts:

      • ALLOW.
      • DENY.
      • Sent for challenge: CAPTCHA or JS challenge.
    3. For requests with the ALLOW verdict, specify the percentage of logs to skip in the How many logs with the ALLOW verdict should not be recorded field: 0% to log all requests, and 100% to log none.

  8. Click Save.

This allows configuring event delivery only from specific security profiles or only for specific rules and verdicts.

Viewing logsViewing logs

Smart Web Security UI
Monium
Audit Trails

For a security profile:

  1. In the management console, select the folder with the security profile.

  2. Navigate to Smart Web Security.

  3. In the left-hand panel, select  Logs.

  4. Specify the log search period.

  5. In the query row, select the fields for filtering. To find the logs of a specific profile, add the security_profile_id = "<profile_id>" condition.

    To enter your query in text mode, click and use the Monium query language. Save the project, cluster, and service labels selected by default.

  6. Click Execute query. To view the contents of a record, expand it.

For a proxy server:

The logging.viewer role for the log group is required.

  1. In the management console, select the folder containing the proxy server.
  2. Navigate to Smart Web Security.
  3. In the left-hand panel, select  Domain security.
  4. Select the proxy server in question.
  5. Navigate to the Logs tab.

The proxy server logs can also be viewed in Cloud Logging.

  1. On the Monium home page, select Explore → Logs on the left.

  2. Specify the log search period.

  3. In the query string, specify project = "folder__<folder_id> for the folder containing the security profile. Select the cluster and service values for the Smart Web Security logs from the drop-down lists.

  4. To find the logs of a specific profile, add the security_profile_id = "<profile_id>" condition.

    The query can be composed from labels in the drop-down lists or entered in the Monium query language. To enter the query, click .

  5. Click Execute query. To view the contents of a record, expand it.

To view the logs, you need the storage.viewer role for the bucket.

  1. In the management console, select the folder with the bucket.
  2. Navigate to Object Storage.
  3. Select the bucket specified in the trail settings.
  4. On the Objects tab, find the files for the date in question. The file path contains the trail ID and recording date.
  5. Download the required JSON file and open it in a text editor.

Each file contains an array of events. To find a specific Smart Web Security event, search for the value of the event_type field in the following format: yandex.cloud.audit.smartwebsecurity.<event_name>.

Examples of preset log filtersExamples of preset log filters

The examples below relate to security profile logs and are suitable for the Smart Web Security and Monium interfaces. Logs are delivered in JSON format, with one record corresponding to one client request processed by Smart Web Security.

Queries for log filtering are based on the relationship between Smart Web Security profiles and rules. You can view logs for active, running rules, or rules in Logging only (dry run) mode.

Add the required conditions from the examples below to the query selector, keeping the project, cluster, and service labels. The fields are described in Logging.

Filters for active rulesFilters for active rules

  • Show requests blocked by basic rules based on specific conditions, e.g., by IP list or region:

    module_type = "RULE_CONDITION", meta.matched_rule_verdict = "DENY"
    
  • Show requests that have triggered the Smart Protection rules with a CAPTCHA challenge:

    module_type = "SMART_PROTECTION", meta.matched_rule_verdict = "CAPTCHA"
    
  • Show requests blocked based on the WAF profile, i.e., by the security profile WAF rules:

    module_type = "WAF", meta.matched_rule_verdict = "DENY"
    
  • Show requests blocked by the ARL profile rules:

    meta.arl_verdict = "DENY"
    
  • Show requests which triggered a specific ARL rule, arl-rule-1:

    meta.arl_verdict = "DENY", meta.arl_applied_quota_name = "arl-rule-1"
    

Filters for rules in logging modeFilters for rules in logging mode

  • Show requests that have triggered the Smart Protection rules with a CAPTCHA challenge:

    module_type = "SMART_PROTECTION", meta.dry_run_matched_rule_verdict = "CAPTCHA"
    
  • Show requests that exceeded the specific ARL rule, arl-rule-1:

    meta.arl_dry_run_exceeded_quota_names = "arl-rule-1"
    

You can similarly add other conditions to the filters and adjust them to fit your traffic flow.

Was the article helpful?

Previous
Setting up alerts
Next
Configuring logs via Application Load Balancer
© 2026 Direct Cursus Technology L.L.C.