Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

README.md

Build Status

randomhost/icinga-check-minecraft

This package provides Icinga check commands for Minecraft.

Usage

PlayerCount is currently the only available check but more may follow in the future.

Player count

Checks the amount of players on the server.

Usage example

<?php
namespace randomhost\Icinga\Check\Minecraft;

require_once '/path/to/vendor/autoload.php';

use randomhost\Minecraft\Status as MinecraftStatus;

$mcStat = new MinecraftStatus();

$check = new PlayerCount($mcStat);
$check->setOptions(
    getopt(
        $check->getShortOptions(),
        $check->getLongOptions()
    )
);
$check->run();

echo $check->getMessage();
exit($check->getCode());

This will instantiate the PlayerCount class for the Minecraft server and check the amount of players currently connected to the server.

Command line parameters

Parameter Description
--host Minecraft server IP address or hostname
--port Query port
--thresholdWarning Threshold to trigger the WARNING state
--thresholdCritical Threshold to trigger the CRITICAL state

License

See LICENSE.txt for full license details.

About

Provides Icinga check commands for Minecraft.

Topics

Resources

License

Packages

No packages published

Languages