<commit_before># -*- coding: utf-8 -*-
"""
Run nagios plugins/checks from salt and get the return as datai,
retcode commands are compatible with carbon returner.
"""

# Import python libs
import os
import stat

# Import salt libs

import logging

log = logging.getLogger(__name__)

PLUGINDIR = '/usr/lib/nagios/plugins/'


def __virtual__():
    """
    Only load if nagios-plugins are installed
    """

    if os.path.isdir('/usr/lib/nagios/'):
        return 'nagios'
    return False


def _execute_cmd(plugin, args='', run_type='cmd.retcode', key_name=None):
    """<commit_msg>Added carbon returner information<commit_after># -*- coding: utf-8 -*-
"""
Run nagios plugins/checks from salt and get the return as data.
"""

# Import python libs
import os
import stat

# Import salt libs

import logging

log = logging.getLogger(__name__)

PLUGINDIR = '/usr/lib/nagios/plugins/'


def __virtual__():
    """
    Only load if nagios-plugins are installed
    """

    if os.path.isdir('/usr/lib/nagios/'):
        return 'nagios'
    return False


def _execute_cmd(plugin, args='', run_type='cmd.retcode', key_name=None):
    """
{'fraction_non_alphanumeric': 0.1317418213969938, 'fraction_numerical': 0.0017683465959328027, 'mean_word_length': 3.43921568627451, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1422456', 'n_tokens_mistral': 375, 'n_tokens_neox': 370, 'n_words': 108}