randomhost / icinga-check-minecraft
Provides Icinga check commands for Minecraft.
0.0.7
2018-05-21 16:14 UTC
Requires
- php: >=5.3.0
- randomhost/icinga: ~0.2.1
- randomhost/mcstat: ~0.0.2
Requires (Dev)
- behat/behat: ~2.0
- phpspec/phpspec: ~2.4
- phpunit/phpunit: ~4.0
README
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
License
See LICENSE.txt for full license details.