telemetry: include more detailed server egg and nest usage
This commit is contained in:
parent
6272bb6710
commit
250c557e23
2 changed files with 11 additions and 2 deletions
|
@ -116,9 +116,11 @@ class TelemetryCollectionService
|
||||||
'backup' => [
|
'backup' => [
|
||||||
'type' => config('backups.default'),
|
'type' => config('backups.default'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'cache' => [
|
'cache' => [
|
||||||
'type' => config('cache.default'),
|
'type' => config('cache.default'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'database' => [
|
'database' => [
|
||||||
'type' => config('database.default'),
|
'type' => config('database.default'),
|
||||||
'version' => DB::getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION),
|
'version' => DB::getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION),
|
||||||
|
@ -139,7 +141,10 @@ class TelemetryCollectionService
|
||||||
|
|
||||||
'eggs' => [
|
'eggs' => [
|
||||||
'count' => Egg::count(),
|
'count' => Egg::count(),
|
||||||
'ids' => Egg::pluck('uuid')->toArray(),
|
'server_usage' => Egg::all()
|
||||||
|
->flatMap(fn (Egg $egg) => [$egg->uuid => $egg->servers->count()])
|
||||||
|
->filter(fn (int $count) => $count > 0)
|
||||||
|
->toArray(),
|
||||||
],
|
],
|
||||||
|
|
||||||
'locations' => [
|
'locations' => [
|
||||||
|
@ -152,6 +157,10 @@ class TelemetryCollectionService
|
||||||
|
|
||||||
'nests' => [
|
'nests' => [
|
||||||
'count' => Nest::count(),
|
'count' => Nest::count(),
|
||||||
|
'server_usage' => Nest::all()
|
||||||
|
->flatMap(fn (Nest $nest) => [$nest->uuid => $nest->eggs->sum(fn (Egg $egg) => $egg->servers->count())])
|
||||||
|
->filter(fn (int $count) => $count > 0)
|
||||||
|
->toArray(),
|
||||||
],
|
],
|
||||||
|
|
||||||
'nodes' => [
|
'nodes' => [
|
||||||
|
|
|
@ -187,6 +187,6 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'telemetry' => [
|
'telemetry' => [
|
||||||
'enabled' => env('PTERODACTYL_TELEMETRY_ENABLED', false),
|
'enabled' => env('PTERODACTYL_TELEMETRY_ENABLED', true),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue