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_SETTINGstatic Setting<org.elasticsearch.common.unit.TimeValue>REFRESH_INTERVAL_SETTINGstatic Setting<org.elasticsearch.common.unit.TimeValue>SLOW_PATH_LOGGING_THRESHOLD_SETTINGFields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle -
Constructor Summary
Constructors Constructor Description FsHealthService(Settings settings, ClusterSettings clusterSettings, ThreadPool threadPool, NodeEnvironment nodeEnv) -
Method Summary
Modifier and Type Method Description protected voiddoClose()protected voiddoStart()protected voiddoStop()StatusInfogetHealth()voidsetEnabled(boolean enabled)voidsetSlowPathLoggingThreshold(org.elasticsearch.common.unit.TimeValue slowPathLoggingThreshold)Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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:
doStartin classAbstractLifecycleComponent
-
doStop
protected void doStop()- Specified by:
doStopin classAbstractLifecycleComponent
-
doClose
protected void doClose()- Specified by:
doClosein classAbstractLifecycleComponent
-
setEnabled
public void setEnabled(boolean enabled) -
setSlowPathLoggingThreshold
public void setSlowPathLoggingThreshold(org.elasticsearch.common.unit.TimeValue slowPathLoggingThreshold) -
getHealth
- Specified by:
getHealthin interfaceNodeHealthService
-