Skip to content

Commit 9c25c52

Browse files
committed
[roc-status] Add tags to onu metric
1 parent 1a4a536 commit 9c25c52

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ metric format for the CRORC and the CRU is different, as different parameters ar
553553
554554
| Value name | Value | Type |
555555
| -------------------| --------------------------- | ------ |
556-
| `"onuStatus"` | 0/1/2 (DOWN/UP/UP was DOWN) | int |
556+
| `"onuStickyStatus"`| 0/1/2 (DOWN/UP/UP was DOWN) | int |
557557
| `"onuAddress"` | ONU Address | string |
558558
| `"rx40Locked"` | 0/1 (False/True) | int |
559559
| `"phaseGood"` | 0/1 (False/True) | int |
@@ -564,6 +564,12 @@ metric format for the CRORC and the CRU is different, as different parameters ar
564564
| `"mgtTxPllLocked"` | 0/1 (False/True) | int |
565565
| `"mgtRxPllLocked"` | 0/1 (False/True) | int |
566566
567+
| Tag key | Value |
568+
| --------------------- | --------------------- |
569+
| `tags::Key::SerialId` | Serial ID of the card |
570+
| `tags::Key::Endpoint` | Endpoint of the card |
571+
| `tags::Key::ID` | ID of the card |
572+
| `tags::Key::Type` | `tags::Value::CRU` |
567573
568574
###### Metric: `"link"`
569575

src/CommandLineUtilities/ProgramStatus.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ class ProgramStatus : public Program
248248
.addValue(onuStatus.mgtTxReady, "mgtTxReady")
249249
.addValue(onuStatus.mgtRxReady, "mgtRxReady")
250250
.addValue(onuStatus.mgtTxPllLocked, "mgtTxPllLocked")
251-
.addValue(onuStatus.mgtRxPllLocked, "mgtRxPllLocked"));
251+
.addValue(onuStatus.mgtRxPllLocked, "mgtRxPllLocked")
252+
.addTag(tags::Key::SerialId, card.serialId.getSerial())
253+
.addTag(tags::Key::Endpoint, card.serialId.getEndpoint())
254+
.addTag(tags::Key::ID, card.sequenceId)
255+
.addTag(tags::Key::Type, tags::Value::CRU));
252256
} else if (mOptions.jsonOut) {
253257
root.put("ONU status", onuStickyStatus);
254258
root.put("ONU address", onuStatus.onuAddress);

0 commit comments

Comments
 (0)