add a discovery mode per azure services
This commit is contained in:
parent
630deb2a75
commit
56fd9d2527
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright 2019 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package cloud::azure::compute::virtualmachine::mode::discovery;
|
||||
|
||||
use base qw(cloud::azure::management::monitor::mode::discovery);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
$self->{namespace} = 'Microsoft.Compute';
|
||||
$self->{type} = 'virtualMachines';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Virtual Machine discovery.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--resource-group>
|
||||
|
||||
Specify resources resource group.
|
||||
|
||||
=item B<--location>
|
||||
|
||||
Specify resources location.
|
||||
|
||||
=item B<--prettify>
|
||||
|
||||
Prettify JSON output.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -31,12 +31,13 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'cpu' => 'cloud::azure::compute::virtualmachine::mode::cpu',
|
||||
'diskio' => 'cloud::azure::compute::virtualmachine::mode::diskio',
|
||||
'list-resources' => 'cloud::azure::compute::virtualmachine::mode::listresources',
|
||||
'network' => 'cloud::azure::compute::virtualmachine::mode::network',
|
||||
'vm-sizes' => 'cloud::azure::compute::virtualmachine::mode::vmsizes',
|
||||
'vms-state' => 'cloud::azure::compute::virtualmachine::mode::vmsstate',
|
||||
'cpu' => 'cloud::azure::compute::virtualmachine::mode::cpu',
|
||||
'discovery' => 'cloud::azure::compute::virtualmachine::mode::discovery',
|
||||
'diskio' => 'cloud::azure::compute::virtualmachine::mode::diskio',
|
||||
'list-resources' => 'cloud::azure::compute::virtualmachine::mode::listresources',
|
||||
'network' => 'cloud::azure::compute::virtualmachine::mode::network',
|
||||
'vm-sizes' => 'cloud::azure::compute::virtualmachine::mode::vmsizes',
|
||||
'vms-state' => 'cloud::azure::compute::virtualmachine::mode::vmsstate',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
|
||||
|
@ -47,10 +48,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'database-size' => 'cloud::azure::database::sqldatabase::mode::databasesize',
|
||||
'database-status' => 'cloud::azure::database::sqldatabase::mode::databasestatus',
|
||||
'list-databases' => 'cloud::azure::database::sqldatabase::mode::listdatabases',
|
||||
'database-size' => 'cloud::azure::database::sqldatabase::mode::databasesize',
|
||||
'database-status' => 'cloud::azure::database::sqldatabase::mode::databasestatus',
|
||||
'list-databases' => 'cloud::azure::database::sqldatabase::mode::listdatabases',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
|
||||
|
@ -44,10 +44,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-06-01-preview' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-06-01-preview' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright 2019 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package cloud::azure::database::sqlserver::mode::discovery;
|
||||
|
||||
use base qw(cloud::azure::management::monitor::mode::discovery);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
$self->{namespace} = 'Microsoft.Sql';
|
||||
$self->{type} = 'servers';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
SQL Server discovery.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--resource-group>
|
||||
|
||||
Specify resource group.
|
||||
|
||||
=item B<--location>
|
||||
|
||||
Specify location.
|
||||
|
||||
=item B<--prettify>
|
||||
|
||||
Prettify JSON output.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -31,8 +31,9 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'server-status' => 'cloud::azure::database::sqlserver::mode::serverstatus',
|
||||
'list-servers' => 'cloud::azure::database::sqlserver::mode::listservers',
|
||||
'discovery' => 'cloud::azure::database::sqlserver::mode::discovery',
|
||||
'server-status' => 'cloud::azure::database::sqlserver::mode::serverstatus',
|
||||
'list-servers' => 'cloud::azure::database::sqlserver::mode::listservers',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
|
||||
|
@ -43,10 +44,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-06-01-preview' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-06-01-preview' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -45,6 +45,11 @@ sub new {
|
|||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::init(%options);
|
||||
|
||||
$self->{namespace} = $self->{option_results}->{namespace};
|
||||
$self->{type} = $self->{option_results}->{type};
|
||||
$self->{location} = $self->{option_results}->{location};
|
||||
$self->{resource_group} = $self->{option_results}->{resource_group};
|
||||
}
|
||||
|
||||
sub run {
|
||||
|
@ -56,10 +61,10 @@ sub run {
|
|||
$disco_stats->{start_time} = time();
|
||||
|
||||
my $resources = $options{custom}->azure_list_resources(
|
||||
namespace => $self->{option_results}->{namespace},
|
||||
resource_type => $self->{option_results}->{type},
|
||||
location => $self->{option_results}->{location},
|
||||
resource_group => $self->{option_results}->{resource_group}
|
||||
namespace => $self->{namespace},
|
||||
resource_type => $self->{type},
|
||||
location => $self->{location},
|
||||
resource_group => $self->{resource_group}
|
||||
);
|
||||
|
||||
$disco_stats->{end_time} = time();
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright 2019 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package cloud::azure::management::recovery::mode::discovery;
|
||||
|
||||
use base qw(cloud::azure::management::monitor::mode::discovery);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
$self->{namespace} = 'Microsoft.RecoveryServices';
|
||||
$self->{type} = 'vaults';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Vault discovery.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--resource-group>
|
||||
|
||||
Specify resource group.
|
||||
|
||||
=item B<--location>
|
||||
|
||||
Specify location.
|
||||
|
||||
=item B<--prettify>
|
||||
|
||||
Prettify JSON output.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -31,10 +31,11 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'backup-items-status' => 'cloud::azure::management::recovery::mode::backupitemsstatus',
|
||||
'backup-jobs-status' => 'cloud::azure::management::recovery::mode::backupjobsstatus',
|
||||
'list-backup-jobs' => 'cloud::azure::management::recovery::mode::listbackupjobs',
|
||||
'list-vaults' => 'cloud::azure::management::recovery::mode::listvaults',
|
||||
'backup-items-status' => 'cloud::azure::management::recovery::mode::backupitemsstatus',
|
||||
'backup-jobs-status' => 'cloud::azure::management::recovery::mode::backupjobsstatus',
|
||||
'discovery' => 'cloud::azure::management::recovery::mode::discovery',
|
||||
'list-backup-jobs' => 'cloud::azure::management::recovery::mode::listbackupjobs',
|
||||
'list-vaults' => 'cloud::azure::management::recovery::mode::listvaults',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
|
||||
|
@ -45,10 +46,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-07-10' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-07-10' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -31,10 +31,10 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'deployments-status' => 'cloud::azure::management::resource::mode::deploymentsstatus',
|
||||
'list-groups' => 'cloud::azure::management::resource::mode::listgroups',
|
||||
'list-resources' => 'cloud::azure::management::resource::mode::listresources',
|
||||
'items' => 'cloud::azure::management::resource::mode::items',
|
||||
'deployments-status' => 'cloud::azure::management::resource::mode::deploymentsstatus',
|
||||
'list-groups' => 'cloud::azure::management::resource::mode::listgroups',
|
||||
'list-resources' => 'cloud::azure::management::resource::mode::listresources',
|
||||
'items' => 'cloud::azure::management::resource::mode::items',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
|
||||
|
@ -45,10 +45,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright 2019 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package cloud::azure::network::expressroute::mode::discovery;
|
||||
|
||||
use base qw(cloud::azure::management::monitor::mode::discovery);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
$self->{namespace} = 'Microsoft.Network';
|
||||
$self->{type} = 'expressRouteCircuits';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Express Route discovery.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--resource-group>
|
||||
|
||||
Specify resource group.
|
||||
|
||||
=item B<--location>
|
||||
|
||||
Specify location.
|
||||
|
||||
=item B<--prettify>
|
||||
|
||||
Prettify JSON output.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -31,9 +31,10 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'circuit-status' => 'cloud::azure::network::expressroute::mode::circuitstatus',
|
||||
'list-circuits' => 'cloud::azure::network::expressroute::mode::listcircuits',
|
||||
'traffic' => 'cloud::azure::network::expressroute::mode::traffic',
|
||||
'circuit-status' => 'cloud::azure::network::expressroute::mode::circuitstatus',
|
||||
'discovery' => 'cloud::azure::network::expressroute::mode::discovery',
|
||||
'list-circuits' => 'cloud::azure::network::expressroute::mode::listcircuits',
|
||||
'traffic' => 'cloud::azure::network::expressroute::mode::traffic',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
|
||||
|
@ -44,10 +45,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright 2019 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package cloud::azure::network::networkinterface::mode::discovery;
|
||||
|
||||
use base qw(cloud::azure::management::monitor::mode::discovery);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
$self->{namespace} = 'Microsoft.Network';
|
||||
$self->{type} = 'networkInterfaces';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Network Interface discovery.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--resource-group>
|
||||
|
||||
Specify resource group.
|
||||
|
||||
=item B<--location>
|
||||
|
||||
Specify location.
|
||||
|
||||
=item B<--prettify>
|
||||
|
||||
Prettify JSON output.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -31,8 +31,9 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'list-resources' => 'cloud::azure::network::networkinterface::mode::listresources',
|
||||
'traffic' => 'cloud::azure::network::networkinterface::mode::traffic',
|
||||
'discovery' => 'cloud::azure::network::networkinterface::mode::discovery',
|
||||
'list-resources' => 'cloud::azure::network::networkinterface::mode::listresources',
|
||||
'traffic' => 'cloud::azure::network::networkinterface::mode::traffic',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
|
||||
|
@ -43,10 +44,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright 2019 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package cloud::azure::network::virtualnetwork::mode::discovery;
|
||||
|
||||
use base qw(cloud::azure::management::monitor::mode::discovery);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
$self->{namespace} = 'Microsoft.Network';
|
||||
$self->{type} = 'virtualNetworks';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Virtual Network discovery.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--resource-group>
|
||||
|
||||
Specify resource group.
|
||||
|
||||
=item B<--location>
|
||||
|
||||
Specify location.
|
||||
|
||||
=item B<--prettify>
|
||||
|
||||
Prettify JSON output.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -31,6 +31,7 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'discovery' => 'cloud::azure::network::virtualnetwork::mode::discovery',
|
||||
'list-virtual-networks' => 'cloud::azure::network::virtualnetwork::mode::listvirtualnetworks',
|
||||
'peerings-status' => 'cloud::azure::network::virtualnetwork::mode::peeringsstatus',
|
||||
);
|
||||
|
@ -43,10 +44,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright 2019 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package cloud::azure::network::vpngateway::mode::discovery;
|
||||
|
||||
use base qw(cloud::azure::management::monitor::mode::discovery);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
$self->{namespace} = 'Microsoft.Network';
|
||||
$self->{type} = 'virtualNetworkGateways';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
VPN Gateway discovery.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--resource-group>
|
||||
|
||||
Specify resource group.
|
||||
|
||||
=item B<--location>
|
||||
|
||||
Specify location.
|
||||
|
||||
=item B<--prettify>
|
||||
|
||||
Prettify JSON output.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -31,9 +31,10 @@ sub new {
|
|||
|
||||
$self->{version} = '0.1';
|
||||
%{ $self->{modes} } = (
|
||||
'site-traffic' => 'cloud::azure::network::vpngateway::mode::sitetraffic',
|
||||
'tunnel-traffic' => 'cloud::azure::network::vpngateway::mode::tunneltraffic',
|
||||
'vpn-gateway-status' => 'cloud::azure::network::vpngateway::mode::vpngatewaystatus',
|
||||
'discovery' => 'cloud::azure::network::vpngateway::mode::discovery',
|
||||
'site-traffic' => 'cloud::azure::network::vpngateway::mode::sitetraffic',
|
||||
'tunnel-traffic' => 'cloud::azure::network::vpngateway::mode::tunneltraffic',
|
||||
'vpn-gateway-status' => 'cloud::azure::network::vpngateway::mode::vpngatewaystatus',
|
||||
);
|
||||
|
||||
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
|
||||
|
@ -44,10 +45,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright 2019 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package cloud::azure::storage::storageaccount::mode::discovery;
|
||||
|
||||
use base qw(cloud::azure::management::monitor::mode::discovery);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
$self->{namespace} = 'Microsoft.Storage';
|
||||
$self->{type} = 'storageAccounts';
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Storage Account discovery.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--resource-group>
|
||||
|
||||
Specify resource group.
|
||||
|
||||
=item B<--location>
|
||||
|
||||
Specify location.
|
||||
|
||||
=item B<--prettify>
|
||||
|
||||
Prettify JSON output.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -35,6 +35,7 @@ sub new {
|
|||
'blob-capacity' => 'cloud::azure::storage::storageaccount::mode::blobcapacity',
|
||||
'blob-container-count' => 'cloud::azure::storage::storageaccount::mode::blobcontainercount',
|
||||
'blob-count' => 'cloud::azure::storage::storageaccount::mode::blobcount',
|
||||
'discovery' => 'cloud::azure::storage::storageaccount::mode::discovery',
|
||||
'file-capacity' => 'cloud::azure::storage::storageaccount::mode::filecapacity',
|
||||
'file-count' => 'cloud::azure::storage::storageaccount::mode::filecount',
|
||||
'file-share-count' => 'cloud::azure::storage::storageaccount::mode::filesharecount',
|
||||
|
@ -59,10 +60,9 @@ sub new {
|
|||
sub init {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{options}->add_options(arguments =>
|
||||
{
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
$self->{options}->add_options(arguments => {
|
||||
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
|
||||
});
|
||||
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue