Comment modes which not exist yet refs #5643
This commit is contained in:
parent
be520b1a38
commit
da6b775461
|
@ -48,14 +48,17 @@ sub new {
|
||||||
|
|
||||||
$self->{version} = '0.1';
|
$self->{version} = '0.1';
|
||||||
%{$self->{modes}} = (
|
%{$self->{modes}} = (
|
||||||
'availability-group-states' => 'database::mssql::mode::availabilitygroupstates',
|
# 'availability-group-states' => 'database::mssql::mode::availabilitygroupstates',
|
||||||
'blocked-processes' => 'database::mssql::mode::blockedprocesses',
|
# 'availability-group-synchronization' => 'database::mssql::mode::availabilitygroupsync',
|
||||||
'cache-hitratio' => 'database::mssql::mode::cachehitratio',
|
'blocked-processes' => 'database::mssql::mode::blockedprocesses',
|
||||||
'connected-users' => 'database::mssql::mode::connectedusers',
|
'cache-hitratio' => 'database::mssql::mode::cachehitratio',
|
||||||
'connection-time' => 'database::mssql::mode::connectiontime',
|
'connected-users' => 'database::mssql::mode::connectedusers',
|
||||||
'database-size' => 'database::mssql::mode::databasesize',
|
'connection-time' => 'database::mssql::mode::connectiontime',
|
||||||
'locks-waits' => 'database::mssql::mode::lockswaits',
|
# 'database-size' => 'database::mssql::mode::databasesize',
|
||||||
'transactions' => 'database::mssql::mode::transactions',
|
'locks-waits' => 'database::mssql::mode::lockswaits',
|
||||||
|
'transactions' => 'database::mssql::mode::transactions',
|
||||||
|
# 'backup-age' => 'database::mssql::mode::backupage',
|
||||||
|
# 'failed-jobs' => 'database::mssql::mode::failedjobs',
|
||||||
);
|
);
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
@ -66,21 +69,21 @@ sub init {
|
||||||
|
|
||||||
$self->{options}->add_options(
|
$self->{options}->add_options(
|
||||||
arguments => {
|
arguments => {
|
||||||
'host:s@' => { name => 'db_host' },
|
'hostname:s@' => { name => 'hostname' },
|
||||||
'port:s@' => { name => 'db_port' },
|
'port:s@' => { name => 'port' },
|
||||||
'database:s' => { name => 'database' },
|
'database:s' => { name => 'database' },
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$self->{options}->parse_options();
|
$self->{options}->parse_options();
|
||||||
my $options_result = $self->{options}->get_options();
|
my $options_result = $self->{options}->get_options();
|
||||||
$self->{options}->clean();
|
$self->{options}->clean();
|
||||||
|
|
||||||
if (defined($options_result->{db_host})) {
|
if (defined($options_result->{hostname})) {
|
||||||
@{$self->{sqldefault}->{dbi}} = ();
|
@{$self->{sqldefault}->{dbi}} = ();
|
||||||
for (my $i = 0; $i < scalar(@{$options_result->{db_host}}); $i++) {
|
for (my $i = 0; $i < scalar(@{$options_result->{hostname}}); $i++) {
|
||||||
$self->{sqldefault}->{dbi}[$i] = { data_source => 'Sybase:host=' . $options_result->{db_host}[$i] };
|
$self->{sqldefault}->{dbi}[$i] = { data_source => 'Sybase:host=' . $options_result->{hostname}[$i] };
|
||||||
if (defined($options_result->{db_port}[$i])) {
|
if (defined($options_result->{port}[$i])) {
|
||||||
$self->{sqldefault}->{dbi}[$i]->{data_source} .= ';port=' . $options_result->{db_port}[$i];
|
$self->{sqldefault}->{dbi}[$i]->{data_source} .= ';port=' . $options_result->{port}[$i];
|
||||||
}
|
}
|
||||||
if ((defined($options_result->{database})) && ($options_result->{database} ne '')) {
|
if ((defined($options_result->{database})) && ($options_result->{database} ne '')) {
|
||||||
$self->{sqldefault}->{dbi}[$i]->{data_source} .= ';database=' . $options_result->{database};
|
$self->{sqldefault}->{dbi}[$i]->{data_source} .= ';database=' . $options_result->{database};
|
||||||
|
@ -100,7 +103,7 @@ Check MSSQL Server.
|
||||||
|
|
||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
=item B<--host>
|
=item B<--hostname>
|
||||||
|
|
||||||
Hostname to query.
|
Hostname to query.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue