From 62180e6146ef9a85846ef846d9d1e9adaecb72ab Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 3 May 2012 10:45:36 +0000 Subject: [PATCH] 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 --- html/includes/graphs/common.inc.php | 1 + includes/common.php | 2 +- includes/polling/cipsec-tunnels.inc.php | 2 ++ includes/rrdtool.inc.php | 14 ++++++++++++-- poller.php | 8 +++++++- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/html/includes/graphs/common.inc.php b/html/includes/graphs/common.inc.php index 13308f4982..b99545b4c7 100644 --- a/html/includes/graphs/common.inc.php +++ b/html/includes/graphs/common.inc.php @@ -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($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_max)) { $rrd_options .= " -u $scale_max"; } diff --git a/includes/common.php b/includes/common.php index 1de9c3e754..492cf09a29 100644 --- a/includes/common.php +++ b/includes/common.php @@ -287,7 +287,7 @@ function truncate($substring, $max = 50, $rep = '...') } 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); } diff --git a/includes/polling/cipsec-tunnels.inc.php b/includes/polling/cipsec-tunnels.inc.php index 87b7d9a421..daaba56e72 100644 --- a/includes/polling/cipsec-tunnels.inc.php +++ b/includes/polling/cipsec-tunnels.inc.php @@ -1,5 +1,7 @@ -n Poll as instance of \n"); echo(" Instances start at 0. 0-3 for -n 4\n\n"); echo("Debugging and testing options:\n"); + echo("-r Do not create or update RRDs\n"); echo("-d Enable debugging output\n"); echo("-m Specify module(s) to be run\n"); echo("\n"); @@ -87,6 +88,11 @@ if (isset($options['d'])) # ini_set('error_reporting', 0); } +if (isset($options['r'])) +{ + $config['norrd'] = TRUE; +} + rrdtool_pipe_open($rrd_process, $rrd_pipes); echo("Starting polling run:\n\n");