1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Fixed indentation + configurable SDK path

This commit is contained in:
Jonas Friedmann 2013-04-19 21:56:07 +02:00
parent bed5815230
commit 007c2825a9
8 changed files with 28 additions and 22 deletions

View file

@ -16,8 +16,10 @@
/**
* JSONAPI configuration
* (get the SDK php file here: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php)
*/
$apisdk = '/var/cache/munin/JSONAPI.php';
$hostname = 'your-hostname';
$username = 'your-username';
$password = 'your-password';
@ -30,18 +32,18 @@ $port = 20059;
if ((count($argv) > 1) && ($argv[1] == 'config'))
{
print("graph_title Bukkit / JSONAPI - players online
print("graph_title Bukkit / JSONAPI - players online
graph_category bukkit_jsonapi
graph_vlabel players
graph_args --base 1000 -l 0
players.type GAUGE
players.label players
");
exit();
exit();
}
// Include JSONAPI.php SDK (get this file here: https://github.com/alecgorge/jsonapi/raw/master/sdk/php/JSONAPI.php)
require('/var/cache/munin/JSONAPI.php');
// Include JSONAPI.php
require($apisdk);
// Prepare API call
$api = new JSONAPI($hostname, $port, $username, $password, $salt);