hudson.node_monitors
Class NodeMonitor

java.lang.Object
  extended by hudson.node_monitors.NodeMonitor
All Implemented Interfaces:
ExtensionPoint, Describable<NodeMonitor>
Direct Known Subclasses:
AbstractDiskSpaceMonitor, ArchitectureMonitor, ClockMonitor, ResponseTimeMonitor, SwapSpaceMonitor

@ExportedBean
public abstract class NodeMonitor
extends Object
implements ExtensionPoint, Describable<NodeMonitor>

Extension point for managing and monitoring Nodes.

Views

column.jelly
Invoked from ComputerSet index.jelly to render a column. The NodeMonitor instance is accessible through the "from" variable. Also see getColumnCaption().
config.jelly (optional)
Configuration fragment to be displayed in http://server/hudson/computer/configure. Used for configuring the threshold for taking nodes offline.

Persistence

NodeMonitors are persisted via XStream.

Since:
1.123
Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static DescriptorList<NodeMonitor> LIST
          Deprecated. as of 1.286. Use all() for read access and Extension for registration.
 
Constructor Summary
NodeMonitor()
           
 
Method Summary
static DescriptorExtensionList<NodeMonitor,Descriptor<NodeMonitor>> all()
          Returns all the registered NodeMonitor descriptors.
 Object data(Computer c)
          Obtains the monitoring result currently available, or null if no data is available.
static List<NodeMonitor> getAll()
          Obtains all the instances of NodeMonitors that are alive.
 String getColumnCaption()
          Returns the name of the column to be added to ComputerSet index.jelly.
 AbstractNodeMonitorDescriptor<?> getDescriptor()
          Gets the descriptor for this instance.
 boolean isIgnored()
          True if this monitoring shouldn't mark the slaves offline.
 void setIgnored(boolean ignored)
           
 Thread triggerUpdate()
          Starts updating the data asynchronously.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIST

public static final DescriptorList<NodeMonitor> LIST
Deprecated. as of 1.286. Use all() for read access and Extension for registration.
All registered NodeMonitors.

Constructor Detail

NodeMonitor

public NodeMonitor()
Method Detail

getColumnCaption

@Exported
public String getColumnCaption()
Returns the name of the column to be added to ComputerSet index.jelly.

Returns:
null to not render a column. The convention is to use capitalization like "Foo Bar Zot".

getDescriptor

public AbstractNodeMonitorDescriptor<?> getDescriptor()
Description copied from interface: Describable
Gets the descriptor for this instance.

Descriptor is a singleton for every concrete Describable implementation, so if a.getClass()==b.getClass() then a.getDescriptor()==b.getDescriptor() must hold.

Specified by:
getDescriptor in interface Describable<NodeMonitor>

data

public Object data(Computer c)
Obtains the monitoring result currently available, or null if no data is available.


triggerUpdate

public Thread triggerUpdate()
Starts updating the data asynchronously. If there's any previous updating activity going on, it'll be interrupted and aborted.

Returns:
Thread object that carries out the update operation. You can use this to interrupt the execution or waits for the completion. Always non-null
Since:
1.232

getAll

public static List<NodeMonitor> getAll()
Obtains all the instances of NodeMonitors that are alive.

Since:
1.187

isIgnored

public boolean isIgnored()
True if this monitoring shouldn't mark the slaves offline.

Many NodeMonitors implement a logic that if the value goes above/below a threshold, the slave will be marked offline as a preventive measure. This flag controls that.

Unlike Publisher, where the absence of an instance indicates that it's disengaged, in NodeMonitor this boolean flag is used to indicate the disengagement, so that monitors work in opt-out basis.


setIgnored

public void setIgnored(boolean ignored)

all

public static DescriptorExtensionList<NodeMonitor,Descriptor<NodeMonitor>> all()
Returns all the registered NodeMonitor descriptors.



Copyright © 2004-2013. All Rights Reserved.