Putting this here for anyone who would benefit from a revamp.
At the time of posting this, working great with 1.20.2. Surely will work great with later versions too. I made it so all you have to specify is the host IP (and port if it is not default). The rest is automatic. No more having to specify your Minecraft version, nor modify the check command every time you upgrade your Minecraft server.
Putting this here for anyone who would benefit from a revamp.
At the time of posting this, working great with 1.20.2. Surely will work great with later versions too. I made it so all you have to specify is the host IP (and port if it is not default). The rest is automatic. No more having to specify your Minecraft version, nor modify the check command every time you upgrade your Minecraft server.
https://github.com/NEMSLinux/nems-plugins/blob/main/debpack/usr/lib/nagios/plugins/check_minecraft
It's built-in to NEMS Linux 1.6.
Jon - thank you for the great starting point, and your contribution to Open Source!