def __detect_configuration(self):
try:<EOL><INDENT>is_telegraf = self.core.get_option('<STR_LIT>', "<STR_LIT>")<EOL><DEDENT>except KeyError:<EOL><INDENT>is_telegraf = None<EOL><DEDENT>try:<EOL><INDENT>is_monitoring = self.core.get_option('<STR_LIT>', "<STR_LIT>")<EOL><DEDENT>except KeyError:<EOL><INDENT>is_monitoring = None<EOL><DEDENT>if is_telegraf and is_monitoring:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if is_telegraf and not is_monitoring:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if not is_telegraf and is_monitoring:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if not is_telegraf and not is_monitoring:<EOL><INDENT>try:<EOL><INDENT>is_telegraf_dt = self.core.get_option('<STR_LIT>')<EOL><DEDENT>except NoOptionError:<EOL><INDENT>is_telegraf_dt = None<EOL><DEDENT>try:<EOL><INDENT>is_monitoring_dt = self.core.get_option('<STR_LIT>')<EOL><DEDENT>except BaseException:<EOL><INDENT>is_monitoring_dt = None<EOL><DEDENT>if is_telegraf_dt and is_monitoring_dt:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if is_telegraf_dt and not is_monitoring_dt:<EOL><INDENT>return<EOL><DEDENT>if not is_telegraf_dt and is_monitoring_dt:<EOL><INDENT>self.core.set_option(<EOL>"<STR_LIT>", "<STR_LIT>", is_monitoring_dt)<EOL><DEDENT>if not is_telegraf_dt and not is_monitoring_dt:<EOL><INDENT>return<EOL><DEDENT><DEDENT>
we need to be flexible in order to determine which plugin's configuration
specified and make appropriate configs to metrics collector

:return: SECTION name or None for defaults