

def monitor_config(path):
    '\n    Reads the minion configuration file and overrides with values from\n    the monitor configuration file.\n    '
    minion_config_file = os.environ.get('SALT_MINION_CONFIG')
    if (not minion_config_file):
        monitor_config_file = os.environ.get('SALT_MONITOR_CONFIG')
        if monitor_config_file:
            basedir = os.path.dirname(monitor_config_file)
        else:
            basedir = os.path.dirname(path)
        minion_config_file = os.path.join(basedir, 'minion')
    opts = salt.config.minion_config(minion_config_file)
    minion_config_file.update({
        'log_file': '/var/log/salt/monitor',
    })
    for (key, value) in [('alert_master', 'salt'), ('alert.port', 4507)]:
        if (key not in opts):
            opts[key] = value
    salt.config.load_config(opts, path, 'SALT_MONITOR_CONFIG')
    salt.config.prepend_root_dir(opts, ['log_file'])
    opts['alert_master'] = salt.config.dns_check(opts['alert_master'])
    return opts

dataset/ETHPy150Open thatch45/salt-monitor/salt/ext/monitor/config.py monitor_config/VarMisuse@100/193 `opts`->`minion_config_file`