# JSON Schema Opensearch

## Properties

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `action_auto_create_index_enabled` | boolean | no | Explicitly allow or block automatic creation of indices. Defaults to true |
| `action_destructive_requires_name` | boolean | no |  |
| `auth_failure_listeners` | [Auth Failure Listeners](/reference/api/_schemas/json-schema-opensearch/#auth-failure-listeners) | no |  |
| `cluster_max_shards_per_node` | integer | no | Controls the number of shards allowed in the cluster per data node<br/><br/>Min: `100`. Max: `10000`. |
| `cluster_routing_allocation_node_concurrent_recoveries` | integer | no | How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to 2.<br/><br/>Min: `2`. Max: `16`. |
| `email-sender` | [Email Sender](/reference/api/_schemas/json-schema-opensearch/#email-sender) | no |  |
| `enable_security_audit` | boolean | no | Default: `false`. |
| `http_max_content_length` | integer | no | Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes.<br/><br/>Min: `1`. Max: `2.147483647e+09`. |
| `http_max_header_size` | integer | no | The max size of allowed headers, in bytes<br/><br/>Min: `1024`. Max: `262144`. |
| `http_max_initial_line_length` | integer | no | The max length of an HTTP URL, in bytes<br/><br/>Min: `1024`. Max: `65536`. |
| `indices_fielddata_cache_size` | integer | no | Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations.<br/><br/>Min: `3`. Max: `100`. Default: `null`. |
| `indices_memory_index_buffer_size` | integer | no | Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance.<br/><br/>Min: `3`. Max: `40`. |
| `indices_memory_max_index_buffer_size` | integer | no | Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit.<br/><br/>Min: `3`. Max: `2048`. |
| `indices_memory_min_index_buffer_size` | integer | no | Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit.<br/><br/>Min: `3`. Max: `2048`. |
| `indices_queries_cache_size` | integer | no | Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality.<br/><br/>Min: `3`. Max: `40`. |
| `indices_query_bool_max_clause_count` | integer | no | Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value.<br/><br/>Min: `64`. Max: `4096`. |
| `indices_recovery_max_bytes_per_sec` | integer | no | Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb<br/><br/>Min: `40`. Max: `400`. |
| `indices_recovery_max_concurrent_file_chunks` | integer | no | Number of file chunks sent in parallel for each recovery. Defaults to 2.<br/><br/>Min: `2`. Max: `5`. |
| `ism-history` | [Ism History](/reference/api/_schemas/json-schema-opensearch/#ism-history) | no |  |
| `knn_memory_circuit_breaker_enabled` | boolean | no | Enable or disable KNN memory circuit breaker. Defaults to true. |
| `knn_memory_circuit_breaker_limit` | integer | no | Maximum amount of memory that can be used for KNN index. Defaults to 50% of the JVM heap size.<br/><br/>Min: `3`. Max: `100`. |
| `override_main_response_version` | boolean | no | Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false |
| `plugins_alerting_filter_by_backend_roles` | boolean | no | Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false |
| `reindex_remote_whitelist` | array[string] | no | Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. |
| `script_max_compilations_rate` | string | no | Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context<br/><br/>Max length: `1024`. |
| `search_backpressure` | [Search Backpressure](/reference/api/_schemas/json-schema-opensearch/#search-backpressure) | no |  |
| `search_max_buckets` | integer | no | Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined.<br/><br/>Min: `1`. Max: `1e+06`. |
| `shard_indexing_pressure` | [Shard Indexing Pressure](/reference/api/_schemas/json-schema-opensearch/#shard-indexing-pressure) | no |  |
| `thread_pool_analyze_queue_size` | integer | no | Size for the thread pool queue. See documentation for exact details.<br/><br/>Min: `10`. Max: `2000`. |
| `thread_pool_analyze_size` | integer | no | Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.<br/><br/>Min: `1`. Max: `128`. |
| `thread_pool_force_merge_size` | integer | no | Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.<br/><br/>Min: `1`. Max: `128`. |
| `thread_pool_get_queue_size` | integer | no | Size for the thread pool queue. See documentation for exact details.<br/><br/>Min: `10`. Max: `2000`. |
| `thread_pool_get_size` | integer | no | Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.<br/><br/>Min: `1`. Max: `128`. |
| `thread_pool_search_queue_size` | integer | no | Size for the thread pool queue. See documentation for exact details.<br/><br/>Min: `10`. Max: `2000`. |
| `thread_pool_search_size` | integer | no | Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.<br/><br/>Min: `1`. Max: `128`. |
| `thread_pool_search_throttled_queue_size` | integer | no | Size for the thread pool queue. See documentation for exact details.<br/><br/>Min: `10`. Max: `2000`. |
| `thread_pool_search_throttled_size` | integer | no | Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.<br/><br/>Min: `1`. Max: `128`. |
| `thread_pool_write_queue_size` | integer | no | Size for the thread pool queue. See documentation for exact details.<br/><br/>Min: `10`. Max: `2000`. |
| `thread_pool_write_size` | integer | no | Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.<br/><br/>Min: `1`. Max: `128`. |

### Search Backpressure {#search-backpressure}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | string | no | The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only<br/><br/>Allowed values: `monitor_only`, `enforced`, `disabled`. |
| `node_duress` | [Node Duress](/reference/api/_schemas/json-schema-opensearch/#node-duress) | no |  |
| `search_shard_task` | [Search Shard Task](/reference/api/_schemas/json-schema-opensearch/#search-shard-task) | no |  |
| `search_task` | [Search Task](/reference/api/_schemas/json-schema-opensearch/#search-task) | no |  |

### Node Duress {#node-duress}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `cpu_threshold` | number | no | The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.9<br/><br/>Min: `0`. Max: `1`. |
| `heap_threshold` | number | no | The heap usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.7<br/><br/>Min: `0`. Max: `1`. |
| `num_successive_breaches` | integer | no | The number of successive limit breaches after which the node is considered to be under duress. Default is 3<br/><br/>Min: `1`. |

### Search Shard Task {#search-shard-task}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `cancellation_burst` | number | no | The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0<br/><br/>Min: `1`. |
| `cancellation_rate` | number | no | The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003<br/><br/>Min: `0`. |
| `cancellation_ratio` | number | no | The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1<br/><br/>Min: `0`. Max: `1`. |
| `cpu_time_millis_threshold` | integer | no | The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000<br/><br/>Min: `0`. |
| `elapsed_time_millis_threshold` | integer | no | The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000<br/><br/>Min: `0`. |
| `heap_moving_average_window_size` | integer | no | The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100<br/><br/>Min: `0`. |
| `heap_percent_threshold` | number | no | The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5<br/><br/>Min: `0`. Max: `1`. |
| `heap_variance` | number | no | The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0<br/><br/>Min: `0`. |
| `total_heap_percent_threshold` | number | no | The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5<br/><br/>Min: `0`. Max: `1`. |

### Search Task {#search-task}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `cancellation_burst` | number | no | The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 5.0<br/><br/>Min: `1`. |
| `cancellation_rate` | number | no | The maximum number of search tasks to cancel per millisecond of elapsed time. Default is 0.003<br/><br/>Min: `0`. |
| `cancellation_ratio` | number | no | The maximum number of search tasks to cancel, as a percentage of successful search task completions. Default is 0.1<br/><br/>Min: `0`. Max: `1`. |
| `cpu_time_millis_threshold` | integer | no | The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 30000<br/><br/>Min: `0`. |
| `elapsed_time_millis_threshold` | integer | no | The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 45000<br/><br/>Min: `0`. |
| `heap_moving_average_window_size` | integer | no | The window size used to calculate the rolling average of the heap usage for the completed parent tasks. Default is 10<br/><br/>Min: `0`. |
| `heap_percent_threshold` | number | no | The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation. Default is 0.2<br/><br/>Min: `0`. Max: `1`. |
| `heap_variance` | number | no | The heap usage variance required for an individual parent task before it is considered for cancellation. A task is considered for cancellation when taskHeapUsage is greater than or equal to heapUsageMovingAverage * variance. Default is 2.0<br/><br/>Min: `0`. |
| `total_heap_percent_threshold` | number | no | The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied. Default is 0.5<br/><br/>Min: `0`. Max: `1`. |

### Shard Indexing Pressure {#shard-indexing-pressure}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | no | Enable or disable shard indexing backpressure. Default is false |
| `enforced` | boolean | no | Run shard indexing backpressure in shadow mode or enforced mode. In shadow mode (value set as false), shard indexing backpressure tracks all granular-level metrics, but it doesn’t actually reject any indexing requests. In enforced mode (value set as true), shard indexing backpressure rejects any requests to the cluster that might cause a dip in its performance. Default is false |
| `operating_factor` | [Operating Factor](/reference/api/_schemas/json-schema-opensearch/#operating-factor) | no |  |
| `primary_parameter` | [Primary Parameter](/reference/api/_schemas/json-schema-opensearch/#primary-parameter) | no |  |

### Primary Parameter {#primary-parameter}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `node` | [Node](/reference/api/_schemas/json-schema-opensearch/#node) | no |  |
| `shard` | [Shard](/reference/api/_schemas/json-schema-opensearch/#shard) | no |  |

### Shard {#shard}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `min_limit` | number | no | Specify the minimum assigned quota for a new shard in any role (coordinator, primary, or replica). Shard indexing backpressure increases or decreases this allocated quota based on the inflow of traffic for the shard. Default is 0.001<br/><br/>Min: `0`. |

### Node {#node}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `soft_limit` | number | no | Define the percentage of the node-level memory threshold that acts as a soft indicator for strain on a node. Default is 0.7<br/><br/>Min: `0`. |

### Operating Factor {#operating-factor}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `lower` | number | no | Specify the lower occupancy limit of the allocated quota of memory for the shard. If the total memory usage of a shard is below this limit, shard indexing backpressure decreases the current allocated memory for that shard. Default is 0.75<br/><br/>Min: `0`. |
| `optimal` | number | no | Specify the optimal occupancy of the allocated quota of memory for the shard. If the total memory usage of a shard is at this level, shard indexing backpressure doesn’t change the current allocated memory for that shard. Default is 0.85<br/><br/>Min: `0`. |
| `upper` | number | no | Specify the upper occupancy limit of the allocated quota of memory for the shard. If the total memory usage of a shard is above this limit, shard indexing backpressure increases the current allocated memory for that shard. Default is 0.95<br/><br/>Min: `0`. |

### Email Sender {#email-sender}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `email_sender_name` | string | **yes** | This should be identical to the Sender name defined in Opensearch dashboards<br/><br/>Max length: `40`. |
| `email_sender_password` | string | **yes** | Sender password for Opensearch alerts to authenticate with SMTP server<br/><br/>Max length: `1024`. |
| `email_sender_username` | string | **yes** | Max length: `320`. |

### Auth Failure Listeners {#auth-failure-listeners}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `internal_authentication_backend_limiting` | [Internal Authentication Backend Limiting](/reference/api/_schemas/json-schema-opensearch/#internal-authentication-backend-limiting) | no |  |
| `ip_rate_limiting` | [IP Rate Limiting](/reference/api/_schemas/json-schema-opensearch/#ip-rate-limiting) | no |  |

### Internal Authentication Backend Limiting {#internal-authentication-backend-limiting}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_tries` | integer | no | The number of login attempts allowed before login is blocked<br/><br/>Min: `0`. Max: `2.147483647e+09`. |
| `authentication_backend` | string | no | The internal backend. Enter `internal`<br/><br/>Allowed values: `internal`.<br/><br/>Max length: `1024`. |
| `block_expiry_seconds` | integer | no | The duration of time that login remains blocked after a failed login<br/><br/>Min: `0`. Max: `2.147483647e+09`. |
| `max_blocked_clients` | integer | no | The maximum number of blocked IP addresses<br/><br/>Min: `0`. Max: `2.147483647e+09`. |
| `max_tracked_clients` | integer | no | The maximum number of tracked IP addresses that have failed login<br/><br/>Min: `0`. Max: `2.147483647e+09`. |
| `time_window_seconds` | integer | no | The window of time in which the value for `allowed_tries` is enforced<br/><br/>Min: `0`. Max: `2.147483647e+09`. |
| `type` | string | no | The type of rate limiting<br/><br/>Allowed values: `username`.<br/><br/>Max length: `1024`. |

### IP Rate Limiting {#ip-rate-limiting}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_tries` | integer | no | The number of login attempts allowed before login is blocked<br/><br/>Min: `1`. Max: `2.147483647e+09`. |
| `block_expiry_seconds` | integer | no | The duration of time that login remains blocked after a failed login<br/><br/>Min: `1`. Max: `36000`. |
| `max_blocked_clients` | integer | no | The maximum number of blocked IP addresses<br/><br/>Min: `0`. Max: `2.147483647e+09`. |
| `max_tracked_clients` | integer | no | The maximum number of tracked IP addresses that have failed login<br/><br/>Min: `0`. Max: `2.147483647e+09`. |
| `time_window_seconds` | integer | no | The window of time in which the value for `allowed_tries` is enforced<br/><br/>Min: `1`. Max: `36000`. |
| `type` | string | no | The type of rate limiting<br/><br/>Allowed values: `ip`.<br/><br/>Max length: `1024`. |

### Ism History {#ism-history}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `ism_enabled` | boolean | **yes** | Default: `true`. |
| `ism_history_enabled` | boolean | no | Default: `true`. |
| `ism_history_max_age` | integer | no | Min: `1`. Max: `2.147483647e+09`. Default: `24`. |
| `ism_history_max_docs` | integer | no | Min: `1`. Max: `9.223372036854776e+18`. Default: `2500000`. |
| `ism_history_rollover_check_period` | integer | no | Min: `1`. Max: `2.147483647e+09`. Default: `8`. |
| `ism_history_rollover_retention_period` | integer | no | Min: `1`. Max: `2.147483647e+09`. Default: `30`. |

