This script provides the number of Minecraft users logged into the target Minecraft server.

This script requires:

1) Download and install Dinnerbone's mcstatus scripts and,

    found here:

2) Set MC_SERVER_PORT variable if the Minecraft server port on target server differs

     from default of 25565

    ***NOTE:MC_SERVER_PORT is UDP, not TCP as the minecraft client connections are, which

          means that you may need to open this port in your firewall config

3) On your MineCraft server, set enable-query=true in

4) Set MC_QUERY_CLI_LOC variable with name and location of script

**In Nagios command.cfg:

define command{

        command_name    check_minecraft_users

        command_line    $USER1$/ $HOSTADDRESS$ $ARG1$ $ARG2$ nagios


**In Nagios services.cfg

define service{

        use                             service_1_min      

        host_name                       remotehost1,remotehost2

        service_description             minecraft users

        check_command                   check_minecraft_users!15!20

        max_check_attempts              7

        contact_groups                  admins


For Cacti, you will likely need to change the path in the

Data Input Method for minecraft_users_connected to match your systems

Info on importing into Cacti:\_import.html