Package hudson.node_monitors
Class NodeMonitor
java.lang.Object
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
Node
s.
Views
- column.jelly
-
Invoked from
ComputerSet
index.jelly
to render a column. TheNodeMonitor
instance is accessible through the "from" variable. Also seegetColumnCaption()
. - config.jelly (optional)
-
Configuration fragment to be displayed in
http://server/hudson/computer/configure
. Used for configuring the threshold for taking nodes offline.
Persistence
NodeMonitor
s are persisted via XStream.
CasC
To be able to configureNodeMonitor
s via JCasC, they should have a DataBoundConstructor
- Since:
- 1.123
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DescriptorList<NodeMonitor>
Deprecated.as of 1.286. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionall()
Returns all the registeredNodeMonitor
descriptors.Obtains the monitoring result currently available, or null if no data is available.static List<NodeMonitor>
getAll()
Obtains all the instances ofNodeMonitor
s that are alive.Returns the name of the column to be added toComputerSet
index.jelly.Gets the descriptor for this instance.boolean
True if this monitoring shouldn't mark the agents offline.void
setIgnored
(boolean ignored) Starts updating the data asynchronously.
-
Field Details
-
LIST
All registeredNodeMonitor
s.
-
-
Constructor Details
-
NodeMonitor
public NodeMonitor()
-
-
Method Details
-
getColumnCaption
Returns the name of the column to be added toComputerSet
index.jelly.- Returns:
- null to not render a column. The convention is to use capitalization like "Foo Bar Zot".
-
getDescriptor
Description copied from interface:Describable
Gets the descriptor for this instance.Descriptor
is a singleton for every concreteDescribable
implementation, so ifa.getClass() == b.getClass()
then by defaulta.getDescriptor() == b.getDescriptor()
as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)- Specified by:
getDescriptor
in interfaceDescribable<NodeMonitor>
-
data
Obtains the monitoring result currently available, or null if no data is available. -
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
Obtains all the instances ofNodeMonitor
s that are alive.- Since:
- 1.187
-
isIgnored
public boolean isIgnored()True if this monitoring shouldn't mark the agents offline.Many
NodeMonitor
s implement a logic that if the value goes above/below a threshold, the agent 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, inNodeMonitor
this boolean flag is used to indicate the disengagement, so that monitors work in opt-out basis. -
setIgnored
@DataBoundSetter public void setIgnored(boolean ignored) -
all
Returns all the registeredNodeMonitor
descriptors.
-