Files
librenms-librenms/html/graph.php

39 lines
740 B
PHP
Raw Normal View History

<?php
/**
2016-08-20 12:16:55 +01:00
* LibreNMS
*
2016-08-20 12:16:55 +01:00
* This file is part of LibreNMS.
*
2016-08-20 12:16:55 +01:00
* @package librenms
2013-10-29 05:38:12 +10:00
* @subpackage graphing
* @copyright (C) 2006 - 2012 Adam Armstrong
*/
use LibreNMS\Authentication\LegacyAuth;
2015-07-13 20:10:26 +02:00
$start = microtime(true);
$init_modules = array('web', 'graphs', 'auth');
require realpath(__DIR__ . '/..') . '/includes/init.php';
$auth = LegacyAuth::check() || is_client_authorized($_SERVER['REMOTE_ADDR']);
if (!$auth) {
die('Unauthorized');
}
set_debug(isset($_GET['debug']));
rrdtool_initialize(false);
require $config['install_dir'] . '/includes/html/graphs/graph.inc.php';
rrdtool_close();
if ($debug) {
echo '<br />';
printf("Runtime %.3fs", microtime(true) - $start);
echo '<br />';
printStats();
}