def _initialize(self):
        # The id of the process being monitored, if one has been matched.
        self.__pid = None
        # The list of BaseReaders instantiated to gather metrics for the process.
        self.__gathers = []

        self.__id = self._config.get('id', required_field=True, convert_to=str)
        self.__commandline_matcher = self._config.get('commandline', default=None, convert_to=str)
        self.__target_pid = self._config.get('pid', default=None, convert_to=str)

        if self.__commandline_matcher is None and self.__target_pid is None:
            raise BadMonitorConfiguration('At least one of the following fields must be provide: commandline or pid',
                                          'commandline')

        # Make sure to set our configuration so that the proper parser is used.
        self.log_config = {
            'parser': 'agent-metrics',
            'path': 'linux_process_metrics.log',
        }
Performs monitor-specific initialization.
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/builtin_monitors/linux_process_metrics.py/ProcessMonitor._initialize