Skip to main content
Version: 6.2

Setting up and using limits

Limits restrict the Smart Monitor resources available for query processing. The system supports default values and separate configurations for roles and users.

Setting up user and role limits​

User limit checking order

For each field, the system first checks the user’s personal value. If the value is absent, the system considers the user’s roles with limit configurations. A missing field in an existing role configuration uses the default value; roles without a limit configuration are excluded from the calculation. Numeric parameters use the largest value, while command lists are combined without duplicates. If no personal or role value is available, the default limit applies.

Open Main Menu - Settings - Module Settings - Limits. The page provides default, role and user limit configurations. To find a configuration, enter the role or user name in the search field.

Editor parameters are divided into three groups:

  • Search - search interval, running time, parallel request count and source record count
  • Pipeline - document count and data size between commands, and maximum lookup size
  • Background results - result retention time and disk quota

The list of allowed commands is configured separately.

Configuring default limits​

  1. Select the default limits in the configuration list.
  2. Fill in all numeric fields or select Unlimited (∞) for the required parameters.
  3. Set the default list of allowed commands. The * symbol allows all commands.
  4. Click Save.

Default values are used for inheritance. Changes to a default value apply to roles and users that inherit the corresponding parameter.

Default limits: search, pipeline and background result parameters, and allowed commands

Configuring role or user limits​

  1. To create a configuration, select For a role or For a user and choose the role or user. To edit an existing configuration, select it in the list.
  2. Click Add limit and add the numeric fields to be configured for the role or user. The system applies the inheritance algorithm to the remaining fields.
  3. Enter values and select units. Select Unlimited (∞) if required.
  4. Specify the allowed commands. A personal user list replaces the inherited list. Role lists are combined without duplicates. The default list follows the same rules as default numeric values.
  5. Under Effective limits, check the resulting values and their sources.
  6. Click Save. The new values apply to subsequent queries, including queries from users who inherit the modified limit.

To restore the saved values, click Cancel changes. If saving fails, the entered values remain in the form for resubmission.

Role configuration example​

The following limits are configured for the role security_engineer:

NameValue
max_qsize1000
max_payload_row_count100
allowed_commandsscript
write

The effective limits section displays the role’s own and inherited values.

Configured limits and allowed commands for the role security_engineer

User configuration example​

The user pavluchenko.r is assigned the following limits:

NameValue
max_parallel_request_count24
max_lookup_size512 MB
background_result_ttl2 days
allowed_commandsfields
rename

The user's personal command list replaces the inherited lists.

Personal limits for the user pavluchenko.r and the personal list of allowed commands

Values and units​

To remove a numeric restriction, select Unlimited (∞). The interface submits the value -1 when saving. The value 0 is a numeric restriction and does not mean unlimited.

Select measurement units: seconds, minutes, hours or days for time; bytes, KB, MB, GB or TB for size. When saving, the interface converts time values to seconds and size values to bytes. Size units differ by a factor of 1024: 1 KB = 1024 bytes.

Deleting a limit field or configuration​

Deleting a limit field​

To delete an individual field from a role or user configuration, click the delete button next to the field, then click Save.

After a field is deleted, the system determines its value using the inheritance algorithm. For a user, the system considers role configurations. A missing field in an existing role configuration uses the default value. Roles without a limit configuration are excluded from the calculation. If no applicable values are available, the default limit applies.

Deleting a role or user configuration​

To delete an entire configuration, click the delete button next to the role or user in the configuration list and confirm the action. The system deletes all fields in the configuration and determines the effective values again through inheritance. The role or user account is retained.

Limit inheritance​

The system determines each field’s value separately:

  1. It checks the user’s personal configuration. If the field is set, its value replaces the inherited value.
  2. If the personal value is absent, it considers the user’s roles. For each role with a limit configuration, it uses the field value or, if absent, the default value. Roles without a limit configuration are excluded from the calculation.
  3. It selects the largest value. If any value is Unlimited (∞), it removes the restriction.
  4. If no personal or role value is available, it applies the default limit.

The resulting values and their sources are displayed under Effective limits.

Allowed command inheritance​

