mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-29 16:45:04 +02:00
enh(plugin)apps-lync-2013-mssql metricsv2 (#2493)
This commit is contained in:
parent
b10c6d1f89
commit
f1d1724ca6
@ -25,6 +25,12 @@ use base qw(centreon::plugins::templates::counter);
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
sub prefix_user_output {
|
||||||
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
return "'" . $options{instance_value}->{display} . "' ";
|
||||||
|
}
|
||||||
|
|
||||||
sub set_counters {
|
sub set_counters {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
@ -33,24 +39,24 @@ sub set_counters {
|
|||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{users} = [
|
$self->{maps_counters}->{users} = [
|
||||||
{ label => 'total', set => {
|
{ label => 'total', nlabel => 'users.total.count', set => {
|
||||||
key_values => [ { name => 'total' } ],
|
key_values => [ { name => 'total' } ],
|
||||||
output_template => '%d Total users',
|
output_template => '%d Total users',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'total_users', value => 'total', template => '%d',
|
{ label => 'total_users', template => '%d',
|
||||||
unit => 'users', min => 0, label_extra_instance => 0 },
|
unit => 'users', min => 0, label_extra_instance => 0 }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'unique', set => {
|
{ label => 'unique', nlabel => 'users.unique.count', set => {
|
||||||
key_values => [ { name => 'unique' } ],
|
key_values => [ { name => 'unique' } ],
|
||||||
output_template => '%d Unique users',
|
output_template => '%d Unique users',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'unique_users', value => 'unique', template => '%d',
|
{ label => 'unique_users', template => '%d',
|
||||||
unit => 'users', min => 0, label_extra_instance => 0 },
|
unit => 'users', min => 0, label_extra_instance => 0 }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,18 +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 => {
|
||||||
{
|
});
|
||||||
});
|
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub prefix_user_output {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
|
|
||||||
return "'" . $options{instance_value}->{display} . "' ";
|
|
||||||
}
|
|
||||||
|
|
||||||
sub manage_selection {
|
sub manage_selection {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
# $options{sql} = sqlmode object
|
# $options{sql} = sqlmode object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user