|
@@ -78,7 +78,7 @@ class GenerateRemoteCrontabCommand extends ContainerAwareCommand
|
|
$routing_key = "--route={$routing_key}";
|
|
$routing_key = "--route={$routing_key}";
|
|
}
|
|
}
|
|
|
|
|
|
- $content .= "*/5 * * * * {$pathConsole} {$amqpRemote} {$routing_key} stats:crontab:remote" . PHP_EOL;
|
|
|
|
|
|
+ $content .= "*/5 * * * * {$pathConsole} stats:crontab:remote" . PHP_EOL;
|
|
|
|
|
|
foreach ($serverDevices as $server) {
|
|
foreach ($serverDevices as $server) {
|
|
|
|
|
|
@@ -95,14 +95,19 @@ class GenerateRemoteCrontabCommand extends ContainerAwareCommand
|
|
$commands = array();
|
|
$commands = array();
|
|
$data = $device->jsonExtraData();
|
|
$data = $device->jsonExtraData();
|
|
|
|
|
|
- if ($data['executeSnmp'] == 0)
|
|
|
|
|
|
+ if ($data['executeSnmp'] == 0){
|
|
|
|
+ $content .= PHP_EOL . PHP_EOL . "# Device {$deviceId} skiped, executeSnmp is 0" . PHP_EOL;
|
|
continue;
|
|
continue;
|
|
-
|
|
|
|
- if (!in_array($data['mark'], $oltMarks))
|
|
|
|
|
|
+ }
|
|
|
|
+ if (!in_array($data['mark'], $oltMarks)){
|
|
|
|
+ $content .= PHP_EOL . PHP_EOL . "# Device {$deviceId} skiped, mark is not one of " . implode(", ", $oltMarks). PHP_EOL;
|
|
continue;
|
|
continue;
|
|
|
|
+ }
|
|
|
|
|
|
- if (!in_array($data['library'], $oltLibraries))
|
|
|
|
|
|
+ if (!in_array($data['library'], $oltLibraries)){
|
|
|
|
+ $content .= PHP_EOL . PHP_EOL . "# Device {$deviceId} skiped, library is not one of " . implode(", ", $oltLibraries). PHP_EOL;
|
|
continue;
|
|
continue;
|
|
|
|
+ }
|
|
|
|
|
|
$oltName = $data['name'];
|
|
$oltName = $data['name'];
|
|
$mark = strtolower($data['mark']);
|
|
$mark = strtolower($data['mark']);
|