mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add the ability to run poller without updating rrds. add --rigid to graphs.
git-svn-id: http://www.observium.org/svn/observer/trunk@3124 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -12,6 +12,7 @@ if ($_GET['title'] == "yes") { $rrd_options .= " --title='".$graph_title."' ";
|
|||||||
if (isset($_GET['graph_title'])) { $rrd_options .= " --title='".$_GET['graph_title']."' "; }
|
if (isset($_GET['graph_title'])) { $rrd_options .= " --title='".$_GET['graph_title']."' "; }
|
||||||
|
|
||||||
if (!isset($scale_min) && !isset($scale_max)) { $rrd_options .= " --alt-autoscale-max"; }
|
if (!isset($scale_min) && !isset($scale_max)) { $rrd_options .= " --alt-autoscale-max"; }
|
||||||
|
if (!isset($scale_min) && !isset($scale_max) && !isset($norigid)) { $rrd_options .= " --rigid"; }
|
||||||
|
|
||||||
if (isset($scale_min)) { $rrd_options .= " -l $scale_min"; }
|
if (isset($scale_min)) { $rrd_options .= " -l $scale_min"; }
|
||||||
if (isset($scale_max)) { $rrd_options .= " -u $scale_max"; }
|
if (isset($scale_max)) { $rrd_options .= " -u $scale_max"; }
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ function truncate($substring, $max = 50, $rep = '...')
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mres($string)
|
function mres($string)
|
||||||
{ // short function wrapper because the real one is stupidly long and ugly. aestetics.
|
{ // short function wrapper because the real one is stupidly long and ugly. aesthetics.
|
||||||
return mysql_real_escape_string($string);
|
return mysql_real_escape_string($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
## FIXME - seems to be broken. IPs appear with leading zeroes.
|
||||||
|
|
||||||
$ipsec_array = snmpwalk_cache_oid($device, "cipSecTunnelEntry", array(), "CISCO-IPSEC-FLOW-MONITOR-MIB");
|
$ipsec_array = snmpwalk_cache_oid($device, "cipSecTunnelEntry", array(), "CISCO-IPSEC-FLOW-MONITOR-MIB");
|
||||||
$ike_array = snmpwalk_cache_oid($device, "cikeTunnelEntry", array(), "CISCO-IPSEC-FLOW-MONITOR-MIB");
|
$ike_array = snmpwalk_cache_oid($device, "cikeTunnelEntry", array(), "CISCO-IPSEC-FLOW-MONITOR-MIB");
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,12 @@ function rrdtool($command, $filename, $options)
|
|||||||
$cmd .= " --daemon " . $config['rrdcached'];
|
$cmd .= " --daemon " . $config['rrdcached'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($config['norrd'])
|
||||||
|
{
|
||||||
|
print Console_Color::convert("%g RRD Disabled %n", false);
|
||||||
|
} else {
|
||||||
fwrite($rrd_pipes[0], $cmd."\n");
|
fwrite($rrd_pipes[0], $cmd."\n");
|
||||||
|
}
|
||||||
|
|
||||||
if ($debug)
|
if ($debug)
|
||||||
{
|
{
|
||||||
@@ -189,7 +194,12 @@ function rrdtool_create($filename, $options)
|
|||||||
{
|
{
|
||||||
global $config, $debug;
|
global $config, $debug;
|
||||||
|
|
||||||
|
if($config['norrd'])
|
||||||
|
{
|
||||||
|
print Console_Color::convert("%g RRD Disabled %n", false);
|
||||||
|
} else {
|
||||||
$command = $config['rrdtool'] . " create $filename $options";
|
$command = $config['rrdtool'] . " create $filename $options";
|
||||||
|
}
|
||||||
if ($debug) { echo($command."\n"); }
|
if ($debug) { echo($command."\n"); }
|
||||||
|
|
||||||
return shell_exec($command);
|
return shell_exec($command);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ include("includes/polling/functions.inc.php");
|
|||||||
$poller_start = utime();
|
$poller_start = utime();
|
||||||
echo("Observium Poller v".$config['version']."\n\n");
|
echo("Observium Poller v".$config['version']."\n\n");
|
||||||
|
|
||||||
$options = getopt("h:m:i:n:d::a::");
|
$options = getopt("h:m:i:n:d:r::a::");
|
||||||
|
|
||||||
if ($options['h'] == "odd") { $options['n'] = "1"; $options['i'] = "2"; }
|
if ($options['h'] == "odd") { $options['n'] = "1"; $options['i'] = "2"; }
|
||||||
elseif ($options['h'] == "even") { $options['n'] = "0"; $options['i'] = "2"; }
|
elseif ($options['h'] == "even") { $options['n'] = "0"; $options['i'] = "2"; }
|
||||||
@@ -64,6 +64,7 @@ if (!$where)
|
|||||||
echo("-i <instances> -n <number> Poll as instance <number> of <instances>\n");
|
echo("-i <instances> -n <number> Poll as instance <number> of <instances>\n");
|
||||||
echo(" Instances start at 0. 0-3 for -n 4\n\n");
|
echo(" Instances start at 0. 0-3 for -n 4\n\n");
|
||||||
echo("Debugging and testing options:\n");
|
echo("Debugging and testing options:\n");
|
||||||
|
echo("-r Do not create or update RRDs\n");
|
||||||
echo("-d Enable debugging output\n");
|
echo("-d Enable debugging output\n");
|
||||||
echo("-m Specify module(s) to be run\n");
|
echo("-m Specify module(s) to be run\n");
|
||||||
echo("\n");
|
echo("\n");
|
||||||
@@ -87,6 +88,11 @@ if (isset($options['d']))
|
|||||||
# ini_set('error_reporting', 0);
|
# ini_set('error_reporting', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($options['r']))
|
||||||
|
{
|
||||||
|
$config['norrd'] = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
rrdtool_pipe_open($rrd_process, $rrd_pipes);
|
rrdtool_pipe_open($rrd_process, $rrd_pipes);
|
||||||
|
|
||||||
echo("Starting polling run:\n\n");
|
echo("Starting polling run:\n\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user