How to add max buckets

Hi- I keep getting this error-

Is it possible to add the max buckets on kibana? Or do I have to add it on elasticsearch??

Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"too_many_buckets_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10001]. This limit can be set by changing the [search.max_buckets] cluster level setting.","max_buckets":10000},{"type":"too_many_buckets_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10048]. This limit can be set by changing the [search.max_buckets] cluster level setting.","max_buckets":10000}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"securitylogs","node":"jVnX9ZTkRfqTbw4Gz2odGA","reason":{"type":"too_many_buckets_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10001]. This limit can be set by changing the [search.max_buckets] cluster level setting.","max_buckets":10000}},{"shard":4,"index":"securitylogs","node":"jVnX9ZTkRfqTbw4Gz2odGA","reason":{"type":"too_many_buckets_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10048]. This limit can be set by changing the [search.max_buckets] cluster level setting.","max_buckets":10000}}]},"status":503}

Yes, you can change the config on kibana console.

PUT _cluster/settings
{
  "persistent": {
    "search" : {
      "max_buckets" : "20000"
    }
  }
}

hi Melo-

Is that code able to paste under settings?