mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Use Measurements for all statistic collection * fix space * Use colors cleanup * fix style * manually fix license notice * add return times and new line * add return times and new line * fix mistake in copyright template * fix style
39 lines
853 B
PHP
39 lines
853 B
PHP
<?php
|
|
/**
|
|
* LibreNMS
|
|
*
|
|
* This file is part of LibreNMS.
|
|
*
|
|
* @copyright (C) 2006 - 2012 Adam Armstrong
|
|
*/
|
|
|
|
use LibreNMS\Data\Store\Datastore;
|
|
use LibreNMS\Util\Debug;
|
|
|
|
$auth = false;
|
|
$start = microtime(true);
|
|
|
|
$init_modules = ['web', 'graphs', 'auth'];
|
|
require realpath(__DIR__ . '/..') . '/includes/init.php';
|
|
|
|
if (! Auth::check()) {
|
|
// check for unauthenticated graphs and set auth
|
|
$auth = is_client_authorized($_SERVER['REMOTE_ADDR']);
|
|
if (! $auth) {
|
|
exit('Unauthorized');
|
|
}
|
|
}
|
|
|
|
Debug::set(isset($_GET['debug']));
|
|
|
|
require \LibreNMS\Config::get('install_dir') . '/includes/html/graphs/graph.inc.php';
|
|
|
|
Datastore::terminate();
|
|
|
|
if (Debug::isEnabled()) {
|
|
echo '<br />';
|
|
printf('Runtime %.3fs', microtime(true) - $start);
|
|
echo '<br />';
|
|
app(\App\Polling\Measure\MeasurementManager::class)->printStats();
|
|
}
|