The same inheritance order applies to allowed_commands. A personal user list replaces inherited lists. If no personal list is set, the system combines role lists without duplicates. Unlike numeric parameters, command lists do not use a maximum value.

The default list applies when an existing role configuration lacks allowed_commands, or when no list is available from the user or applicable roles. Otherwise, the default list does not participate in the calculation. Roles without a limit configuration are excluded.

The * symbol in the resulting list allows all commands. A personal list without * can replace an inherited list containing *.

Configuration example​

The user is assigned the roles developer and user. Both roles have limit configurations. In the table, “Not set” indicates a missing field in an existing role configuration.

ParameterDefaultRole developerRole userUserResulting valueHow the result is selected
max_qsize2000Not set1000500500The system applies the personal value 500 without comparison with default or role values
max_dt_interval30 days7 daysNot setNot set30 daysThe field is absent from the configuration of the role user, so the default of 30 days applies. The role developer specifies 7 days. The resulting value is 30 days
max_search_running_time1 minute5 minutesNot setNot set5 minutesThe default of 1 minute applies to the role user. The role developer specifies 5 minutes. The resulting value is 5 minutes
allowed_commandssourcestats, evaleval, writestreamstatsstreamstatsThe personal list replaces inherited lists. If no personal list is set, the role lists are combined into stats, eval, write, without duplicates or the default source

Deleting the entire configuration for the role user excludes that role from the calculation. The resulting max_dt_interval is 7 days from the role developer; the default of 30 days does not participate in the comparison. If no personal value or applicable role configuration is available, the default limit applies.

Numeric limit inheritance examples​

In all three examples, the user has the roles developer and user, and no personal max_dt_interval is set. Interval values are in seconds: 2592000 is 30 days, 604800 is 7 days, and 86400 is 1 day.

1. Both role configurations contain the field​

{
"base_limit": {
"max_dt_interval": 2592000
},
"role_developer": {
"max_dt_interval": 604800
},
"role_user": {
"max_dt_interval": 86400
}
}

Both roles specify the field. The system compares 7 days with 1 day and selects 7 days. The default of 30 days does not participate.

2. A role configuration lacks the field​

{
"base_limit": {
"max_dt_interval": 2592000
},
"role_developer": {
"max_dt_interval": 604800
},
"role_user": {
"max_qsize": 1000
}
}

The role_user configuration exists but lacks max_dt_interval. The system uses the default of 30 days for this role and compares it with 7 days from role_developer. The result is 30 days.

3. A role has no limit configuration​

{
"base_limit": {
"max_dt_interval": 2592000
},
"role_developer": {
"max_dt_interval": 604800
}
}

The role_user configuration is absent, so the role user is excluded from the calculation. The resulting value is 7 days from role_developer. The default of 30 days does not participate.


System limit settings​

Global limit settings are in _cluster/settings under sme.core.limits.

The table lists the system settings and their default values. Names are relative to sme.core.limits: for example, the full path for enable_limits is sme.core.limits.enable_limits.

NameDescriptionDefault value
enable_limitsEnables or disables limitingtrue
check_base_limitCreates the limit index and default limit if they are missingtrue
index_nameSets the index used to store limits.sm_sme_limits_user
max_subsearch_hits_countLimits the number of documents returned by a subquery50000
list_limitLimits the number of values returned by the list function of stats100
sort_limitLimits the number of documents sorted by sort10000

Limit parameters​

The table lists the units in which the interface saves field values through the API.

ParameterPurposeStorage unit
max_dt_intervalMaximum duration of the search time rangeSeconds
max_search_running_timeMaximum query running timeSeconds
max_parallel_request_countMaximum number of parallel queriesCount
max_qsizeMaximum number of records read from the sourceCount
max_payload_row_countMaximum number of documents passed between pipeline commandsCount
max_payload_sizeMaximum amount of data passed between pipeline commandsBytes
max_lookup_sizeMaximum size of lookup dataBytes
background_result_ttlRetention time for background query resultsSeconds
background_disk_quotaDisk quota for background query resultsBytes
allowed_commandsAllowed SML commandsArray of command names