22 lines
517 B
PHP
22 lines
517 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Services\Hosting\Metrics\MetricsCollectorService;
|
|
use Illuminate\Console\Command;
|
|
|
|
class CollectVmMetricsCommand extends Command
|
|
{
|
|
protected $signature = 'hosting:collect-metrics';
|
|
|
|
protected $description = 'Sammelt VM-Metriken von Proxmox';
|
|
|
|
public function handle(MetricsCollectorService $collector): int
|
|
{
|
|
$count = $collector->collectAll();
|
|
$this->info("Metriken für {$count} VM(s) erfasst.");
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|