Wanted to monitor elasticsearch and opensearch through check_mk

No, this will connect to your elasticsearch instance directly via the API.