Enh(plugin)apps-cisco-ise-restapi metrics v2 (#2477)
This commit is contained in:
parent
c8d11f8dfe
commit
7a468308ff
|
@ -29,37 +29,34 @@ sub set_counters {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
$self->{maps_counters_type} = [
|
$self->{maps_counters_type} = [
|
||||||
{ name => 'global', type => 0, skipped_code => { -10 => 1 } },
|
{ name => 'global', type => 0, skipped_code => { -10 => 1 } }
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{global} = [
|
$self->{maps_counters}->{global} = [
|
||||||
{ label => 'active-sessions', set => {
|
{ label => 'active-sessions', nlabel => 'sessions.active.count', set => {
|
||||||
key_values => [ { name => 'active' } ],
|
key_values => [ { name => 'active' } ],
|
||||||
output_template => 'Active sessions: %d',
|
output_template => 'Active sessions: %d',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'active_sessions', value => 'active', template => '%d',
|
{ label => 'active_sessions', template => '%d', min => 0 }
|
||||||
min => 0 },
|
]
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'postured-endpoints', set => {
|
{ label => 'postured-endpoints', nlabel => 'endpoints.postured.count', set => {
|
||||||
key_values => [ { name => 'postured' } ],
|
key_values => [ { name => 'postured' } ],
|
||||||
output_template => 'Postured endpoints: %d',
|
output_template => 'Postured endpoints: %d',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'postured_endpoints', value => 'postured', template => '%d',
|
{ label => 'postured_endpoints', template => '%d', min => 0 }
|
||||||
min => 0 },
|
]
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'profiler-service-sessions', set => {
|
{ label => 'profiler-service-sessions', nlabel => 'sessions.profiler.count', set => {
|
||||||
key_values => [ { name => 'profiler' } ],
|
key_values => [ { name => 'profiler' } ],
|
||||||
output_template => 'Profiler service sessions: %d',
|
output_template => 'Profiler service sessions: %d',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'profiler_service_sessions', value => 'profiler', template => '%d',
|
{ label => 'profiler_service_sessions', template => '%d', min => 0 }
|
||||||
min => 0 },
|
]
|
||||||
],
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,19 +65,12 @@ sub new {
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments =>
|
$options{options}->add_options(arguments => {
|
||||||
{
|
|
||||||
"filter-counters:s" => { name => 'filter_counters' },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_options {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
$self->SUPER::check_options(%options);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub manage_selection {
|
sub manage_selection {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
|
|
@ -30,11 +30,11 @@ sub new {
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
%{$self->{modes}} = (
|
%$self->{modes} = {
|
||||||
'session' => 'apps::cisco::ise::restapi::mode::session',
|
'session' => 'apps::cisco::ise::restapi::mode::session',
|
||||||
);
|
};
|
||||||
|
|
||||||
$self->{custom_modes}{xmlapi} = 'apps::cisco::ise::restapi::custom::xmlapi';
|
$self->{custom_modes}->{xmlapi} = 'apps::cisco::ise::restapi::custom::xmlapi';
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue