<commit_before>#
# Copyright 2020 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 apps::bluemind::local::mode::eas;

use base qw(centreon::plugins::templates::counter);

use strict;
use warnings;
use Digest::MD5 qw(md5_hex);
use bigint;

sub prefix_eas_output {
    my ($self, %options) = @_;
    
    return 'Mobile connection service ';
}

sub set_counters {
    my ($self, %options) = @_;
    
    $self->{maps_counters_type} = [
        { name => 'bm_eas', type => 0, cb_prefix_output => 'prefix_eas_output' }
    ];
    
    $self->{maps_counters}->{bm_eas} = [
        { label => 'responses-size-total', nlabel => 'eas.responses.size.total.count', display_ok => 0, set => {
                key_values => [ { name => 'response_size', diff => 1 } ],
                output_template => 'total responses size: %s %s',
                output_change_bytes => 1,
                perfdatas => [
                    { value => 'response_size_absolute', template => '%s', min => 0, unit => 'B' }
                ]
            }
        },
        { label => 'execution-total', nlabel => 'eas.execution.total.milliseconds', display_ok => 0, set => {
                key_values => [ { name => 'execution_total', diff => 1 } ],
                output_template => 'total execution: %s ms',
                perfdatas => [
                    { value => 'execution_total_absolute', template => '%s', min => 0, unit => 'ms' }
                ]
            }
        },
        { label => 'execution-mean', nlabel => 'eas.execution.mean.milliseconds', set => {
                key_values => [ { name => 'execution_mean' } ],
                output_template => 'mean execution: %s ms',
                perfdatas => [
                    { value => 'execution_mean_absolute', template => '%s', min => 0, unit => 'ms' }
                ]
            }<commit_msg>fix eas bluemind unit<commit_after>#
# Copyright 2020 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 apps::bluemind::local::mode::eas;

use base qw(centreon::plugins::templates::counter);

use strict;
use warnings;
use Digest::MD5 qw(md5_hex);
use bigint;

sub prefix_eas_output {
    my ($self, %options) = @_;
    
    return 'Mobile connection service ';
}

sub set_counters {
    my ($self, %options) = @_;
    
    $self->{maps_counters_type} = [
        { name => 'bm_eas', type => 0, cb_prefix_output => 'prefix_eas_output' }
    ];
    
    $self->{maps_counters}->{bm_eas} = [
        { label => 'responses-size-total', nlabel => 'eas.responses.size.total.bytes', display_ok => 0, set => {
                key_values => [ { name => 'response_size', diff => 1 } ],
                output_template => 'total responses size: %s %s',
                output_change_bytes => 1,
                perfdatas => [
                    { value => 'response_size_absolute', template => '%s', min => 0, unit => 'B' }
                ]
            }
        },
        { label => 'execution-total', nlabel => 'eas.execution.total.milliseconds', display_ok => 0, set => {
                key_values => [ { name => 'execution_total', diff => 1 } ],
                output_template => 'total execution: %s ms',
                perfdatas => [
                    { value => 'execution_total_absolute', template => '%s', min => 0, unit => 'ms' }
                ]
            }
        },
        { label => 'execution-mean', nlabel => 'eas.execution.mean.milliseconds', set => {
                key_values => [ { name => 'execution_mean' } ],
                output_template => 'mean execution: %s ms',
                perfdatas => [
                    { value => 'execution_mean_absolute', template => '%s', min => 0, unit => 'ms' }
                ]
            }
{'fraction_non_alphanumeric': 0.13474343909126518, 'fraction_numerical': 0.007442224833529181, 'mean_word_length': 2.3510498687664043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1339950', 'n_tokens_mistral': 1523, 'n_tokens_neox': 1417, 'n_words': 433}