xref: /openbmc/bmcweb/features/redfish/include/registries/telemetry_message_registry.hpp (revision 4a102cd48c588d32c0a4d6610b4a9ed616f255f3)
140e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
240e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3665e7602SGunnar Mills #pragma once
4665e7602SGunnar Mills /****************************************************************
5665e7602SGunnar Mills  *                 READ THIS WARNING FIRST
6665e7602SGunnar Mills  * This is an auto-generated header which contains definitions
7665e7602SGunnar Mills  * for Redfish DMTF defined messages.
8665e7602SGunnar Mills  * DO NOT modify this registry outside of running the
9665e7602SGunnar Mills  * parse_registries.py script.  The definitions contained within
10665e7602SGunnar Mills  * this file are owned by DMTF.  Any modifications to these files
11665e7602SGunnar Mills  * should be first pushed to the relevant registry in the DMTF
12665e7602SGunnar Mills  * github organization.
13665e7602SGunnar Mills  ***************************************************************/
14665e7602SGunnar Mills #include "registries.hpp"
15665e7602SGunnar Mills 
16665e7602SGunnar Mills #include <array>
17665e7602SGunnar Mills 
18665e7602SGunnar Mills // clang-format off
19665e7602SGunnar Mills 
20*4a102cd4SPatrick Williams namespace redfish::registries
21665e7602SGunnar Mills {
22*4a102cd4SPatrick Williams struct Telemetry
23*4a102cd4SPatrick Williams {
24*4a102cd4SPatrick Williams static constexpr Header header = {
25665e7602SGunnar Mills     "Copyright 2023 DMTF. All rights reserved.",
26665e7602SGunnar Mills     "#MessageRegistry.v1_6_2.MessageRegistry",
2756b81992SEd Tanous     1,
2856b81992SEd Tanous     0,
2956b81992SEd Tanous     0,
30665e7602SGunnar Mills     "Telemetry Message Registry",
31665e7602SGunnar Mills     "en",
32665e7602SGunnar Mills     "This registry defines the messages for telemetry related events.",
33665e7602SGunnar Mills     "Telemetry",
34665e7602SGunnar Mills     "DMTF",
35665e7602SGunnar Mills };
36*4a102cd4SPatrick Williams 
37*4a102cd4SPatrick Williams static constexpr const char* url =
38665e7602SGunnar Mills     "https://redfish.dmtf.org/registries/Telemetry.1.0.0.json";
39665e7602SGunnar Mills 
40*4a102cd4SPatrick Williams static constexpr std::array registry =
41665e7602SGunnar Mills {
42665e7602SGunnar Mills     MessageEntry{
43665e7602SGunnar Mills         "TriggerDiscreteConditionMet",
44665e7602SGunnar Mills         {
45665e7602SGunnar Mills             "Indicates that a discrete trigger condition is met.",
46665e7602SGunnar Mills             "Metric '%1' has the value '%2', which meets the discrete condition of trigger '%3'",
47665e7602SGunnar Mills             "OK",
48665e7602SGunnar Mills             3,
49665e7602SGunnar Mills             {
50665e7602SGunnar Mills                 "string",
51665e7602SGunnar Mills                 "string",
52665e7602SGunnar Mills                 "string",
53665e7602SGunnar Mills             },
54665e7602SGunnar Mills             "Check the condition of the metric that reported the trigger.",
55665e7602SGunnar Mills         }},
56665e7602SGunnar Mills     MessageEntry{
57665e7602SGunnar Mills         "TriggerNumericAboveLowerCritical",
58665e7602SGunnar Mills         {
59665e7602SGunnar Mills             "Indicates that a numeric metric reading is no longer below the lower critical trigger threshold, but is still outside of normal operating range.",
60665e7602SGunnar Mills             "Metric '%1' value of %2 is now above the %3 lower critical threshold of trigger '%4' but remains outside of normal range",
61665e7602SGunnar Mills             "Warning",
62665e7602SGunnar Mills             4,
63665e7602SGunnar Mills             {
64665e7602SGunnar Mills                 "string",
65665e7602SGunnar Mills                 "number",
66665e7602SGunnar Mills                 "number",
67665e7602SGunnar Mills                 "string",
68665e7602SGunnar Mills             },
69665e7602SGunnar Mills             "Check the condition of the metric that reported the trigger.",
70665e7602SGunnar Mills         }},
71665e7602SGunnar Mills     MessageEntry{
72665e7602SGunnar Mills         "TriggerNumericAboveUpperCritical",
73665e7602SGunnar Mills         {
74665e7602SGunnar Mills             "Indicates that a numeric metric reading is above the upper critical trigger threshold.",
75665e7602SGunnar Mills             "Metric '%1' value of %2 is above the %3 upper critical threshold of trigger '%4'",
76665e7602SGunnar Mills             "Critical",
77665e7602SGunnar Mills             4,
78665e7602SGunnar Mills             {
79665e7602SGunnar Mills                 "string",
80665e7602SGunnar Mills                 "number",
81665e7602SGunnar Mills                 "number",
82665e7602SGunnar Mills                 "string",
83665e7602SGunnar Mills             },
84665e7602SGunnar Mills             "Check the condition of the metric that reported the trigger.",
85665e7602SGunnar Mills         }},
86665e7602SGunnar Mills     MessageEntry{
87665e7602SGunnar Mills         "TriggerNumericAboveUpperWarning",
88665e7602SGunnar Mills         {
89665e7602SGunnar Mills             "Indicates that a numeric metric reading is above the upper warning trigger threshold.",
90665e7602SGunnar Mills             "Metric '%1' value of %2 is above the %3 upper warning threshold of trigger '%4'",
91665e7602SGunnar Mills             "Warning",
92665e7602SGunnar Mills             4,
93665e7602SGunnar Mills             {
94665e7602SGunnar Mills                 "string",
95665e7602SGunnar Mills                 "number",
96665e7602SGunnar Mills                 "number",
97665e7602SGunnar Mills                 "string",
98665e7602SGunnar Mills             },
99665e7602SGunnar Mills             "Check the condition of the metric that reported the trigger.",
100665e7602SGunnar Mills         }},
101665e7602SGunnar Mills     MessageEntry{
102665e7602SGunnar Mills         "TriggerNumericBelowLowerCritical",
103665e7602SGunnar Mills         {
104665e7602SGunnar Mills             "Indicates that a numeric metric reading is below the lower critical trigger threshold.",
105665e7602SGunnar Mills             "Metric '%1' value of %2 is below the %3 lower critical threshold of trigger '%4'",
106665e7602SGunnar Mills             "Critical",
107665e7602SGunnar Mills             4,
108665e7602SGunnar Mills             {
109665e7602SGunnar Mills                 "string",
110665e7602SGunnar Mills                 "number",
111665e7602SGunnar Mills                 "number",
112665e7602SGunnar Mills                 "string",
113665e7602SGunnar Mills             },
114665e7602SGunnar Mills             "Check the condition of the metric that reported the trigger.",
115665e7602SGunnar Mills         }},
116665e7602SGunnar Mills     MessageEntry{
117665e7602SGunnar Mills         "TriggerNumericBelowLowerWarning",
118665e7602SGunnar Mills         {
119665e7602SGunnar Mills             "Indicates that a numeric metric reading is below the lower warning trigger threshold.",
120665e7602SGunnar Mills             "Metric '%1' value of %2 is below the %3 lower warning threshold of trigger '%4'",
121665e7602SGunnar Mills             "Warning",
122665e7602SGunnar Mills             4,
123665e7602SGunnar Mills             {
124665e7602SGunnar Mills                 "string",
125665e7602SGunnar Mills                 "number",
126665e7602SGunnar Mills                 "number",
127665e7602SGunnar Mills                 "string",
128665e7602SGunnar Mills             },
129665e7602SGunnar Mills             "Check the condition of the metric that reported the trigger.",
130665e7602SGunnar Mills         }},
131665e7602SGunnar Mills     MessageEntry{
132665e7602SGunnar Mills         "TriggerNumericBelowUpperCritical",
133665e7602SGunnar Mills         {
134665e7602SGunnar Mills             "Indicates that a numeric metric reading is no longer above the upper critical trigger threshold, but is still outside of normal operating range.",
135665e7602SGunnar Mills             "Metric '%1' value of %2 is now below the %3 upper critical threshold of trigger '%4' but remains outside of normal range",
136665e7602SGunnar Mills             "Warning",
137665e7602SGunnar Mills             4,
138665e7602SGunnar Mills             {
139665e7602SGunnar Mills                 "string",
140665e7602SGunnar Mills                 "number",
141665e7602SGunnar Mills                 "number",
142665e7602SGunnar Mills                 "string",
143665e7602SGunnar Mills             },
144665e7602SGunnar Mills             "Check the condition of the metric that reported the trigger.",
145665e7602SGunnar Mills         }},
146665e7602SGunnar Mills     MessageEntry{
147665e7602SGunnar Mills         "TriggerNumericReadingNormal",
148665e7602SGunnar Mills         {
149665e7602SGunnar Mills             "Indicates that a numeric metric reading is now within normal operating range.",
150665e7602SGunnar Mills             "Metric '%1' value of %2 is within normal operating range of trigger '%3'",
151665e7602SGunnar Mills             "OK",
152665e7602SGunnar Mills             3,
153665e7602SGunnar Mills             {
154665e7602SGunnar Mills                 "string",
155665e7602SGunnar Mills                 "number",
156665e7602SGunnar Mills                 "string",
157665e7602SGunnar Mills             },
158665e7602SGunnar Mills             "None.",
159665e7602SGunnar Mills         }},
160665e7602SGunnar Mills 
161665e7602SGunnar Mills };
162665e7602SGunnar Mills 
163665e7602SGunnar Mills enum class Index
164665e7602SGunnar Mills {
165665e7602SGunnar Mills     triggerDiscreteConditionMet = 0,
166665e7602SGunnar Mills     triggerNumericAboveLowerCritical = 1,
167665e7602SGunnar Mills     triggerNumericAboveUpperCritical = 2,
168665e7602SGunnar Mills     triggerNumericAboveUpperWarning = 3,
169665e7602SGunnar Mills     triggerNumericBelowLowerCritical = 4,
170665e7602SGunnar Mills     triggerNumericBelowLowerWarning = 5,
171665e7602SGunnar Mills     triggerNumericBelowUpperCritical = 6,
172665e7602SGunnar Mills     triggerNumericReadingNormal = 7,
173665e7602SGunnar Mills };
174*4a102cd4SPatrick Williams }; // struct telemetry
175*4a102cd4SPatrick Williams 
176*4a102cd4SPatrick Williams [[gnu::constructor]] inline void registerTelemetry()
177*4a102cd4SPatrick Williams { registerRegistry<Telemetry>(); }
178*4a102cd4SPatrick Williams 
179*4a102cd4SPatrick Williams } // namespace redfish::registries
180