1. Go to this page and download the library: Download mrtazz/yagd library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mrtazz / yagd example snippets
de_once("../config.php");
use Yagd\CollectdHost;
use Yagd\Page;
$page = new Page($CONFIG);
echo $page->getHeader($CONFIG["title"],
$CONFIG["navitems"]);
foreach($CONFIG["hosts"] as $host => $data) {
$fss = empty($data["filesystems"]) ? [] : $data["filesystems"];
$server = new CollectdHost($host, $data["cpus"], $fss,
$data["interfaces"]);
$server->setGraphiteConfiguration($CONFIG["graphite"]["host"]);
echo "<h2> {$host} </h2>";
$server->render();
}
echo $page->getFooter();