mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@3117 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -27,9 +27,9 @@ $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-drbd-".$
|
||||
}
|
||||
|
||||
$ds_list = array('ns','nr','dw','dr','al','bm','lo','pe','ua','ap','oos');
|
||||
foreach($ds_list as $ds)
|
||||
foreach ($ds_list as $ds)
|
||||
{
|
||||
if(empty($drbd[$ds])) { $drbd[$ds] = "U"; }
|
||||
if (empty($drbd[$ds])) { $drbd[$ds] = "U"; }
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_filename, "N:".$drbd['ns'].":".$drbd['nr'].":".$drbd['dw'].":".$drbd['dr'].":".$drbd['al'].":".$drbd['bm'].":".$drbd['lo'].":".$drbd['pe'].":".$drbd['ua'].":".$drbd['ap'].":".$drbd['oop']);
|
||||
|
||||
@@ -33,12 +33,11 @@ echo("memcached(".$app['app_instance'].") ");
|
||||
'connection_structures','bytes','cmd_get','cmd_set','get_hits','get_misses','evictions','bytes_read','bytes_written');
|
||||
|
||||
$values = array();
|
||||
foreach ($dslist as $ds)
|
||||
foreach ($dslist as $ds)
|
||||
{
|
||||
$values[] = isset($data[$ds]) ? $data[$ds] : -1;
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_filename, "N:".implode(":", $values));
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -241,5 +241,4 @@ if (!is_file($mysql_status_rrd))
|
||||
|
||||
rrdtool_update($mysql_status_rrd, "N:$string");
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -139,7 +139,7 @@ function poll_device($device, $options)
|
||||
|
||||
if ($options['m'])
|
||||
{
|
||||
foreach(explode(",", $options['m']) as $module)
|
||||
foreach (explode(",", $options['m']) as $module)
|
||||
{
|
||||
if (is_file("includes/polling/".$module.".inc.php"))
|
||||
{
|
||||
|
||||
@@ -40,11 +40,11 @@ if($device['os_group'] == "unix")
|
||||
list($section, $data) = explode(">>>", $section);
|
||||
list($sa, $sb) = explode("-", $section, 2);
|
||||
|
||||
if($section == "apache") { $sa = "app"; $sb = "apache"; }
|
||||
if($section == "mysql") { $sa = "app"; $sb = "mysql"; }
|
||||
# if($section == "drbd") { $sa = "app"; $sb = "drbd"; }
|
||||
if ($section == "apache") { $sa = "app"; $sb = "apache"; }
|
||||
if ($section == "mysql") { $sa = "app"; $sb = "mysql"; }
|
||||
# if ($section == "drbd") { $sa = "app"; $sb = "drbd"; }
|
||||
|
||||
if(!empty($sa) && !empty($sb))
|
||||
if (!empty($sa) && !empty($sb))
|
||||
{
|
||||
$agent_data[$sa][$sb] = trim($data);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user