meta-ibm: monitor /tmp and /var in health monitor

IBM systems utilize /tmp and /var for a variety of purposes so setup the
health monitor to look at the remaining space in these file systems. No
action at this time other then a log in the journal to provide a clue
when looking at an issue.

Tested:
- Filled up /tmp and verified this log:
  “Aug 19 19:59:43 p10bmc health-monitor[326]: ASSERT: sensor Storage_TMP is above the upper threshold critical high”
- Removed big file from /tmp and verified this log:
  "Aug 19 20:01:34 p10bmc health-monitor[326]: DEASSERT: sensor Storage_TMP is under the upper threshold critical high”

Signed-off-by: NodeMan97 <corey.hardesty@icloud.com>
Change-Id: I8a7921dffa6b756a4ab19a0e807e558ccd35f996
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-ibm/recipes-phosphor/health/files/bmc_health_config.json b/meta-ibm/recipes-phosphor/health/files/bmc_health_config.json
new file mode 100644
index 0000000..39d8484
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/health/files/bmc_health_config.json
@@ -0,0 +1,63 @@
+{
+  "CPU" : {
+    "Frequency" : 1,
+    "Window_size": 120,
+    "Threshold":
+    {
+        "Critical":
+        {
+            "Value": 90.0,
+            "Log": true,
+            "Target": ""
+        },
+        "Warning":
+        {
+            "Value": 80.0,
+            "Log": false,
+            "Target": ""
+        }
+    }
+  },
+  "Memory" : {
+    "Frequency" : 1,
+    "Window_size": 120,
+    "Threshold":
+    {
+        "Critical":
+        {
+            "Value": 85.0,
+            "Log": true,
+            "Target": ""
+        }
+    }
+  },
+  "Storage_VAR" : {
+    "Path" : "/var",
+    "Frequency" : 1,
+    "Window_size": 120,
+    "Threshold":
+    {
+         "Critical":
+         {
+             "Value": 85.0,
+             "Log": true,
+             "Target": ""
+          }
+    }
+  },
+  "Storage_TMP" : {
+    "Path" : "/tmp",
+    "Frequency" : 1,
+    "Window_size":120,
+    "Threshold":
+    {
+        "Critical":
+        {
+            "Value": 85.0,
+            "Log": true,
+            "Target": ""
+         }
+    }
+  }
+}
+
diff --git a/meta-ibm/recipes-phosphor/health/phosphor-health-monitor_%.bbappend b/meta-ibm/recipes-phosphor/health/phosphor-health-monitor_%.bbappend
new file mode 100644
index 0000000..3bd3817
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/health/phosphor-health-monitor_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+SRC_URI:append = " file://bmc_health_config.json \
+                 "
+do_install:append() {
+    install -d ${D}/${sysconfdir}/healthMon/
+    install -m 0644 ${WORKDIR}/bmc_health_config.json ${D}/${sysconfdir}/healthMon/
+}
+