|
@@ -78,6 +78,7 @@ class CmtsInterfaceStatsCommand extends BaseCmtsCommand
|
|
|
|
|
|
$cmCached = $this->getData($key_cm_scan, true);
|
|
|
$states = array();
|
|
|
+ $cmtsStatus = array(0 => 0, 1 => 0);
|
|
|
|
|
|
if(empty($cmCached)) {
|
|
|
$this->output->writeln("Se requiere {$key_cm_scan} para obtener cantidad de CM por Interface.");
|
|
@@ -93,6 +94,8 @@ class CmtsInterfaceStatsCommand extends BaseCmtsCommand
|
|
|
$states[$up][$state]++;
|
|
|
$states[$down][$state]++;
|
|
|
|
|
|
+ $cmtsStatus[$state]++;
|
|
|
+
|
|
|
$mac = strtolower($value['mac']);
|
|
|
$sendData["cm_status_{$mac}"] = "{$state}|g";
|
|
|
}
|
|
@@ -143,6 +146,9 @@ class CmtsInterfaceStatsCommand extends BaseCmtsCommand
|
|
|
$this->setData($key_ifs_stats, $ifStatsCached, true);
|
|
|
}
|
|
|
|
|
|
+ $sendData["{$subId}_state_on"] = "{$cmtsStatus[1]}|g";
|
|
|
+ $sendData["{$subId}_state_off"] = "{$cmtsStatus[0]}|g";
|
|
|
+
|
|
|
if($sendData && $saveHistoric) {
|
|
|
$t_start_script = microtime(true);
|
|
|
$statsdService = $this->getContainer()->get('statsd');
|