misc(dynamics/ax): force new perfdata + indent (#3296)

This commit is contained in:
qgarnier 2021-12-06 09:42:19 +01:00 committed by GitHub
parent f44d8e2177
commit 1ae3404f4e
1 changed files with 32 additions and 31 deletions

View File

@ -60,15 +60,14 @@ sub set_counters {
sub new { sub new {
my ($class, %options) = @_; my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'timeframe:s' => { name => 'timeframe', default => 14400 },
"timeframe:s" => { name => 'timeframe', default => '14400' }, 'filter-module:s' => { name => 'filter_module' },
"filter-module:s" => { name => 'filter_module' }, 'filter-company:s' => { name => 'filter_company' },
"filter-company:s" => { name => 'filter_company' }, 'filter-portname:s' => { name => 'filter_portname' }
"filter-portname:s" => { name => 'filter_portname' }
}); });
return $self; return $self;
@ -80,7 +79,8 @@ sub manage_selection {
# $options{sql} = sqlmode object # $options{sql} = sqlmode object
$self->{sql} = $options{sql}; $self->{sql} = $options{sql};
my $query = " SELECT my $query = "
SELECT
[AIFEXCEPTIONMAP].[MESSAGEID], [AIFEXCEPTIONMAP].[MESSAGEID],
[SYSEXCEPTIONTABLE].[EXCEPTION], [SYSEXCEPTIONTABLE].[EXCEPTION],
[SYSEXCEPTIONTABLE].[DESCRIPTION], [SYSEXCEPTIONTABLE].[DESCRIPTION],
@ -161,6 +161,7 @@ Thresholds.
Can be: 'order-critical', 'order-warning'. Can be: 'order-critical', 'order-warning'.
=item B<--timeframe> =item B<--timeframe>
Set the timeframe to query in seconds (Default: 14400). Set the timeframe to query in seconds (Default: 14400).
=item B<--filter-module> =item B<--filter-module>