initial commit
This commit is contained in:
21
app/Console/Commands/CollectVmMetricsCommand.php
Normal file
21
app/Console/Commands/CollectVmMetricsCommand.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user