init III
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# --
|
||||
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
||||
# --
|
||||
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
|
||||
# the enclosed file COPYING for license information (GPL). If you
|
||||
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
# --
|
||||
|
||||
package Kernel::System::SupportDataCollector::Plugin::OTRS::Ticket::DefaultType;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use parent qw(Kernel::System::SupportDataCollector::PluginBase);
|
||||
|
||||
use Kernel::Language qw(Translatable);
|
||||
|
||||
our @ObjectDependencies = (
|
||||
'Kernel::Config',
|
||||
'Kernel::System::Type',
|
||||
);
|
||||
|
||||
sub GetDisplayPath {
|
||||
return Translatable('OTRS');
|
||||
}
|
||||
|
||||
sub Run {
|
||||
my $Self = shift;
|
||||
|
||||
# check, if Ticket::Type is enabled
|
||||
my $TicketType = $Kernel::OM->Get('Kernel::Config')->Get('Ticket::Type');
|
||||
|
||||
# if not enabled, stop here
|
||||
if ( !$TicketType ) {
|
||||
return $Self->GetResults();
|
||||
}
|
||||
|
||||
my $TypeObject = $Kernel::OM->Get('Kernel::System::Type');
|
||||
|
||||
# get default ticket type from config
|
||||
my $DefaultTicketType = $Kernel::OM->Get('Kernel::Config')->Get('Ticket::Type::Default');
|
||||
|
||||
# get list of all ticket types
|
||||
my %AllTicketTypes = reverse $TypeObject->TypeList();
|
||||
|
||||
if ( $AllTicketTypes{$DefaultTicketType} ) {
|
||||
$Self->AddResultOk(
|
||||
Label => Translatable('Default Ticket Type'),
|
||||
Value => $DefaultTicketType,
|
||||
);
|
||||
}
|
||||
else {
|
||||
$Self->AddResultWarning(
|
||||
Label => Translatable('Default Ticket Type'),
|
||||
Value => $DefaultTicketType,
|
||||
Message =>
|
||||
Translatable(
|
||||
'The configured default ticket type is invalid or missing. Please change the setting Ticket::Type::Default and select a valid ticket type.'
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return $Self->GetResults();
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -0,0 +1,62 @@
|
||||
# --
|
||||
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
||||
# --
|
||||
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
|
||||
# the enclosed file COPYING for license information (GPL). If you
|
||||
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
# --
|
||||
|
||||
package Kernel::System::SupportDataCollector::Plugin::OTRS::Ticket::IndexModule;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use parent qw(Kernel::System::SupportDataCollector::PluginBase);
|
||||
|
||||
use Kernel::Language qw(Translatable);
|
||||
|
||||
our @ObjectDependencies = (
|
||||
'Kernel::Config',
|
||||
'Kernel::System::DB',
|
||||
);
|
||||
|
||||
sub GetDisplayPath {
|
||||
return Translatable('OTRS');
|
||||
}
|
||||
|
||||
sub Run {
|
||||
my $Self = shift;
|
||||
|
||||
my $Module = $Kernel::OM->Get('Kernel::Config')->Get('Ticket::IndexModule');
|
||||
|
||||
# get database object
|
||||
my $DBObject = $Kernel::OM->Get('Kernel::System::DB');
|
||||
|
||||
my $TicketCount;
|
||||
$DBObject->Prepare( SQL => 'SELECT count(*) FROM ticket' );
|
||||
|
||||
while ( my @Row = $DBObject->FetchrowArray() ) {
|
||||
$TicketCount = $Row[0];
|
||||
}
|
||||
|
||||
if ( $TicketCount > 60_000 && $Module =~ /RuntimeDB/ ) {
|
||||
$Self->AddResultWarning(
|
||||
Label => Translatable('Ticket Index Module'),
|
||||
Value => $Module,
|
||||
Message =>
|
||||
Translatable(
|
||||
'You have more than 60,000 tickets and should use the StaticDB backend. See admin manual (Performance Tuning) for more information.'
|
||||
),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$Self->AddResultOk(
|
||||
Label => Translatable('Ticket Index Module'),
|
||||
Value => $Module,
|
||||
);
|
||||
}
|
||||
|
||||
return $Self->GetResults();
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -0,0 +1,66 @@
|
||||
# --
|
||||
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
||||
# --
|
||||
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
|
||||
# the enclosed file COPYING for license information (GPL). If you
|
||||
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
# --
|
||||
|
||||
package Kernel::System::SupportDataCollector::Plugin::OTRS::Ticket::InvalidUsersWithLockedTickets;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use parent qw(Kernel::System::SupportDataCollector::PluginBase);
|
||||
|
||||
use Kernel::Language qw(Translatable);
|
||||
|
||||
our @ObjectDependencies = (
|
||||
'Kernel::Config',
|
||||
'Kernel::System::DB',
|
||||
);
|
||||
|
||||
sub GetDisplayPath {
|
||||
return Translatable('OTRS');
|
||||
}
|
||||
|
||||
sub Run {
|
||||
my $Self = shift;
|
||||
|
||||
# get database object
|
||||
my $DBObject = $Kernel::OM->Get('Kernel::System::DB');
|
||||
|
||||
my $InvalidUsersTicketCount;
|
||||
$DBObject->Prepare(
|
||||
SQL => '
|
||||
SELECT COUNT(*) FROM ticket, users
|
||||
WHERE
|
||||
ticket.user_id = users.id
|
||||
AND ticket.ticket_lock_id = 2
|
||||
AND users.valid_id != 1
|
||||
',
|
||||
Limit => 1,
|
||||
);
|
||||
|
||||
while ( my @Row = $DBObject->FetchrowArray() ) {
|
||||
$InvalidUsersTicketCount = $Row[0];
|
||||
}
|
||||
|
||||
if ($InvalidUsersTicketCount) {
|
||||
$Self->AddResultWarning(
|
||||
Label => Translatable('Invalid Users with Locked Tickets'),
|
||||
Value => $InvalidUsersTicketCount,
|
||||
Message => Translatable('There are invalid users with locked tickets.'),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$Self->AddResultOk(
|
||||
Label => Translatable('Invalid Users with Locked Tickets'),
|
||||
Value => '0',
|
||||
);
|
||||
}
|
||||
|
||||
return $Self->GetResults();
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -0,0 +1,53 @@
|
||||
# --
|
||||
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
||||
# --
|
||||
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
|
||||
# the enclosed file COPYING for license information (GPL). If you
|
||||
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
# --
|
||||
|
||||
package Kernel::System::SupportDataCollector::Plugin::OTRS::Ticket::OpenTickets;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use parent qw(Kernel::System::SupportDataCollector::PluginBase);
|
||||
|
||||
use Kernel::Language qw(Translatable);
|
||||
|
||||
our @ObjectDependencies = (
|
||||
'Kernel::System::Ticket',
|
||||
);
|
||||
|
||||
sub GetDisplayPath {
|
||||
return Translatable('OTRS');
|
||||
}
|
||||
|
||||
sub Run {
|
||||
my $Self = shift;
|
||||
|
||||
my $OpenTickets = $Kernel::OM->Get('Kernel::System::Ticket')->TicketSearch(
|
||||
Result => 'COUNT',
|
||||
StateType => 'Open',
|
||||
UserID => 1,
|
||||
Permission => 'ro',
|
||||
) || 0;
|
||||
|
||||
if ( $OpenTickets > 8000 ) {
|
||||
$Self->AddResultWarning(
|
||||
Label => Translatable('Open Tickets'),
|
||||
Value => $OpenTickets,
|
||||
Message => Translatable('You should not have more than 8,000 open tickets in your system.'),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$Self->AddResultOk(
|
||||
Label => Translatable('Open Tickets'),
|
||||
Value => $OpenTickets,
|
||||
);
|
||||
}
|
||||
|
||||
return $Self->GetResults();
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -0,0 +1,52 @@
|
||||
# --
|
||||
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
||||
# --
|
||||
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
|
||||
# the enclosed file COPYING for license information (GPL). If you
|
||||
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
# --
|
||||
|
||||
package Kernel::System::SupportDataCollector::Plugin::OTRS::Ticket::SearchIndexModule;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use parent qw(Kernel::System::SupportDataCollector::PluginBase);
|
||||
|
||||
use Kernel::Language qw(Translatable);
|
||||
|
||||
our @ObjectDependencies = (
|
||||
'Kernel::Config',
|
||||
'Kernel::System::DB',
|
||||
);
|
||||
|
||||
sub GetDisplayPath {
|
||||
return Translatable('OTRS');
|
||||
}
|
||||
|
||||
sub Run {
|
||||
my $Self = shift;
|
||||
|
||||
my $ForceUnfilteredStorage = $Kernel::OM->Get('Kernel::Config')->Get('Ticket::SearchIndex::ForceUnfilteredStorage');
|
||||
|
||||
if ($ForceUnfilteredStorage) {
|
||||
$Self->AddResultWarning(
|
||||
Label => Translatable('Ticket Search Index Module'),
|
||||
Value => 'Ticket::SearchIndex::ForceUnfilteredStorage',
|
||||
Message =>
|
||||
Translatable(
|
||||
'The indexing process forces the storage of the original article text in the article search index, without executing filters or applying stop word lists. This will increase the size of the search index and thus may slow down fulltext searches.'
|
||||
),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$Self->AddResultOk(
|
||||
Label => Translatable('Ticket Search Index Module'),
|
||||
Value => 'Ticket::SearchIndex::ForceUnfilteredStorage',
|
||||
);
|
||||
}
|
||||
|
||||
return $Self->GetResults();
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -0,0 +1,91 @@
|
||||
# --
|
||||
# Copyright (C) 2001-2019 OTRS AG, https://otrs.com/
|
||||
# --
|
||||
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
|
||||
# the enclosed file COPYING for license information (GPL). If you
|
||||
# did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
|
||||
# --
|
||||
|
||||
package Kernel::System::SupportDataCollector::Plugin::OTRS::Ticket::StaticDBOrphanedRecords;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use parent qw(Kernel::System::SupportDataCollector::PluginBase);
|
||||
|
||||
use Kernel::Language qw(Translatable);
|
||||
|
||||
our @ObjectDependencies = (
|
||||
'Kernel::Config',
|
||||
'Kernel::System::DB',
|
||||
);
|
||||
|
||||
sub GetDisplayPath {
|
||||
return Translatable('OTRS');
|
||||
}
|
||||
|
||||
sub Run {
|
||||
my $Self = shift;
|
||||
|
||||
my $Module = $Kernel::OM->Get('Kernel::Config')->Get('Ticket::IndexModule');
|
||||
|
||||
# get database object
|
||||
my $DBObject = $Kernel::OM->Get('Kernel::System::DB');
|
||||
|
||||
if ( $Module !~ /StaticDB/ ) {
|
||||
|
||||
my ( $OrphanedTicketLockIndex, $OrphanedTicketIndex );
|
||||
|
||||
$DBObject->Prepare( SQL => 'SELECT count(*) from ticket_lock_index' );
|
||||
while ( my @Row = $DBObject->FetchrowArray() ) {
|
||||
$OrphanedTicketLockIndex = $Row[0];
|
||||
}
|
||||
|
||||
if ($OrphanedTicketLockIndex) {
|
||||
$Self->AddResultWarning(
|
||||
Identifier => 'TicketLockIndex',
|
||||
Label => Translatable('Orphaned Records In ticket_lock_index Table'),
|
||||
Value => $OrphanedTicketLockIndex,
|
||||
Message =>
|
||||
Translatable(
|
||||
'Table ticket_lock_index contains orphaned records. Please run bin/otrs.Console.pl "Maint::Ticket::QueueIndexCleanup" to clean the StaticDB index.'
|
||||
),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$Self->AddResultOk(
|
||||
Identifier => 'TicketLockIndex',
|
||||
Label => Translatable('Orphaned Records In ticket_lock_index Table'),
|
||||
Value => $OrphanedTicketLockIndex || '0',
|
||||
);
|
||||
}
|
||||
|
||||
$DBObject->Prepare( SQL => 'SELECT count(*) from ticket_index' );
|
||||
while ( my @Row = $DBObject->FetchrowArray() ) {
|
||||
$OrphanedTicketIndex = $Row[0];
|
||||
}
|
||||
|
||||
if ($OrphanedTicketLockIndex) {
|
||||
$Self->AddResultWarning(
|
||||
Identifier => 'TicketIndex',
|
||||
Label => Translatable('Orphaned Records In ticket_index Table'),
|
||||
Value => $OrphanedTicketIndex,
|
||||
Message =>
|
||||
Translatable(
|
||||
'Table ticket_index contains orphaned records. Please run bin/otrs.Console.pl "Maint::Ticket::QueueIndexCleanup" to clean the StaticDB index.'
|
||||
),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$Self->AddResultOk(
|
||||
Identifier => 'TicketIndex',
|
||||
Label => Translatable('Orphaned Records In ticket_index Table'),
|
||||
Value => $OrphanedTicketIndex || '0',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $Self->GetResults();
|
||||
}
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user