#!/usr/bin/php 1) && ($argv[1] == 'config')) { 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(); } ## 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'); ## Prepare API call $api = new JSONAPI($hostname, $port, $username, $password, $salt); $result = $api->call("getPlayerCount"); ## Check for success if ($result['result'] == 'success'){ ## Print values print('players.value ' . $result['success'] . "\n"); } ?>