Finally i found what was missing
inside logstash.yml you have to put xpack.monitoring.elasticsearch.username and xpack.monitoring.elasticsearch.password .
I don't know why these fields are not specified in logstash.yml | Logstash Reference [8.4] | Elastic
3 Likes