fix services stuff

git-svn-id: http://www.observium.org/svn/observer/trunk@3090 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-04-26 13:05:52 +00:00
parent 4045c970af
commit 77d055f9d6
4 changed files with 26 additions and 40 deletions

View File

@@ -3,6 +3,8 @@
chdir(dirname($argv[0]));
$debug=1;
include("includes/defaults.inc.php");
include("config.php");
include("includes/functions.php");
@@ -58,16 +60,15 @@ foreach (dbFetchRows("SELECT * FROM `devices` AS D, `services` AS S WHERE S.devi
if (!is_file($rrd))
{
rrdtool_create($rrd,"--step 300 \
DS:status:GAUGE:600:0:1 \
RRA:AVERAGE:0.5:1:1200 \
RRA:AVERAGE:0.5:12:2400");
rrdtool_create ($rrd, "DS:status:GAUGE:600:0:1 ".$config['rrd_rra']);
}
if ($status == "1" || $status == "0")
{
rrdtool_update($rrd,"N:".$status);
} else {
rrdtool_update($rrd,"N:U");
}
} # while
?>