Wanted to monitor elasticsearch and opensearch through check_mk

You don’t have to install anything.
By configuring the bleow rule, you can query your elasticsearch instance directly: