@@ -110,18 +110,22 @@ class ProgramStatus : public Program
110110
111111 /* GENERAL PARAMETERS */
112112 if (mOptions .monitoring ) {
113- monitoring->send (Metric{ cardIdString, " CRORC" }
113+ monitoring->send (Metric{ " CRORC" }
114+ .addValue (card.pciAddress .toString (), " pciAddress" )
114115 .addValue (qsfpEnabled, " qsfp" )
115116 .addValue (offset, " offset" )
116117 .addValue (timeFrameDetectionEnabled, " timeFrameDetection" )
117- .addValue (reportInfo.timeFrameLength , " timeFrameLength" ));
118+ .addValue (reportInfo.timeFrameLength , " timeFrameLength" )
119+ .addTag (tags::Key::ID, card.sequenceId )
120+ .addTag (tags::Key::Type, tags::Value::CRORC));
118121 } else if (mOptions .jsonOut ) {
119122 root.put (" qsfp" , qsfpEnabled);
120123 root.put (" offset" , offset);
121124 root.put (" timeFrameDetection" , timeFrameDetectionEnabled);
122125 root.put (" timeFrameLength" , reportInfo.timeFrameLength );
123126 } else if (mOptions .csvOut ) {
124127 auto csvLine = std::string (" ,,," ) + qsfpEnabled + " ," + offset + " ," + timeFrameDetectionEnabled + " ," + std::to_string (reportInfo.timeFrameLength ) + " \n " ;
128+
125129 std::cout << csvLine;
126130 } else {
127131 std::cout << " -----------------------------" << std::endl;
@@ -142,9 +146,12 @@ class ProgramStatus : public Program
142146 float opticalPower = link.opticalPower ;
143147
144148 if (mOptions .monitoring ) {
145- monitoring->send (Metric{ id, " link" }
149+ monitoring->send (Metric{ " link" }
150+ .addValue (card.pciAddress .toString (), " pciAddress" )
146151 .addValue (linkStatus, " status" )
147- .addValue (opticalPower, " opticalPower" ));
152+ .addValue (opticalPower, " opticalPower" )
153+ .addTag (tags::Key::CRORC, card.sequenceId )
154+ .addTag (tags::Key::ID, id));
148155 } else if (mOptions .jsonOut ) {
149156 pt::ptree linkNode;
150157
@@ -188,10 +195,13 @@ class ProgramStatus : public Program
188195
189196 /* GENERAL PARAMETERS */
190197 if (mOptions .monitoring ) {
191- monitoring->send (Metric{ cardIdString, " CRU" }
198+ monitoring->send (Metric{ " CRU" }
199+ .addValue (card.pciAddress .toString (), " pciAddress" )
192200 .addValue (clock, " clock" )
193201 .addValue (offset, " offset" )
194- .addValue (userLogic, " userLogic" ));
202+ .addValue (userLogic, " userLogic" )
203+ .addTag (tags::Key::ID, card.sequenceId )
204+ .addTag (tags::Key::Type, tags::Value::CRU));
195205 } else if (mOptions .jsonOut ) {
196206 root.put (" clock" , clock);
197207 root.put (" offset" , offset);
@@ -249,7 +259,8 @@ class ProgramStatus : public Program
249259 float opticalPower = link.opticalPower ;
250260
251261 if (mOptions .monitoring ) {
252- monitoring->send (Metric{ globalId, " link" }
262+ monitoring->send (Metric{ " link" }
263+ .addValue (card.pciAddress .toString (), " pciAddress" )
253264 .addValue (gbtTxRxMode, " gbtMode" )
254265 .addValue (loopback, " loopback" )
255266 .addValue (gbtMux, " gbtMux" )
@@ -258,7 +269,9 @@ class ProgramStatus : public Program
258269 .addValue (rxFreq, " rxFreq" )
259270 .addValue (txFreq, " txFreq" )
260271 .addValue (linkStatus, " status" )
261- .addValue (opticalPower, " opticalPower" ));
272+ .addValue (opticalPower, " opticalPower" )
273+ .addTag (tags::Key::CRU, card.sequenceId )
274+ .addTag (tags::Key::ID, globalId));
262275 } else if (mOptions .jsonOut ) {
263276 pt::ptree linkNode;
264277
0 commit comments