From e01d4ef1f115b9ca73ab7e9234c10fae0b02ddc8 Mon Sep 17 00:00:00 2001 From: Jayashree Dhanapal Date: Thu, 22 Sep 2022 20:01:32 +0530 Subject: meta-facebook: Add json file for health monitor. BMC health monitor json file is added for Facebook platform to monitor the CPU, Memory and Storage usage. It will reboot the target, once it exceeds the critical threshold value. Tested: Tested in Facebook YosemiteV3.5 platform Signed-off-by: Jayashree Dhanapal Change-Id: Ieb7486b558de087fac7e9acaba1d88771a5b7626 --- .../health/files/bmc_health_config.json | 54 ++++++++++++++++++++++ .../health/phosphor-health-monitor_%.bbappend | 3 ++ 2 files changed, 57 insertions(+) create mode 100644 meta-facebook/recipes-phosphor/health/files/bmc_health_config.json create mode 100644 meta-facebook/recipes-phosphor/health/phosphor-health-monitor_%.bbappend diff --git a/meta-facebook/recipes-phosphor/health/files/bmc_health_config.json b/meta-facebook/recipes-phosphor/health/files/bmc_health_config.json new file mode 100644 index 0000000000..0807bae899 --- /dev/null +++ b/meta-facebook/recipes-phosphor/health/files/bmc_health_config.json @@ -0,0 +1,54 @@ +{ + "CPU" : { + "Frequency" : 1, + "Window_size": 120, + "Threshold": + { + "Critical": + { + "Value": 90.0, + "Log": true, + "Target": "reboot.target" + }, + "Warning": + { + "Value": 80.0, + "Log": true, + "Target": "" + } + } + }, + "Memory" : { + "Frequency" : 1, + "Window_size": 120, + "Threshold": + { + "Critical": + { + "Value": 85.0, + "Log": true, + "Target": "reboot.target" + } + } + }, + "Storage_RW" : { + "Path" : "/run/initramfs/rw", + "Frequency" : 1, + "Window_size": 120, + "Threshold": + { + "Critical": + { + "Value": 95.0, + "Log": true, + "Target": "" + }, + "Warning": + { + "Value": 90.0, + "Log": true, + "Target": "" + } + } + } +} diff --git a/meta-facebook/recipes-phosphor/health/phosphor-health-monitor_%.bbappend b/meta-facebook/recipes-phosphor/health/phosphor-health-monitor_%.bbappend new file mode 100644 index 0000000000..c0e8f7d565 --- /dev/null +++ b/meta-facebook/recipes-phosphor/health/phosphor-health-monitor_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +SRC_URI:append = " file://bmc_health_config.json \ + " -- cgit v1.2.3