Skip to main content
Version: 5.3

Setting up and using limits

Limits restrict Smart Monitor resources used for processing requests.

Setting up user and role limits

User limit checking order

Checking each user limit proceeds sequentially. First, their own limit is checked. If it is not specified, the user's role limits are checked. If several roles have this limit specified, the most extended one is selected. If the user's roles also do not have a limit specified, the base limit is used.

Limits can be configured through the interface available in the navigation menu at System Settings - Module Settings - Limits.

Limits setup interface

In this section of Smart Monitor, you can configure base limits, limits for individual roles or users.

Configuration example

The user has been assigned the following limits:

NameValue
max_qsize500
allowed_commandssource
stats
eval

The user also has roles developer and user. Limits for role developer:

NameValue
max_search_running_time500
allowed_commandssource
streamstats
eventstats

Limits for role user:

NameValue
max_qsize1000
allowed_dt_startnow-3w

After combining all types of limits, the following configuration is obtained:

NameValueLimit type
max_qsize500Personal
allowed_dt_startnow-3wPersonal
max_search_running_time500From role developer
allowed_commandssource
stats
eval
streamstats
eventstats
Combination of personal limit and role developer
allowed_dt_endBy defaultBase
max_payload_row_countBy defaultBase
max_payload_sizeBy defaultBase
max_command_ram_usageBy defaultBase

System limit settings

Limit settings are stored in _cluster/settings in the sme.core dictionary. The table below shows the limit settings and their default values.

NameDescriptionDefault value
enable_limitsEnable/disable limiting.true
check_base_limitCreates an index with limits if it is missing. Creates a base limit if it is missing in the limit index.true
limits.index_nameIndex name where limits are stored..sm_sme_limits_user
max_subsearch_hits_countMaximum number of documents returned by a subquery.50000
list_limitMaximum number of values returned by the list function of the stats command.100
sort_limitMaximum number of documents sorted by the sort command.10000

Limit parameters

Request startup limits

  • allowed time interval: allowed_dt_start and allowed_dt_end
  • list of available commands: allowed_commands
  • maximum amount of requested data: max_qsize
  • maximum number of parallel requests: max_parallel_request_count
  • maximum volume of returned documents from lookup in bytes: max_lookup_size
  • background task result lifetime: background_result_ttl
  • total disk space for background task results: background_disk_quota
Please note!

Parameters max_lookup_size, background_result_ttl and background_disk_quota are not available for editing through the Smart Monitor limit management interface. To change these parameters, you need to execute an API request through the Developer Console. An example of such a request is shown below:

POST .sm_sme_limits_user/_update/<document id>
{
"doc": {
"background_disk_quota": 5000000000,
"background_result_ttl": 86400,
"max_lookup_size": 500000000
}
}

Request execution time limits

  • maximum request execution time in seconds: max_search_running_time
  • payload document count: max_payload_row_count
  • payload size in bytes: max_payload_size
  • amount of RAM allocated per thread in bytes: max_command_ram_usage

Command-specific limits

  • number of documents returned by subqueries
  • number of values processed by the list function of the stats command
  • number of documents sorted by the sort command