Révision 007c2825
Fixed indentation + configurable SDK path
| plugins/minecraft/minecraft-jsonapi-players | ||
|---|---|---|
| 16 | 16 |
|
| 17 | 17 |
/** |
| 18 | 18 |
* JSONAPI configuration |
| 19 |
* (get the SDK php file here: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php) |
|
| 19 | 20 |
*/ |
| 20 | 21 |
|
| 22 |
$apisdk = '/var/cache/munin/JSONAPI.php'; |
|
| 21 | 23 |
$hostname = 'your-hostname'; |
| 22 | 24 |
$username = 'your-username'; |
| 23 | 25 |
$password = 'your-password'; |
| ... | ... | |
| 30 | 32 |
|
| 31 | 33 |
if ((count($argv) > 1) && ($argv[1] == 'config')) |
| 32 | 34 |
{
|
| 33 |
print("graph_title Bukkit / JSONAPI - players online
|
|
| 35 |
print("graph_title Bukkit / JSONAPI - players online
|
|
| 34 | 36 |
graph_category bukkit_jsonapi |
| 35 | 37 |
graph_vlabel players |
| 36 | 38 |
graph_args --base 1000 -l 0 |
| 37 | 39 |
players.type GAUGE |
| 38 | 40 |
players.label players |
| 39 | 41 |
"); |
| 40 |
exit(); |
|
| 42 |
exit();
|
|
| 41 | 43 |
} |
| 42 | 44 |
|
| 43 |
// Include JSONAPI.php SDK (get this file here: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php)
|
|
| 44 |
require('/var/cache/munin/JSONAPI.php');
|
|
| 45 |
// Include JSONAPI.php |
|
| 46 |
require($apisdk);
|
|
| 45 | 47 |
|
| 46 | 48 |
// Prepare API call |
| 47 | 49 |
$api = new JSONAPI($hostname, $port, $username, $password, $salt); |
| plugins/minecraft/minecraft-jsonapi-ramusage | ||
|---|---|---|
| 16 | 16 |
|
| 17 | 17 |
/** |
| 18 | 18 |
* JSONAPI configuration |
| 19 |
* (get the SDK php file here: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php) |
|
| 19 | 20 |
*/ |
| 20 | 21 |
|
| 22 |
$apisdk = '/var/cache/munin/JSONAPI.php'; |
|
| 21 | 23 |
$hostname = 'your-hostname'; |
| 22 | 24 |
$username = 'your-username'; |
| 23 | 25 |
$password = 'your-password'; |
| ... | ... | |
| 30 | 32 |
|
| 31 | 33 |
if ((count($argv) > 1) && ($argv[1] == 'config')) |
| 32 | 34 |
{
|
| 33 |
print("graph_title Bukkit / JSONAPI - RAM usage
|
|
| 35 |
print("graph_title Bukkit / JSONAPI - RAM usage
|
|
| 34 | 36 |
graph_category bukkit_jsonapi |
| 35 | 37 |
graph_vlabel RAM usage in GB |
| 36 | 38 |
graph_args --base 1024 -l 0 |
| ... | ... | |
| 39 | 41 |
used.label used |
| 40 | 42 |
used.type GAUGE |
| 41 | 43 |
"); |
| 42 |
exit(); |
|
| 44 |
exit();
|
|
| 43 | 45 |
} |
| 44 | 46 |
|
| 45 |
// Include JSONAPI.php SDK (get this file here: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php)
|
|
| 46 |
require('/var/cache/munin/JSONAPI.php');
|
|
| 47 |
// Include JSONAPI.php |
|
| 48 |
require($apisdk);
|
|
| 47 | 49 |
|
| 48 | 50 |
// Prepare API call |
| 49 | 51 |
$api = new JSONAPI($hostname, $port, $username, $password, $salt); |
| plugins/minecraft/minecraft-jsonapi-tps | ||
|---|---|---|
| 16 | 16 |
|
| 17 | 17 |
/** |
| 18 | 18 |
* JSONAPI configuration |
| 19 |
* (get the SDK php file here: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php) |
|
| 19 | 20 |
*/ |
| 20 | 21 |
|
| 22 |
$apisdk = '/var/cache/munin/JSONAPI.php'; |
|
| 21 | 23 |
$hostname = 'your-hostname'; |
| 22 | 24 |
$username = 'your-username'; |
| 23 | 25 |
$password = 'your-password'; |
| ... | ... | |
| 30 | 32 |
|
| 31 | 33 |
if ((count($argv) > 1) && ($argv[1] == 'config')) |
| 32 | 34 |
{
|
| 33 |
print("graph_title Bukkit / JSONAPI - ticks per second (TPS)
|
|
| 35 |
print("graph_title Bukkit / JSONAPI - ticks per second (TPS)
|
|
| 34 | 36 |
graph_category bukkit_jsonapi |
| 35 | 37 |
graph_vlabel ticks per second |
| 36 | 38 |
graph_args --base 1000 -l 0 |
| 37 | 39 |
tps.type GAUGE |
| 38 | 40 |
tps.label TPS |
| 39 | 41 |
"); |
| 40 |
exit(); |
|
| 42 |
exit();
|
|
| 41 | 43 |
} |
| 42 | 44 |
|
| 43 |
// Include JSONAPI.php SDK (get this file here: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php)
|
|
| 44 |
require('/var/cache/munin/JSONAPI.php');
|
|
| 45 |
// Include JSONAPI.php |
|
| 46 |
require($apisdk);
|
|
| 45 | 47 |
|
| 46 | 48 |
// Prepare API call |
| 47 | 49 |
$api = new JSONAPI($hostname, $port, $username, $password, $salt); |
| plugins/minecraft/minecraft-sql-statistician-hostile-kills | ||
|---|---|---|
| 31 | 31 |
|
| 32 | 32 |
if ((count($argv) > 1) && ($argv[1] == 'config')) |
| 33 | 33 |
{
|
| 34 |
print("graph_title Bukkit / Statistician - hostile mob kills per day
|
|
| 34 |
print("graph_title Bukkit / Statistician - hostile mob kills per day
|
|
| 35 | 35 |
graph_category bukkit_sql_kills |
| 36 | 36 |
graph_vlabel hostile mob kills per day |
| 37 | 37 |
graph_args --base 1000 -l 0 |
| ... | ... | |
| 62 | 62 |
wither.type GAUGE |
| 63 | 63 |
wither.label killed withers |
| 64 | 64 |
"); |
| 65 |
exit(); |
|
| 65 |
exit();
|
|
| 66 | 66 |
} |
| 67 | 67 |
|
| 68 | 68 |
## Construct 'minumum' timstamp |
| plugins/minecraft/minecraft-sql-statistician-neutral-kills | ||
|---|---|---|
| 31 | 31 |
|
| 32 | 32 |
if ((count($argv) > 1) && ($argv[1] == 'config')) |
| 33 | 33 |
{
|
| 34 |
print("graph_title Bukkit / Statistician - neutral mob kills per day
|
|
| 34 |
print("graph_title Bukkit / Statistician - neutral mob kills per day
|
|
| 35 | 35 |
graph_category bukkit_sql_kills |
| 36 | 36 |
graph_vlabel neutral mob kills per day |
| 37 | 37 |
graph_args --base 1000 -l 0 |
| ... | ... | |
| 44 | 44 |
snowman.type GAUGE |
| 45 | 45 |
snowman.label killed snowmen |
| 46 | 46 |
"); |
| 47 |
exit(); |
|
| 47 |
exit();
|
|
| 48 | 48 |
} |
| 49 | 49 |
|
| 50 | 50 |
// Construct 'minumum' timstamp |
| plugins/minecraft/minecraft-sql-statistician-newplayers | ||
|---|---|---|
| 31 | 31 |
|
| 32 | 32 |
if ((count($argv) > 1) && ($argv[1] == 'config')) |
| 33 | 33 |
{
|
| 34 |
print("graph_title Bukkit / Statistician - new players per day
|
|
| 34 |
print("graph_title Bukkit / Statistician - new players per day
|
|
| 35 | 35 |
graph_category bukkit_sql |
| 36 | 36 |
graph_vlabel new players per day |
| 37 | 37 |
graph_args --base 1000 -l 0 |
| 38 | 38 |
players.type GAUGE |
| 39 | 39 |
players.label new players |
| 40 | 40 |
"); |
| 41 |
exit(); |
|
| 41 |
exit();
|
|
| 42 | 42 |
} |
| 43 | 43 |
|
| 44 | 44 |
// Construct 'minumum' timstamp |
| plugins/minecraft/minecraft-sql-statistician-passive-kills | ||
|---|---|---|
| 31 | 31 |
|
| 32 | 32 |
if ((count($argv) > 1) && ($argv[1] == 'config')) |
| 33 | 33 |
{
|
| 34 |
print("graph_title Bukkit / Statistician - passive mob kills per day
|
|
| 34 |
print("graph_title Bukkit / Statistician - passive mob kills per day
|
|
| 35 | 35 |
graph_category bukkit_sql_kills |
| 36 | 36 |
graph_vlabel passive mob kills per day |
| 37 | 37 |
graph_args --base 1000 -l 0 |
| ... | ... | |
| 54 | 54 |
villager.type GAUGE |
| 55 | 55 |
villager.label killed villager |
| 56 | 56 |
"); |
| 57 |
exit(); |
|
| 57 |
exit();
|
|
| 58 | 58 |
} |
| 59 | 59 |
|
| 60 | 60 |
// Construct 'minumum' timstamp |
| plugins/minecraft/minecraft-sql-ultrabans-shame | ||
|---|---|---|
| 32 | 32 |
|
| 33 | 33 |
if ((count($argv) > 1) && ($argv[1] == 'config')) |
| 34 | 34 |
{
|
| 35 |
print("graph_title Bukkit / Ultrabans - shame per day
|
|
| 35 |
print("graph_title Bukkit / Ultrabans - shame per day
|
|
| 36 | 36 |
graph_category bukkit_sql |
| 37 | 37 |
graph_vlabel amount of shame per day |
| 38 | 38 |
graph_args --base 1000 -l 0 |
| ... | ... | |
| 55 | 55 |
mute.type GAUGE |
| 56 | 56 |
mute.label mutes |
| 57 | 57 |
"); |
| 58 |
exit(); |
|
| 58 |
exit();
|
|
| 59 | 59 |
} |
| 60 | 60 |
|
| 61 | 61 |
// Construct 'minumum' timstamp |
Formats disponibles : Unified diff