Package org.elasticsearch.monitor.fs
Class FsHealthService
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.monitor.fs.FsHealthService
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LifecycleComponent
,Releasable
,NodeHealthService
public class FsHealthService extends AbstractLifecycleComponent implements NodeHealthService
Runs periodically and attempts to create a temp file to see if the filesystem is writable. If not then it marks the
path as unhealthy.
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.lang.Boolean>
ENABLED_SETTING
static Setting<org.elasticsearch.common.unit.TimeValue>
REFRESH_INTERVAL_SETTING
static Setting<org.elasticsearch.common.unit.TimeValue>
SLOW_PATH_LOGGING_THRESHOLD_SETTING
-
Constructor Summary
Constructors Constructor Description FsHealthService(Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool, NodeEnvironment nodeEnv)
-
Method Summary
Modifier and Type Method Description protected void
doClose()
protected void
doStart()
protected void
doStop()
StatusInfo
getHealth()
void
setEnabled(boolean enabled)
void
setSlowPathLoggingThreshold(org.elasticsearch.common.unit.TimeValue slowPathLoggingThreshold)
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
-
Field Details
-
ENABLED_SETTING
-
REFRESH_INTERVAL_SETTING
-
SLOW_PATH_LOGGING_THRESHOLD_SETTING
public static final Setting<org.elasticsearch.common.unit.TimeValue> SLOW_PATH_LOGGING_THRESHOLD_SETTING
-
-
Constructor Details
-
FsHealthService
public FsHealthService(Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool, NodeEnvironment nodeEnv)
-
-
Method Details
-
doStart
protected void doStart()- Specified by:
doStart
in classAbstractLifecycleComponent
-
doStop
protected void doStop()- Specified by:
doStop
in classAbstractLifecycleComponent
-
doClose
protected void doClose()- Specified by:
doClose
in classAbstractLifecycleComponent
-
setEnabled
public void setEnabled(boolean enabled) -
setSlowPathLoggingThreshold
public void setSlowPathLoggingThreshold(org.elasticsearch.common.unit.TimeValue slowPathLoggingThreshold) -
getHealth
- Specified by:
getHealth
in interfaceNodeHealthService
-