1 #pragma once
2 /****************************************************************
3  *                 READ THIS WARNING FIRST
4  * This is an auto-generated header which contains definitions
5  * for Redfish DMTF defined messages.
6  * DO NOT modify this registry outside of running the
7  * parse_registries.py script.  The definitions contained within
8  * this file are owned by DMTF.  Any modifications to these files
9  * should be first pushed to the relevant registry in the DMTF
10  * github organization.
11  ***************************************************************/
12 #include "registries.hpp"
13 
14 #include <array>
15 
16 // clang-format off
17 
18 namespace redfish::registries::telemetry
19 {
20 const Header header = {
21     "Copyright 2023 DMTF. All rights reserved.",
22     "#MessageRegistry.v1_6_2.MessageRegistry",
23     "Telemetry.1.0.0",
24     "Telemetry Message Registry",
25     "en",
26     "This registry defines the messages for telemetry related events.",
27     "Telemetry",
28     "1.0.0",
29     "DMTF",
30 };
31 constexpr const char* url =
32     "https://redfish.dmtf.org/registries/Telemetry.1.0.0.json";
33 
34 constexpr std::array registry =
35 {
36     MessageEntry{
37         "TriggerDiscreteConditionMet",
38         {
39             "Indicates that a discrete trigger condition is met.",
40             "Metric '%1' has the value '%2', which meets the discrete condition of trigger '%3'",
41             "OK",
42             3,
43             {
44                 "string",
45                 "string",
46                 "string",
47             },
48             "Check the condition of the metric that reported the trigger.",
49         }},
50     MessageEntry{
51         "TriggerNumericAboveLowerCritical",
52         {
53             "Indicates that a numeric metric reading is no longer below the lower critical trigger threshold, but is still outside of normal operating range.",
54             "Metric '%1' value of %2 is now above the %3 lower critical threshold of trigger '%4' but remains outside of normal range",
55             "Warning",
56             4,
57             {
58                 "string",
59                 "number",
60                 "number",
61                 "string",
62             },
63             "Check the condition of the metric that reported the trigger.",
64         }},
65     MessageEntry{
66         "TriggerNumericAboveUpperCritical",
67         {
68             "Indicates that a numeric metric reading is above the upper critical trigger threshold.",
69             "Metric '%1' value of %2 is above the %3 upper critical threshold of trigger '%4'",
70             "Critical",
71             4,
72             {
73                 "string",
74                 "number",
75                 "number",
76                 "string",
77             },
78             "Check the condition of the metric that reported the trigger.",
79         }},
80     MessageEntry{
81         "TriggerNumericAboveUpperWarning",
82         {
83             "Indicates that a numeric metric reading is above the upper warning trigger threshold.",
84             "Metric '%1' value of %2 is above the %3 upper warning threshold of trigger '%4'",
85             "Warning",
86             4,
87             {
88                 "string",
89                 "number",
90                 "number",
91                 "string",
92             },
93             "Check the condition of the metric that reported the trigger.",
94         }},
95     MessageEntry{
96         "TriggerNumericBelowLowerCritical",
97         {
98             "Indicates that a numeric metric reading is below the lower critical trigger threshold.",
99             "Metric '%1' value of %2 is below the %3 lower critical threshold of trigger '%4'",
100             "Critical",
101             4,
102             {
103                 "string",
104                 "number",
105                 "number",
106                 "string",
107             },
108             "Check the condition of the metric that reported the trigger.",
109         }},
110     MessageEntry{
111         "TriggerNumericBelowLowerWarning",
112         {
113             "Indicates that a numeric metric reading is below the lower warning trigger threshold.",
114             "Metric '%1' value of %2 is below the %3 lower warning threshold of trigger '%4'",
115             "Warning",
116             4,
117             {
118                 "string",
119                 "number",
120                 "number",
121                 "string",
122             },
123             "Check the condition of the metric that reported the trigger.",
124         }},
125     MessageEntry{
126         "TriggerNumericBelowUpperCritical",
127         {
128             "Indicates that a numeric metric reading is no longer above the upper critical trigger threshold, but is still outside of normal operating range.",
129             "Metric '%1' value of %2 is now below the %3 upper critical threshold of trigger '%4' but remains outside of normal range",
130             "Warning",
131             4,
132             {
133                 "string",
134                 "number",
135                 "number",
136                 "string",
137             },
138             "Check the condition of the metric that reported the trigger.",
139         }},
140     MessageEntry{
141         "TriggerNumericReadingNormal",
142         {
143             "Indicates that a numeric metric reading is now within normal operating range.",
144             "Metric '%1' value of %2 is within normal operating range of trigger '%3'",
145             "OK",
146             3,
147             {
148                 "string",
149                 "number",
150                 "string",
151             },
152             "None.",
153         }},
154 
155 };
156 
157 enum class Index
158 {
159     triggerDiscreteConditionMet = 0,
160     triggerNumericAboveLowerCritical = 1,
161     triggerNumericAboveUpperCritical = 2,
162     triggerNumericAboveUpperWarning = 3,
163     triggerNumericBelowLowerCritical = 4,
164     triggerNumericBelowLowerWarning = 5,
165     triggerNumericBelowUpperCritical = 6,
166     triggerNumericReadingNormal = 7,
167 };
168 } // namespace redfish::registries::telemetry
169