#!/usr/bin/env php $status, 'service_message' => $check, 'service_checked' => time()), $update); dbUpdate($update, 'services', '`service_id` = ?', array($service['service_id'])); unset($update); } else { $status = "0"; } $rrd = $config['rrd_dir'] . "/" . $service['hostname'] . "/" . safename("service-" . $service['service_type'] . "-" . $service['service_id'] . ".rrd"); 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"); } if ($status == "1" || $status == "0") { rrdtool_update($rrd,"N:".$status); } } # while ?>