Removed old unused version checking

This commit is contained in:
Mike Rostermund
2015-10-09 15:16:29 +02:00
parent 9a0fac9a52
commit 0d645d0349
3 changed files with 0 additions and 79 deletions

View File

@@ -120,10 +120,6 @@ if ($discovered_devices) {
$string = $argv[0]." $doing ".date($config['dateformat']['compact'])." - $discovered_devices devices discovered in $proctime secs";
d_echo("$string\n");
if ($options['h'] != 'new' && $config['version_check']) {
include 'includes/versioncheck.inc.php';
}
if (!isset($options['q'])) {
echo ('MySQL: Cell['.($db_stats['fetchcell'] + 0).'/'.round(($db_stats['fetchcell_sec'] + 0), 2).'s]'.' Row['.($db_stats['fetchrow'] + 0).'/'.round(($db_stats['fetchrow_sec'] + 0), 2).'s]'.' Rows['.($db_stats['fetchrows'] + 0).'/'.round(($db_stats['fetchrows_sec'] + 0), 2).'s]'.' Column['.($db_stats['fetchcol'] + 0).'/'.round(($db_stats['fetchcol_sec'] + 0), 2).'s]'.' Update['.($db_stats['update'] + 0).'/'.round(($db_stats['update_sec'] + 0), 2).'s]'.' Insert['.($db_stats['insert'] + 0).'/'.round(($db_stats['insert_sec'] + 0), 2).'s]'.' Delete['.($db_stats['delete'] + 0).'/'.round(($db_stats['delete_sec'] + 0), 2).'s]');
echo "\n";

View File

@@ -373,8 +373,6 @@ $config['show_overview_tab'] = true;
// The device overview page options
$config['overview_show_sysDescr'] = true;
// Enable version checker & stats
$config['version_check'] = 0;
// Enable checking of version in discovery
// Poller/Discovery Modules
$config['enable_bgp'] = 1;

View File

@@ -1,73 +0,0 @@
<?php
// FIXME: This really does produce valuable data for the project team. We
// need to get some infrastructure going and make it available on an opt-in
// basis (i.e. disabled by default). We should schedule it from cron rather
// than putting it into the discovery process.
// See https://github.com/librenms/librenms/issues/25 for some thoughts on where to go with this code under git.
/*
// Generate some statistics to send along with the version request.
$stats['ports'] = dbFetchCell("SELECT count(*) FROM ports");
$stats['devices'] = dbFetchCell("SELECT count(*) FROM devices");
$stats['sensors'] = dbFetchCell("SELECT count(*) FROM sensors");
$stats['services'] = dbFetchCell("SELECT count(*) FROM services");
$stats['applications'] = dbFetchCell("SELECT count(*) FROM applications");
$stats['bgp'] = dbFetchCell("SELECT count(*) FROM bgpPeers");
foreach (dbFetch("SELECT COUNT(*) AS count,os from devices group by `os`") as $dt_data)
{
$stats['devicetypes'][$dt_data['os']] = $dt_data['count'];
}
$stat_serial = base64_encode(serialize($stats));
#$url = "http://www.observium.org/latest.php?i=".$stats['ports']."&d=".$stats['devices']."&stats=".$stat_serial."&v=".$config['version'];
#$dataHandle = fopen($url, r);
if ($dataHandle)
{
while (!feof($dataHandle))
{
$data.= fread($dataHandle, 4096);
}
if ($data)
{
list($omnipotence, $year, $month, $revision) = explode(".", $data);
list($cur, $tag) = explode("-", $config['version']);
list($cur_omnipotence, $cur_year, $cur_month, $cur_revision) = explode(".", $cur);
if ($argv[1] == "--cron" || isset($options['q']))
{
$fd = fopen($config['log_file'],'a');
fputs($fd,$string . "\n");
fclose($fd);
shell_exec("echo $omnipotence.$year.$month.$month > ".$config['rrd_dir']."/version.txt ");
} else {
if ($cur != $data)
{
echo("Current Revision : $cur_revision\n");
if ($omnipotence > $cur_revision)
{
echo("New Revision : $omnipotence\n");
}
# if ($omnipotence > $cur_omnipotence)
# {
# echo("New version : $omnipotence.$year.$month.$revision\n");
# } elseif ($year > $cur_year) {
# echo("New version : $omnipotence.$year.$month.$revision\n");
# } elseif ($month > $cur_month) {
# echo("New version : $omnipotence.$year.$month.$revision\n");
# } elseif ($revision > $cur_revision) {
# echo("New release : $omnipotence.$year.$month.$revision\n");
# }
}
}
}
fclose($dataHandle);
}
*/