Class ExecRemoteNodeExporterProcessFactory

java.lang.Object
io.jenkins.plugins.onmonit.RemoteNodeExporterProcessFactory
io.jenkins.plugins.onmonit.exec.ExecRemoteNodeExporterProcessFactory
All Implemented Interfaces:
ExtensionPoint

public class ExecRemoteNodeExporterProcessFactory extends RemoteNodeExporterProcessFactory
A factory that uses the native node-exporter installed on a remote system. node-exporter has to be in PATH environment variable.
  • Constructor Details

    • ExecRemoteNodeExporterProcessFactory

      public ExecRemoteNodeExporterProcessFactory()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      The display name of the factory.
      Specified by:
      getDisplayName in class RemoteNodeExporterProcessFactory
      Returns:
      The display name of the factory.
    • isSupported

      public boolean isSupported(Launcher launcher, TaskListener listener, ComputerInfo info)
      Checks if the supplied launcher is supported by this factory.
      Specified by:
      isSupported in class RemoteNodeExporterProcessFactory
      Parameters:
      launcher - the launcher on which the factory would be asked to start a node-exporter.
      listener - a listener in case any user diagnostics are to be printed.
      info - information about the target environment (OS, arch)
      Returns:
      false if the factory does not want to try and start a node-exporter on the launcher.
    • create

      public RemoteNodeExporterProcess create(LauncherProvider launcherProvider, TaskListener listener, ComputerInfo info, @CheckForNull FilePath temp, String envCookie, String additionalOptions, boolean debug) throws Throwable
      Create a node-exporter process on the specified launcher. This does not yet start it.
      Specified by:
      create in class RemoteNodeExporterProcessFactory
      Parameters:
      launcherProvider - provides launchers on which to start a node-exporter.
      listener - a listener for any diagnostics.
      info - information about the target environment (OS, arch)
      temp - a temporary directory to use
      envCookie - a value to distinguish the created process
      additionalOptions - any additional arguments to pass to the launched process
      debug - whether to pass any process output to the Job console log (useful for troubleshooting)
      Returns:
      the process.
      Throws:
      Throwable - if the process cannot be started.