File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
server/src/main/java/org/opensearch/monitor/fs Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 63
63
import java .util .function .LongSupplier ;
64
64
import java .util .stream .Collectors ;
65
65
66
- import static org .opensearch .monitor .StatusInfo .Status .HEALTHY ;
67
- import static org .opensearch .monitor .StatusInfo .Status .UNHEALTHY ;
66
+ import static org .opensearch .monitor .StatusInfo .Status .*;
68
67
69
68
/**
70
69
* Runs periodically and attempts to create a temp file to see if the filesystem is writable. If not then it marks the
@@ -226,14 +225,10 @@ public void run() {
226
225
private void emitMetric () {
227
226
StatusInfo healthStatus = getHealth ();
228
227
if (healthStatus .getStatus () == UNHEALTHY ) {
229
- incrementCounter ( fsHealthFailCounter , 1.0 );
228
+ fsHealthFailCounter . add ( 1.0 );
230
229
}
231
230
}
232
231
233
- private void incrementCounter (Counter counter , Double value ) {
234
- counter .add (value );
235
- }
236
-
237
232
private void monitorFSHealth () {
238
233
Set <Path > currentUnhealthyPaths = null ;
239
234
Path [] paths = null ;
You can’t perform that action at this time.
0 commit comments