2019-03-17 10:29:27 +00:00
.. _diskprediction:
2018-09-14 17:42:27 +00:00
=====================
2019-02-27 12:49:47 +00:00
Diskprediction Module
2018-09-14 17:42:27 +00:00
=====================
2020-08-17 07:37:34 +00:00
The *diskprediction* module leverages Ceph device health check to collect disk health metrics and uses internal predictor module to produce the disk failure prediction and returns back to Ceph. It doesn't require any external server for data analysis and output results. Its internal predictor's accuracy is around 70%.
2018-09-14 17:42:27 +00:00
Enabling
========
2020-08-17 07:37:34 +00:00
Run the following command to enable the *diskprediction_local* module in the Ceph
2018-10-25 13:30:49 +00:00
environment::
2018-09-14 17:42:27 +00:00
2018-11-07 14:05:35 +00:00
ceph mgr module enable diskprediction_local
2018-09-14 17:42:27 +00:00
2020-08-17 07:37:34 +00:00
To enable the local predictor::
2018-09-14 17:42:27 +00:00
2018-11-05 06:04:55 +00:00
ceph config set global device_failure_prediction_mode local
2018-10-25 13:30:49 +00:00
2021-11-30 07:27:26 +00:00
To disable prediction::
2018-09-14 17:42:27 +00:00
2020-08-17 07:37:34 +00:00
ceph config set global device_failure_prediction_mode none
2018-09-14 17:42:27 +00:00
2020-08-17 08:36:09 +00:00
*diskprediction_local* requires at least six datasets of device health metrics to
2022-06-26 03:09:51 +00:00
make prediction of the devices' life expectancy. And these health metrics are
2020-08-17 08:36:09 +00:00
collected only if health monitoring is :ref: `enabled <enabling-monitoring>` .
2020-08-17 07:37:34 +00:00
Run the following command to retrieve the life expectancy of given device.
2018-09-14 17:42:27 +00:00
::
ceph device predict-life-expectancy <device id>
2020-08-17 08:36:09 +00:00
Configuration
=============
The module performs the prediction on a daily basis by default. You can adjust
this interval with::
ceph config set mgr mgr/diskprediction_local/predict_interval <interval-in-seconds>
2018-09-14 17:42:27 +00:00
Debugging
=========
If you want to debug the DiskPrediction module mapping to Ceph logging level,
use the following command.
::
[mgr]
debug mgr = 20
2019-02-27 12:49:47 +00:00
With logging set to debug for the manager the module will print out logging
2018-09-14 17:42:27 +00:00
message with prefix *mgr[diskprediction]* for easy filtering.