1# bmc_health_config.json
2
3This file outlines the format for the supplemental health metric config that can
4be supplied by the platform to override the default in-code config from
5health_metric_config.cpp.
6
7The json config may have following metric types -
8
9- `CPU`
10  - This indicates the total CPU utilization.
11- `CPU_User`
12  - This indicates the user level CPU utilization.
13- `CPU_Kernel`
14  - This indicates the kernel level CPU utilization.
15- `Memory`
16  - This indicates the total memory for the system, which is a constant metric
17    and doesn't change.
18- `Memory_Available`
19  - This indicates the memory which is not used, in addition to buffered &
20    cached memory that can be made available by OS depending on need.
21- `Memory_Free`
22  - This indicates the amount of un-used memory.
23- `Memory_Shared`
24  - This indicates the amount of memory being shared between processes within
25    the system.
26- `Memory_Buffered_And_Cached`
27  - This indicates the amount of memory being used for caching and temporary
28    buffers.
29- `Storage_RW`
30  - This indicates the amount of available storage space
31- `Storage_`\<xxx>
32  - This indicates the amount of availble space for type depicted by `<xxx>` for
33    the location backed by path parameter.
34
35The metric types may have the following attributes:
36
37- `Window_size`
38  - This indicates the number of samples being used for threshold value
39    computations.
40- `Path`
41  - The path attribute is applicable to storage metrics and indicates the
42    directory path for it.
43- `Threshold`
44  - The following threshold levels (with bounds) are supported.
45    - `HardShutdown_Lower`
46    - `HardShutdown_Upper`
47    - `SoftShutdown_Lower`
48    - `SoftShutdown_Upper`
49    - `PerformanceLoss_Lower`
50    - `PerformanceLoss_Upper`
51    - `Critical_Lower`
52    - `Critical_Upper`
53    - `Warning_Lower`
54    - `Warning_Upper`
55  - Threshold may have following attributes
56    - `Value`
57      - This indicates the percentage value at which specific threshold gets
58        asserted.
59        - For lower bound, the threshold gets asserted if metric value falls
60          below the specified threshold percentage value.
61        - For upper bound, the threshold gets asserted if metric value goes
62          beyond the specified threshold percentage value.
63    - `Log` -A boolean value of true/false depicts if a critical system message
64      shall be logged when threshold gets asserted.
65    - `Target`
66      - This indicates the systemd target which shall be run when the specific
67        threshold gets asserted.
68
69Example:
70
71```json
72    "CPU": {
73        "Window_size": 120,
74        "Threshold": {
75            "Critical_Upper": {
76                "Value": 90.0,
77                "Log": true,
78                "Target": ""
79            },
80            "Warning_Upper": {
81                "Value": 80.0,
82                "Log": false,
83                "Target": ""
84            }
85        }
86    }
87```
88