Beispiel #1
0
    def configure(self, checks_list=None, clean_status_file=True):
        if clean_status_file:
            JMXFiles.clean_status_file()

        self.jmx_checks, self.invalid_checks, self.java_bin_path, self.java_options, \
        self.tools_jar_path, self.custom_jar_paths = \
            self.get_configuration(self.confd_path, checks_list=checks_list)
Beispiel #2
0
    def configure(self, checks_list=None, clean_status_file=True):
        """
        Instantiate JMXFetch parameters, clean potential previous run leftovers.
        """
        if clean_status_file:
            JMXFiles.clean_status_file()

        self.jmx_checks, self.invalid_checks, self.java_bin_path, self.java_options, self.tools_jar_path = \
            self.get_configuration(self.confd_path, checks_list=checks_list)
Beispiel #3
0
    def configure(self, checks_list=None, clean_status_file=True):
        """
        Instantiate JMXFetch parameters, clean potential previous run leftovers.
        """
        if clean_status_file:
            JMXFiles.clean_status_file()

        self.jmx_checks, self.invalid_checks, self.java_bin_path, self.java_options, self.tools_jar_path = \
            self.get_configuration(self.confd_path, checks_list=checks_list)
Beispiel #4
0
    def configure(self, command=None, checks_list=None, clean_status_file=True):
        """
        Instantiate JMXFetch parameters, clean potential previous run leftovers.
        """
        if clean_status_file:
            JMXFiles.clean_status_file()

        self.jmx_checks, self.invalid_checks, self.java_bin_path, self.java_options, \
            tools_jar_path, self.custom_jar_paths, use_attach_api = \
            self.get_configuration(self.confd_path, checks_list=checks_list)

        # Setup the JDK `tool.jar`
        if command == JMX_LIST_JVMS:
            if not tools_jar_path:
                raise InvalidJMXConfiguration(
                    u"Command `{}` requires access to the JDK `tools.jar` file. "
                    u"See `tools_jar_path` parameter in JMX YAML configuration files.".format(
                        JMX_LIST_JVMS
                    )
                )
            use_attach_api = True

        self.tools_jar_path = tools_jar_path if use_attach_api else None
Beispiel #5
0
    def configure(self, command=None, checks_list=None, clean_status_file=True):
        """
        Instantiate JMXFetch parameters, clean potential previous run leftovers.
        """
        if clean_status_file:
            JMXFiles.clean_status_file()

        self.jmx_checks, self.invalid_checks, self.java_bin_path, self.java_options, \
            tools_jar_path, self.custom_jar_paths, use_attach_api = \
            self.get_configuration(self.confd_path, checks_list=checks_list)

        # Setup the JDK `tool.jar`
        if command == JMX_LIST_JVMS:
            if not tools_jar_path:
                raise InvalidJMXConfiguration(
                    u"Command `{}` requires access to the JDK `tools.jar` file. "
                    u"See `tools_jar_path` parameter in JMX YAML configuration files.".format(
                        JMX_LIST_JVMS
                    )
                )
            use_attach_api = True

        self.tools_jar_path = tools_jar_path if use_attach_api else None