Page MenuHomePhorge

D5014.1775300089.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5014.1775300089.diff

diff --git a/src/app/Http/Controllers/API/V4/MetricsController.php b/src/app/Http/Controllers/API/V4/MetricsController.php
--- a/src/app/Http/Controllers/API/V4/MetricsController.php
+++ b/src/app/Http/Controllers/API/V4/MetricsController.php
@@ -86,6 +86,12 @@
$numberOfSuspendedUsers = User::where('status', '&', User::STATUS_SUSPENDED)->count();
$numberOfRestrictedUsers = User::where('status', '&', User::STATUS_RESTRICTED)->count();
$numberOfWalletsWithBalanceBelowManadate = $this->numberOfWalletsWithBalanceBelowManadate();
+ // Should be ~0 (otherwise a cleanup job failed)
+ $numberOfDeletedUserWithMissingCleanup = User::withTrashed()->whereNotNull('deleted_at')
+ ->where(function ($query) {
+ $query->where('status', '&', User::STATUS_IMAP_READY)
+ ->orWhere('status', '&', User::STATUS_LDAP_READY);
+ })->count();
// phpcs:disable
$text = <<<EOF
@@ -107,6 +113,9 @@
# HELP kolab_wallets_balance_below_mandate_amount_count Number of wallets requiring topup
# TYPE kolab_wallets_balance_below_mandate_amount_count gauge
kolab_wallets_balance_below_mandate_amount{instance="$appDomain", tenant="$tenantId"} $numberOfWalletsWithBalanceBelowManadate
+ # HELP kolab_users_deleted_with_missing_cleanup Number of users that are still imap/ldap ready
+ # TYPE kolab_users_deleted_with_missing_cleanup gauge
+ kolab_users_deleted_with_missing_cleanup{instance="$appDomain", tenant="$tenantId"} $numberOfDeletedUserWithMissingCleanup
\n
EOF;
// phpcs:enable

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 10:54 AM (1 d, 5 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18829102
Default Alt Text
D5014.1775300089.diff (1 KB)

Event Timeline