From 9aedcf91bf18192bd10ed806f2176ee2fcc24d48 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Thu, 27 May 2021 11:15:55 +0500 Subject: [PATCH 1/8] Add MeasurementUnits ot MetricType. --- collections/pm.measurementunits/bit_s.json | 35 +++++++++++++++++++ .../pm.metrictypes/Interface/Load/In.json | 3 +- .../pm.metrictypes/Interface/Load/Out.json | 3 +- pm/models/metrictype.py | 4 +++ ui/web/pm/metrictype/Application.js | 9 ++++- ui/web/pm/metrictype/Model.js | 9 +++++ 6 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 collections/pm.measurementunits/bit_s.json diff --git a/collections/pm.measurementunits/bit_s.json b/collections/pm.measurementunits/bit_s.json new file mode 100644 index 0000000000..32b19dcde9 --- /dev/null +++ b/collections/pm.measurementunits/bit_s.json @@ -0,0 +1,35 @@ +{ + "name": "bit/s", + "$collection": "pm.measurementunits", + "uuid": "ae068b8b-1c6b-4949-afc0-0e5010a777a4", + "description": "bits per second (bps or bit/sec)", + "label": "bit/sec", + "dashboard_label": "bps", + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "Bps", + "description": "Bytes per second", + "from_primary": "x / 8", + "label": "byte/sec", + "name": "byte/s", + "to_primary": "x * 8" + }, + { + "dashboard_label": "B", + "description": "Byte", + "from_primary": "(x / 8) / time_delta", + "label": "Byte", + "name": "Byte", + "to_primary": "(x * 8) / time_delta" + }, + { + "dashboard_label": "b", + "description": "bit", + "from_primary": "x / time_delta", + "label": "b", + "name": "bit", + "to_primary": "x / time_delta" + } + ] +} diff --git a/collections/pm.metrictypes/Interface/Load/In.json b/collections/pm.metrictypes/Interface/Load/In.json index 26569910bd..3268f215e2 100644 --- a/collections/pm.metrictypes/Interface/Load/In.json +++ b/collections/pm.metrictypes/Interface/Load/In.json @@ -6,5 +6,6 @@ "field_name": "load_in", "field_type": "UInt64", "description": "Interface input throughput", - "measure": "bit/s" + "measure": "bit/s", + "units__name": "bit/s" } diff --git a/collections/pm.metrictypes/Interface/Load/Out.json b/collections/pm.metrictypes/Interface/Load/Out.json index d18fe57749..b61a3932eb 100644 --- a/collections/pm.metrictypes/Interface/Load/Out.json +++ b/collections/pm.metrictypes/Interface/Load/Out.json @@ -6,5 +6,6 @@ "field_name": "load_out", "field_type": "UInt64", "description": "Interface output throughput", - "measure": "bit/s" + "measure": "bit/s", + "units__name": "bit/s" } diff --git a/pm/models/metrictype.py b/pm/models/metrictype.py index fe3bf33234..a3190e6c14 100644 --- a/pm/models/metrictype.py +++ b/pm/models/metrictype.py @@ -17,6 +17,7 @@ import cachetools # NOC Modules from .metricscope import MetricScope +from .measurementunits import MeasurementUnits from noc.inv.models.capability import Capability from noc.core.mongo.fields import PlainReferenceField from noc.main.models.doccategory import category @@ -68,6 +69,7 @@ class MetricType(Document): ) # Text description description = StringField(required=False) + units = PlainReferenceField(MeasurementUnits) # Measure name, like 'kbit/s' # Compatible to Grafana measure = StringField() @@ -96,6 +98,7 @@ class MetricType(Document): "field_type": self.field_type, "description": self.description, "measure": self.measure, + "units__name": self.units.name, } if self.required_capability: r["required_capability__name"] = self.required_capability.name @@ -113,6 +116,7 @@ class MetricType(Document): "field_type", "description", "measure", + "units__name", "vector_tag", ], ) diff --git a/ui/web/pm/metrictype/Application.js b/ui/web/pm/metrictype/Application.js index 8fbd21323f..d922c0527d 100644 --- a/ui/web/pm/metrictype/Application.js +++ b/ui/web/pm/metrictype/Application.js @@ -11,7 +11,8 @@ Ext.define("NOC.pm.metrictype.Application", { requires: [ "NOC.core.JSONPreview", "NOC.pm.metrictype.Model", - "NOC.pm.metricscope.LookupField" + "NOC.pm.metricscope.LookupField", + "NOC.pm.measurementunits.LookupField" ], model: "NOC.pm.metrictype.Model", search: true, @@ -107,6 +108,12 @@ Ext.define("NOC.pm.metrictype.Application", { fieldLabel: __("Measure"), allowBlank: false, uiStyle: "medium" + }, + { + name: "units", + xtype: "pm.measurementunits.LookupField", + fieldLabel: __("Metric Measurement Units"), + allowBlank: true } ], formToolbar: [ diff --git a/ui/web/pm/metrictype/Model.js b/ui/web/pm/metrictype/Model.js index 4059dc93af..51a571df49 100644 --- a/ui/web/pm/metrictype/Model.js +++ b/ui/web/pm/metrictype/Model.js @@ -48,6 +48,15 @@ Ext.define("NOC.pm.metrictype.Model", { name: "field_type", type: "string" }, + { + name: "units", + type: "string" + }, + { + name: "units__label", + type: "string", + persist: false + }, { name: "is_builtin", type: "boolean", -- GitLab From 9e87e0b0583d15f80f6816816ab8d33f5ca11be8 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Thu, 27 May 2021 12:19:40 +0500 Subject: [PATCH 2/8] Fix on_delete_check. --- pm/models/measurementunits.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pm/models/measurementunits.py b/pm/models/measurementunits.py index f42f512dca..c0fc64d097 100644 --- a/pm/models/measurementunits.py +++ b/pm/models/measurementunits.py @@ -68,7 +68,9 @@ class EnumValue(EmbeddedDocument): return {"key": self.key, "value": self.value} -@on_delete_check(check=[("inv.Sensor", "units"), ("inv.SensorProfile", "units")]) +@on_delete_check( + check=[("inv.Sensor", "units"), ("inv.SensorProfile", "units"), ("pm.MetricType", "units")] +) class MeasurementUnits(Document): meta = { "collection": "measurementunits", -- GitLab From 99cf98e1916a3667e8efc5f90cffbbb010ede730 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Fri, 28 May 2021 22:44:35 +0500 Subject: [PATCH 3/8] Other. --- collections/pm.measurementunits/Bytes.json | 19 +++++++++++++ .../pm.measurementunits/Decibel-mw.json | 9 +++++++ collections/pm.measurementunits/Decibel.json | 9 +++++++ .../pm.measurementunits/DuplexStatus.json | 23 ++++++++++++++++ .../pm.measurementunits/InterfaceStatus.json | 19 +++++++++++++ .../pm.measurementunits/Microsecond.json | 27 +++++++++++++++++++ .../pm.measurementunits/Millisecond.json | 27 +++++++++++++++++++ collections/pm.measurementunits/Packets.json | 19 +++++++++++++ .../pm.measurementunits/Packets_s.json | 19 +++++++++++++ collections/pm.measurementunits/Scalar.json | 9 +++++++ collections/pm.measurementunits/Second.json | 20 +++++++++++++- collections/pm.measurementunits/Units.json | 9 +++++++ collections/pm.measurementunits/bit_s.json | 4 +-- collections/pm.metrictypes/CPU/Load/1min.json | 3 ++- collections/pm.metrictypes/CPU/Load/5min.json | 3 ++- collections/pm.metrictypes/CPU/Usage.json | 3 ++- .../pm.metrictypes/CPU/Usage/5sec.json | 3 ++- collections/pm.metrictypes/Disk/Usage.json | 3 ++- .../pm.metrictypes/Disk/Usage_Percent.json | 3 ++- .../Environment/Battery/Capacity/Level.json | 3 ++- .../Environment/EnergyConsumption.json | 3 ++- .../pm.metrictypes/Environment/Power.json | 3 ++- .../Environment/Power/Input/Status.json | 3 ++- .../pm.metrictypes/Environment/Pulse.json | 3 ++- .../pm.metrictypes/Environment/Status.json | 3 ++- .../Environment/Temperature.json | 3 ++- .../pm.metrictypes/Environment/Voltage.json | 3 ++- .../Interface/Broadcast/In.json | 3 ++- .../Interface/Broadcast/Out.json | 3 ++- .../Interface/CBQOS/Drops/In_Delta.json | 3 ++- .../Interface/CBQOS/Drops/Out_Delta.json | 3 ++- .../Interface/CBQOS/Octets/In_Delta.json | 3 ++- .../Interface/CBQOS/Octets/Out_Delta.json | 3 ++- .../Interface/CBQOS/Packets/In_Delta.json | 3 ++- .../Interface/CBQOS/Packets/Out_Delta.json | 3 ++- .../Interface/DOM/BiasCurrent.json | 3 ++- .../pm.metrictypes/Interface/DOM/RxPower.json | 3 ++- .../Interface/DOM/Temperature.json | 3 ++- .../pm.metrictypes/Interface/DOM/TxPower.json | 3 ++- .../pm.metrictypes/Interface/DOM/Voltage.json | 3 ++- .../pm.metrictypes/Interface/Discards/In.json | 3 ++- .../Interface/Discards/Out.json | 3 ++- .../pm.metrictypes/Interface/Errors/CRC.json | 3 ++- .../Interface/Errors/Frame.json | 3 ++- .../pm.metrictypes/Interface/Errors/In.json | 3 ++- .../Interface/Errors/In_Delta.json | 3 ++- .../pm.metrictypes/Interface/Errors/Out.json | 3 ++- .../Interface/Errors/Out_Delta.json | 3 ++- .../pm.metrictypes/Interface/Load/In.json | 2 +- .../pm.metrictypes/Interface/Load/Out.json | 2 +- .../Interface/Multicast/In.json | 3 ++- .../Interface/Multicast/Out.json | 3 ++- .../pm.metrictypes/Interface/Octets/In.json | 3 ++- .../pm.metrictypes/Interface/Octets/Out.json | 3 ++- .../pm.metrictypes/Interface/Packets/In.json | 3 ++- .../pm.metrictypes/Interface/Packets/Out.json | 3 ++- .../Interface/QOS/Discards/ In_Delta.json | 3 ++- .../Interface/QOS/Discards/ Out_Delta.json | 3 ++- .../Interface/QOS/Octets/In.json | 3 ++- .../Interface/QOS/Octets/Out.json | 3 ++- .../Interface/QOS/Packets/In.json | 3 ++- .../Interface/QOS/Packets/Out.json | 3 ++- .../pm.metrictypes/Interface/Speed.json | 3 ++- .../Interface/Status/Admin.json | 3 ++- .../Interface/Status/Duplex.json | 3 ++- .../pm.metrictypes/Interface/Status/Oper.json | 3 ++- .../xDSL/Line/Attenuation_downstream.json | 3 ++- .../xDSL/Line/Attenuation_upstream.json | 3 ++- .../Interface/xDSL/Line/Errors/ES_Delta.json | 3 ++- .../Interface/xDSL/Line/Errors/LOF_Delta.json | 3 ++- .../xDSL/Line/Errors/LOLS_Delta.json | 3 ++- .../xDSL/Line/Errors/LOSS_Delta.json | 3 ++- .../xDSL/Line/Errors/LPRS_Delta.json | 3 ++- .../xDSL/Line/Errors/Retrain_Delta.json | 3 ++- .../xDSL/Line/Errors/SES_Errors.json | 3 ++- .../Interface/xDSL/Line/Errors/UAS_Delta.json | 3 ++- .../xDSL/Line/Noise_margin_downstream.json | 3 ++- .../xDSL/Line/Noise_margin_upstream.json | 3 ++- .../Interface/xDSL/Line/SNR_downstream.json | 3 ++- .../Interface/xDSL/Line/SNR_upstream.json | 3 ++- .../xDSL/Line/TxPower_downstream.json | 3 ++- .../Interface/xDSL/Line/TxPower_upstream.json | 3 ++- collections/pm.metrictypes/Memory/Heap.json | 3 ++- .../pm.metrictypes/Memory/Load/1min.json | 5 ++-- collections/pm.metrictypes/Memory/Usage.json | 3 ++- .../pm.metrictypes/Memory/Usage/5sec.json | 3 ++- .../Network/STP/Topology_Changes.json | 3 ++- .../Network/STP/Topology_Changes_Delta.json | 3 ++- .../pm.metrictypes/Object/SysUptime.json | 3 ++- collections/pm.metrictypes/Ping/Attempts.json | 3 ++- collections/pm.metrictypes/Ping/RTT.json | 3 ++- collections/pm.metrictypes/Radio/CINR.json | 3 ++- .../pm.metrictypes/Radio/Level/Noise.json | 3 ++- .../pm.metrictypes/Radio/Level/Signal.json | 3 ++- collections/pm.metrictypes/Radio/RSSI.json | 3 ++- collections/pm.metrictypes/Radio/RxPower.json | 3 ++- collections/pm.metrictypes/Radio/TxPower.json | 3 ++- collections/pm.metrictypes/SLA/ICMP_RTT.json | 3 ++- collections/pm.metrictypes/SLA/JITTER.json | 3 ++- collections/pm.metrictypes/SLA/LOSS.json | 3 ++- collections/pm.metrictypes/SLA/UDP_RTT.json | 3 ++- collections/pm.metrictypes/Sensor/Status.json | 3 ++- collections/pm.metrictypes/Sensor/Value.json | 3 ++- .../pm.metrictypes/Sensor/Value_Delta.json | 3 ++- .../pm.metrictypes/Sensor/Value_Raw.json | 3 ++- .../pm.metrictypes/Subscribers/IPoE.json | 3 ++- .../pm.metrictypes/Subscribers/L2TP.json | 3 ++- .../pm.metrictypes/Subscribers/PPP.json | 3 ++- .../pm.metrictypes/Subscribers/PPPoE.json | 3 ++- .../pm.metrictypes/Subscribers/PPTP.json | 3 ++- .../pm.metrictypes/Subscribers/Summary.json | 3 ++- .../SIP/Register_Contacts_Active.json | 3 ++- .../Telephony/SIP/Sessions_Active.json | 3 ++- 113 files changed, 409 insertions(+), 104 deletions(-) create mode 100644 collections/pm.measurementunits/Bytes.json create mode 100644 collections/pm.measurementunits/Decibel-mw.json create mode 100644 collections/pm.measurementunits/Decibel.json create mode 100644 collections/pm.measurementunits/DuplexStatus.json create mode 100644 collections/pm.measurementunits/InterfaceStatus.json create mode 100644 collections/pm.measurementunits/Microsecond.json create mode 100644 collections/pm.measurementunits/Millisecond.json create mode 100644 collections/pm.measurementunits/Packets.json create mode 100644 collections/pm.measurementunits/Packets_s.json create mode 100644 collections/pm.measurementunits/Scalar.json create mode 100644 collections/pm.measurementunits/Units.json diff --git a/collections/pm.measurementunits/Bytes.json b/collections/pm.measurementunits/Bytes.json new file mode 100644 index 0000000000..9bab7de17f --- /dev/null +++ b/collections/pm.measurementunits/Bytes.json @@ -0,0 +1,19 @@ +{ + "name": "Bytes", + "$collection": "pm.measurementunits", + "uuid": "c78335e8-540b-4843-9fde-65baed385c9d", + "description": "Bytes x 8", + "label": "bytes", + "dashboard_label": "bytes", + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "bits", + "description": "Bits", + "from_primary": "x * 8", + "label": "bits", + "name": "Bits", + "to_primary": "x / 8" + } + ] +} diff --git a/collections/pm.measurementunits/Decibel-mw.json b/collections/pm.measurementunits/Decibel-mw.json new file mode 100644 index 0000000000..4abb563566 --- /dev/null +++ b/collections/pm.measurementunits/Decibel-mw.json @@ -0,0 +1,9 @@ +{ + "name": "Decibel-mw", + "$collection": "pm.measurementunits", + "uuid": "e787d8a7-e3e2-40a5-8570-782f6aad90ef", + "description": "dBm or dBmW (decibel-milliwatts) is a unit of level used to indicate that a power level is expressed in decibels (dB) with reference to one milliwatt (mW)", + "label": "dBm", + "dashboard_label": "dBm", + "scale_type": "d" +} diff --git a/collections/pm.measurementunits/Decibel.json b/collections/pm.measurementunits/Decibel.json new file mode 100644 index 0000000000..efcc1b57ac --- /dev/null +++ b/collections/pm.measurementunits/Decibel.json @@ -0,0 +1,9 @@ +{ + "name": "Decibel", + "$collection": "pm.measurementunits", + "uuid": "63fe8f4f-7f6b-4423-94da-a17a679bdae3", + "description": "The decibel (symbol: dB) is a relative unit of measurement corresponding to one tenth of a bel (B).", + "label": "dB", + "dashboard_label": "dB", + "scale_type": "d" +} diff --git a/collections/pm.measurementunits/DuplexStatus.json b/collections/pm.measurementunits/DuplexStatus.json new file mode 100644 index 0000000000..4a0839ba1b --- /dev/null +++ b/collections/pm.measurementunits/DuplexStatus.json @@ -0,0 +1,23 @@ +{ + "name": "DuplexStatus", + "$collection": "pm.measurementunits", + "uuid": "a12e431c-442d-47a7-a135-7a0524903fa1", + "description": "Interface Duplex state", + "label": " ", + "dashboard_label": " ", + "scale_type": "d", + "enum": [ + { + "key": "Unknown", + "value": 1 + }, + { + "key": "Half", + "value": 2 + }, + { + "key": "Full", + "value": 3 + } + ] +} diff --git a/collections/pm.measurementunits/InterfaceStatus.json b/collections/pm.measurementunits/InterfaceStatus.json new file mode 100644 index 0000000000..4f722e22c3 --- /dev/null +++ b/collections/pm.measurementunits/InterfaceStatus.json @@ -0,0 +1,19 @@ +{ + "name": "InterfaceStatus", + "$collection": "pm.measurementunits", + "uuid": "75284e4b-3a00-40de-ab36-a210663ed889", + "description": "Interface Operational Status", + "label": " ", + "dashboard_label": " ", + "scale_type": "d", + "enum": [ + { + "key": "Down", + "value": 0 + }, + { + "key": "Up", + "value": 1 + } + ] +} diff --git a/collections/pm.measurementunits/Microsecond.json b/collections/pm.measurementunits/Microsecond.json new file mode 100644 index 0000000000..ffb9ed9eed --- /dev/null +++ b/collections/pm.measurementunits/Microsecond.json @@ -0,0 +1,27 @@ +{ + "name": "Microsecond", + "$collection": "pm.measurementunits", + "uuid": "13d2469b-9acb-4997-8a3e-efd48d2ff674", + "description": "Time measurement", + "label": "μs", + "dashboard_label": "μs", + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "s", + "description": "Second", + "from_primary": "x / 1000000", + "label": "s", + "name": "Second", + "to_primary": "x * 1000000" + }, + { + "dashboard_label": "ms", + "description": "Millisecond", + "from_primary": "x / 1000", + "label": "ms", + "name": "Millisecond", + "to_primary": "x * 1000" + } + ] +} diff --git a/collections/pm.measurementunits/Millisecond.json b/collections/pm.measurementunits/Millisecond.json new file mode 100644 index 0000000000..1f935334c2 --- /dev/null +++ b/collections/pm.measurementunits/Millisecond.json @@ -0,0 +1,27 @@ +{ + "name": "Millisecond", + "$collection": "pm.measurementunits", + "uuid": "f3c6a418-88bd-4009-bea1-d5457275073f", + "description": "Time measurement", + "label": "ms", + "dashboard_label": "ms", + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "s", + "description": "Second", + "from_primary": "x / 1000", + "label": "s", + "name": "Second", + "to_primary": "x * 1000" + }, + { + "dashboard_label": "μs", + "description": "Microsecond", + "from_primary": "x * 1000", + "label": "μs", + "name": "Microsecond", + "to_primary": "x / 1000" + } + ] +} diff --git a/collections/pm.measurementunits/Packets.json b/collections/pm.measurementunits/Packets.json new file mode 100644 index 0000000000..6d3e64dfed --- /dev/null +++ b/collections/pm.measurementunits/Packets.json @@ -0,0 +1,19 @@ +{ + "name": "Packets", + "$collection": "pm.measurementunits", + "uuid": "fa757cfd-621e-4dad-a8fe-3350ff44e46a", + "description": "Packets count", + "label": "packets", + "dashboard_label": "packets", + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "pps", + "description": "Packets per seconds", + "from_primary": "x / timedelta", + "label": "packets/s", + "name": "Packets/s", + "to_primary": "x * timedelta" + } + ] +} diff --git a/collections/pm.measurementunits/Packets_s.json b/collections/pm.measurementunits/Packets_s.json new file mode 100644 index 0000000000..c824d8bc41 --- /dev/null +++ b/collections/pm.measurementunits/Packets_s.json @@ -0,0 +1,19 @@ +{ + "name": "Packets/s", + "$collection": "pm.measurementunits", + "uuid": "1c1f8f7e-b513-4eea-bdf1-cb4428519420", + "description": "packets per second (pps)", + "label": "packets/sec", + "dashboard_label": "pps", + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "packets", + "description": "Packets", + "from_primary": "x * time_delta", + "label": "packets", + "name": "Packets", + "to_primary": "x / time_delta" + } + ] +} diff --git a/collections/pm.measurementunits/Scalar.json b/collections/pm.measurementunits/Scalar.json new file mode 100644 index 0000000000..911a3d7fb7 --- /dev/null +++ b/collections/pm.measurementunits/Scalar.json @@ -0,0 +1,9 @@ +{ + "name": "Scalar", + "$collection": "pm.measurementunits", + "uuid": "4b3a9ec4-491a-4e2c-857d-e13656c0ada9", + "description": "Value with unknown measurement units", + "label": "Scalar", + "dashboard_label": "null", + "scale_type": "d" +} diff --git a/collections/pm.measurementunits/Second.json b/collections/pm.measurementunits/Second.json index 275cfa32bb..2d98566ff4 100644 --- a/collections/pm.measurementunits/Second.json +++ b/collections/pm.measurementunits/Second.json @@ -5,5 +5,23 @@ "description": "Time measurement", "label": "s", "dashboard_label": "s", - "scale_type": "d" + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "ms", + "description": null, + "from_primary": "x * 1000", + "label": "ms", + "name": "Millisecond", + "to_primary": "x / 1000" + }, + { + "dashboard_label": "μs", + "description": null, + "from_primary": "x * 1000000", + "label": "μs", + "name": "Microsecond", + "to_primary": "x / 1000000" + } + ] } diff --git a/collections/pm.measurementunits/Units.json b/collections/pm.measurementunits/Units.json new file mode 100644 index 0000000000..a330e5cafe --- /dev/null +++ b/collections/pm.measurementunits/Units.json @@ -0,0 +1,9 @@ +{ + "name": "Units", + "$collection": "pm.measurementunits", + "uuid": "47d59f1d-c463-4f2c-b85d-265618fc7cf6", + "description": "Once measurement unit", + "label": " ", + "dashboard_label": "unit", + "scale_type": "d" +} diff --git a/collections/pm.measurementunits/bit_s.json b/collections/pm.measurementunits/bit_s.json index 32b19dcde9..3e03d82e1b 100644 --- a/collections/pm.measurementunits/bit_s.json +++ b/collections/pm.measurementunits/bit_s.json @@ -1,5 +1,5 @@ { - "name": "bit/s", + "name": "Bit/s", "$collection": "pm.measurementunits", "uuid": "ae068b8b-1c6b-4949-afc0-0e5010a777a4", "description": "bits per second (bps or bit/sec)", @@ -26,7 +26,7 @@ { "dashboard_label": "b", "description": "bit", - "from_primary": "x / time_delta", + "from_primary": "x * time_delta", "label": "b", "name": "bit", "to_primary": "x / time_delta" diff --git a/collections/pm.metrictypes/CPU/Load/1min.json b/collections/pm.metrictypes/CPU/Load/1min.json index 6fc69d84ec..7271892885 100644 --- a/collections/pm.metrictypes/CPU/Load/1min.json +++ b/collections/pm.metrictypes/CPU/Load/1min.json @@ -6,5 +6,6 @@ "field_name": "load_1min", "field_type": "UInt8", "description": null, - "measure": "%" + "measure": "%", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/CPU/Load/5min.json b/collections/pm.metrictypes/CPU/Load/5min.json index daa0057b9f..b7ed021fd0 100644 --- a/collections/pm.metrictypes/CPU/Load/5min.json +++ b/collections/pm.metrictypes/CPU/Load/5min.json @@ -6,5 +6,6 @@ "field_name": "load_5min", "field_type": "UInt8", "description": null, - "measure": "%" + "measure": "%", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/CPU/Usage.json b/collections/pm.metrictypes/CPU/Usage.json index c8fcbf9ab2..27aaeae859 100644 --- a/collections/pm.metrictypes/CPU/Usage.json +++ b/collections/pm.metrictypes/CPU/Usage.json @@ -6,5 +6,6 @@ "field_name": "usage", "field_type": "UInt8", "description": "CPU Usage in percents", - "measure": "%" + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/CPU/Usage/5sec.json b/collections/pm.metrictypes/CPU/Usage/5sec.json index 19348340b7..3242253e00 100644 --- a/collections/pm.metrictypes/CPU/Usage/5sec.json +++ b/collections/pm.metrictypes/CPU/Usage/5sec.json @@ -6,5 +6,6 @@ "field_name": "load_5s", "field_type": "UInt8", "description": "CPU Usage in percents", - "measure": "%" + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/Disk/Usage.json b/collections/pm.metrictypes/Disk/Usage.json index ec191b7f7f..8af4167ace 100644 --- a/collections/pm.metrictypes/Disk/Usage.json +++ b/collections/pm.metrictypes/Disk/Usage.json @@ -6,5 +6,6 @@ "field_name": "disk_usage_b", "field_type": "UInt64", "description": "Disk Usage byte", - "measure": "bytes" + "measure": "bytes", + "units__name": "Bytes" } diff --git a/collections/pm.metrictypes/Disk/Usage_Percent.json b/collections/pm.metrictypes/Disk/Usage_Percent.json index 4a9390a886..c3ed489af9 100644 --- a/collections/pm.metrictypes/Disk/Usage_Percent.json +++ b/collections/pm.metrictypes/Disk/Usage_Percent.json @@ -6,5 +6,6 @@ "field_name": "disk_usage_p", "field_type": "UInt8", "description": "Disk Usage %", - "measure": "%" + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/Environment/Battery/Capacity/Level.json b/collections/pm.metrictypes/Environment/Battery/Capacity/Level.json index 93e76e66c7..faedb19d1e 100644 --- a/collections/pm.metrictypes/Environment/Battery/Capacity/Level.json +++ b/collections/pm.metrictypes/Environment/Battery/Capacity/Level.json @@ -6,5 +6,6 @@ "field_name": "battery_capacity_level", "field_type": "UInt8", "description": "Metric Battery Level (%)", - "measure": "%" + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/Environment/EnergyConsumption.json b/collections/pm.metrictypes/Environment/EnergyConsumption.json index 960b214e4a..9858ebc6de 100644 --- a/collections/pm.metrictypes/Environment/EnergyConsumption.json +++ b/collections/pm.metrictypes/Environment/EnergyConsumption.json @@ -6,5 +6,6 @@ "field_name": "energy_consumption", "field_type": "Float32", "description": "The metric for the Energy consumption (kWh)", - "measure": "kWh" + "measure": "kWh", + "units__name": "Kilowatt-hour" } diff --git a/collections/pm.metrictypes/Environment/Power.json b/collections/pm.metrictypes/Environment/Power.json index f34306f963..e6b4959de5 100644 --- a/collections/pm.metrictypes/Environment/Power.json +++ b/collections/pm.metrictypes/Environment/Power.json @@ -6,5 +6,6 @@ "field_name": "power_consume", "field_type": "UInt16", "description": "Metric for device Consume Power (W)", - "measure": "W" + "measure": "W", + "units__name": "Watt" } diff --git a/collections/pm.metrictypes/Environment/Power/Input/Status.json b/collections/pm.metrictypes/Environment/Power/Input/Status.json index baf4b6d521..862ac544c9 100644 --- a/collections/pm.metrictypes/Environment/Power/Input/Status.json +++ b/collections/pm.metrictypes/Environment/Power/Input/Status.json @@ -6,5 +6,6 @@ "field_name": "power_input_status", "field_type": "Int8", "description": "Power input status", - "measure": " " + "measure": " ", + "units__name": "StatusEnum" } diff --git a/collections/pm.metrictypes/Environment/Pulse.json b/collections/pm.metrictypes/Environment/Pulse.json index c53935dc2f..2a89bb9382 100644 --- a/collections/pm.metrictypes/Environment/Pulse.json +++ b/collections/pm.metrictypes/Environment/Pulse.json @@ -6,5 +6,6 @@ "field_name": "pulse", "field_type": "UInt32", "description": "Metric for pulse output. The number of impulses since switching on.", - "measure": " " + "measure": " ", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Environment/Status.json b/collections/pm.metrictypes/Environment/Status.json index 41116d72a2..76757936ce 100644 --- a/collections/pm.metrictypes/Environment/Status.json +++ b/collections/pm.metrictypes/Environment/Status.json @@ -6,5 +6,6 @@ "field_name": "sensor_status", "field_type": "Int8", "description": "Metric for displaying the status of sensors", - "measure": " " + "measure": " ", + "units__name": "StatusEnum" } diff --git a/collections/pm.metrictypes/Environment/Temperature.json b/collections/pm.metrictypes/Environment/Temperature.json index 0cb4811167..07a3628edd 100644 --- a/collections/pm.metrictypes/Environment/Temperature.json +++ b/collections/pm.metrictypes/Environment/Temperature.json @@ -6,5 +6,6 @@ "field_name": "temperature", "field_type": "Int16", "description": "Temparature, in Celsium", - "measure": "C" + "measure": "C", + "units__name": "Celsius" } diff --git a/collections/pm.metrictypes/Environment/Voltage.json b/collections/pm.metrictypes/Environment/Voltage.json index af44ea8789..4e37cbe98d 100644 --- a/collections/pm.metrictypes/Environment/Voltage.json +++ b/collections/pm.metrictypes/Environment/Voltage.json @@ -6,5 +6,6 @@ "field_name": "voltage", "field_type": "Float32", "description": "The metric for the Voltage (V)", - "measure": "V" + "measure": "V", + "units__name": "Volt DC" } diff --git a/collections/pm.metrictypes/Interface/Broadcast/In.json b/collections/pm.metrictypes/Interface/Broadcast/In.json index 8a9f97e240..19912723b9 100644 --- a/collections/pm.metrictypes/Interface/Broadcast/In.json +++ b/collections/pm.metrictypes/Interface/Broadcast/In.json @@ -6,5 +6,6 @@ "field_name": "broadcast_in", "field_type": "UInt64", "description": "Broadcast packets on input interface", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Broadcast/Out.json b/collections/pm.metrictypes/Interface/Broadcast/Out.json index 4a692d8829..d556eb5722 100644 --- a/collections/pm.metrictypes/Interface/Broadcast/Out.json +++ b/collections/pm.metrictypes/Interface/Broadcast/Out.json @@ -6,5 +6,6 @@ "field_name": "broadcast_out", "field_type": "UInt64", "description": "Broadcast packets on output interface", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/CBQOS/Drops/In_Delta.json b/collections/pm.metrictypes/Interface/CBQOS/Drops/In_Delta.json index f70ccfa804..1e1b293165 100644 --- a/collections/pm.metrictypes/Interface/CBQOS/Drops/In_Delta.json +++ b/collections/pm.metrictypes/Interface/CBQOS/Drops/In_Delta.json @@ -6,5 +6,6 @@ "field_name": "cbqos_drops_in_delta", "field_type": "UInt64", "description": "Drops packet on input class-map (delta)", - "measure": "packets" + "measure": "packets", + "units__name": "Packets" } diff --git a/collections/pm.metrictypes/Interface/CBQOS/Drops/Out_Delta.json b/collections/pm.metrictypes/Interface/CBQOS/Drops/Out_Delta.json index d4783419ea..0edd4b58c9 100644 --- a/collections/pm.metrictypes/Interface/CBQOS/Drops/Out_Delta.json +++ b/collections/pm.metrictypes/Interface/CBQOS/Drops/Out_Delta.json @@ -6,5 +6,6 @@ "field_name": "cbqos_drops_out_delta", "field_type": "UInt64", "description": "Drops packet on output class-map (delta)", - "measure": "packets" + "measure": "packets", + "units__name": "Packets" } diff --git a/collections/pm.metrictypes/Interface/CBQOS/Octets/In_Delta.json b/collections/pm.metrictypes/Interface/CBQOS/Octets/In_Delta.json index 845a740910..bfa08afb8d 100644 --- a/collections/pm.metrictypes/Interface/CBQOS/Octets/In_Delta.json +++ b/collections/pm.metrictypes/Interface/CBQOS/Octets/In_Delta.json @@ -6,5 +6,6 @@ "field_name": "cbqos_octets_in_delta", "field_type": "UInt64", "description": "The total number of received octets passed by the interface class-map.", - "measure": "bytes" + "measure": "bytes", + "units__name": "Bytes" } diff --git a/collections/pm.metrictypes/Interface/CBQOS/Octets/Out_Delta.json b/collections/pm.metrictypes/Interface/CBQOS/Octets/Out_Delta.json index 8f1a7f136a..e2dfc5570a 100644 --- a/collections/pm.metrictypes/Interface/CBQOS/Octets/Out_Delta.json +++ b/collections/pm.metrictypes/Interface/CBQOS/Octets/Out_Delta.json @@ -6,5 +6,6 @@ "field_name": "cbqos_octets_out_delta", "field_type": "UInt64", "description": "The total number of sending octets passed by the interface class-map.", - "measure": "bytes" + "measure": "bytes", + "units__name": "Bytes" } diff --git a/collections/pm.metrictypes/Interface/CBQOS/Packets/In_Delta.json b/collections/pm.metrictypes/Interface/CBQOS/Packets/In_Delta.json index b11b738fdd..b7478feb78 100644 --- a/collections/pm.metrictypes/Interface/CBQOS/Packets/In_Delta.json +++ b/collections/pm.metrictypes/Interface/CBQOS/Packets/In_Delta.json @@ -6,5 +6,6 @@ "field_name": "cbqos_packets_in_delta", "field_type": "UInt64", "description": "The total number of received packets passed by the interface class-map.", - "measure": "bytes" + "measure": "bytes", + "units__name": "Packets" } diff --git a/collections/pm.metrictypes/Interface/CBQOS/Packets/Out_Delta.json b/collections/pm.metrictypes/Interface/CBQOS/Packets/Out_Delta.json index 94c881fea7..d8a2e792ad 100644 --- a/collections/pm.metrictypes/Interface/CBQOS/Packets/Out_Delta.json +++ b/collections/pm.metrictypes/Interface/CBQOS/Packets/Out_Delta.json @@ -6,5 +6,6 @@ "field_name": "cbqos_packets_out_delta", "field_type": "UInt64", "description": "The total number of sending packets passed by the interface class-map.", - "measure": "bytes" + "measure": "bytes", + "units__name": "Packets" } diff --git a/collections/pm.metrictypes/Interface/DOM/BiasCurrent.json b/collections/pm.metrictypes/Interface/DOM/BiasCurrent.json index 1873e669d9..4083c569cf 100644 --- a/collections/pm.metrictypes/Interface/DOM/BiasCurrent.json +++ b/collections/pm.metrictypes/Interface/DOM/BiasCurrent.json @@ -6,5 +6,6 @@ "field_name": "current_ma", "field_type": "Int16", "description": "Laser bias current", - "measure": "mA" + "measure": "mA", + "units__name": "Ampere" } diff --git a/collections/pm.metrictypes/Interface/DOM/RxPower.json b/collections/pm.metrictypes/Interface/DOM/RxPower.json index 63692fec09..0108522ebd 100644 --- a/collections/pm.metrictypes/Interface/DOM/RxPower.json +++ b/collections/pm.metrictypes/Interface/DOM/RxPower.json @@ -6,5 +6,6 @@ "field_name": "optical_rx_dbm", "field_type": "Int16", "description": "Signal Receive Power on transmitter", - "measure": "dBm" + "measure": "dBm", + "units__name": "Decibel-mw" } diff --git a/collections/pm.metrictypes/Interface/DOM/Temperature.json b/collections/pm.metrictypes/Interface/DOM/Temperature.json index 50c8e7359e..c6e1570f6f 100644 --- a/collections/pm.metrictypes/Interface/DOM/Temperature.json +++ b/collections/pm.metrictypes/Interface/DOM/Temperature.json @@ -6,5 +6,6 @@ "field_name": "temp_c", "field_type": "Int16", "description": "Temparature, in Celsius", - "measure": "C" + "measure": "C", + "units__name": "Celsius" } diff --git a/collections/pm.metrictypes/Interface/DOM/TxPower.json b/collections/pm.metrictypes/Interface/DOM/TxPower.json index 47de26056a..ccccde7d8e 100644 --- a/collections/pm.metrictypes/Interface/DOM/TxPower.json +++ b/collections/pm.metrictypes/Interface/DOM/TxPower.json @@ -6,5 +6,6 @@ "field_name": "optical_tx_dbm", "field_type": "Int16", "description": "Signal Transmit Power on transmitter", - "measure": "dBm" + "measure": "dBm", + "units__name": "Decibel-mw" } diff --git a/collections/pm.metrictypes/Interface/DOM/Voltage.json b/collections/pm.metrictypes/Interface/DOM/Voltage.json index 020a79fbed..2940cf7973 100644 --- a/collections/pm.metrictypes/Interface/DOM/Voltage.json +++ b/collections/pm.metrictypes/Interface/DOM/Voltage.json @@ -6,5 +6,6 @@ "field_name": "voltage_v", "field_type": "Int16", "description": "Transceiver supply voltage", - "measure": "V" + "measure": "V", + "units__name": "Volt DC" } diff --git a/collections/pm.metrictypes/Interface/Discards/In.json b/collections/pm.metrictypes/Interface/Discards/In.json index 75f04fa8d1..93275ce589 100644 --- a/collections/pm.metrictypes/Interface/Discards/In.json +++ b/collections/pm.metrictypes/Interface/Discards/In.json @@ -6,5 +6,6 @@ "field_name": "discards_in", "field_type": "UInt32", "description": "Discard packet on input interface", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Discards/Out.json b/collections/pm.metrictypes/Interface/Discards/Out.json index 7eeab67135..c41575d4ce 100644 --- a/collections/pm.metrictypes/Interface/Discards/Out.json +++ b/collections/pm.metrictypes/Interface/Discards/Out.json @@ -6,5 +6,6 @@ "field_name": "discards_out", "field_type": "UInt32", "description": "Discard packet on output interface", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Errors/CRC.json b/collections/pm.metrictypes/Interface/Errors/CRC.json index 638ae864c3..8862f1983b 100644 --- a/collections/pm.metrictypes/Interface/Errors/CRC.json +++ b/collections/pm.metrictypes/Interface/Errors/CRC.json @@ -6,5 +6,6 @@ "field_name": "errors_crc_in", "field_type": "UInt32", "description": "Errors when recieved packets which have CRC checking errors ", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Errors/Frame.json b/collections/pm.metrictypes/Interface/Errors/Frame.json index 023c5a67fc..3143d49562 100644 --- a/collections/pm.metrictypes/Interface/Errors/Frame.json +++ b/collections/pm.metrictypes/Interface/Errors/Frame.json @@ -6,5 +6,6 @@ "field_name": "errors_frame_in", "field_type": "UInt32", "description": "Errors when received frames whose actual length differs with 802.3 ", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Errors/In.json b/collections/pm.metrictypes/Interface/Errors/In.json index ba1d78d0e4..2b0cf8952a 100644 --- a/collections/pm.metrictypes/Interface/Errors/In.json +++ b/collections/pm.metrictypes/Interface/Errors/In.json @@ -6,5 +6,6 @@ "field_name": "errors_in", "field_type": "UInt32", "description": "Errors when receive packet", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Errors/In_Delta.json b/collections/pm.metrictypes/Interface/Errors/In_Delta.json index 52c6b3603e..9c8951eebd 100644 --- a/collections/pm.metrictypes/Interface/Errors/In_Delta.json +++ b/collections/pm.metrictypes/Interface/Errors/In_Delta.json @@ -6,5 +6,6 @@ "field_name": "errors_in_delta", "field_type": "UInt32", "description": "Errors when receive packet (delta)", - "measure": "packets" + "measure": "packets", + "units__name": "Packets" } diff --git a/collections/pm.metrictypes/Interface/Errors/Out.json b/collections/pm.metrictypes/Interface/Errors/Out.json index c18fe090fe..b71d5b82cd 100644 --- a/collections/pm.metrictypes/Interface/Errors/Out.json +++ b/collections/pm.metrictypes/Interface/Errors/Out.json @@ -6,5 +6,6 @@ "field_name": "errors_out", "field_type": "UInt32", "description": "Errors when transmit packet", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Errors/Out_Delta.json b/collections/pm.metrictypes/Interface/Errors/Out_Delta.json index 59b9b2de1d..ac4496900f 100644 --- a/collections/pm.metrictypes/Interface/Errors/Out_Delta.json +++ b/collections/pm.metrictypes/Interface/Errors/Out_Delta.json @@ -6,5 +6,6 @@ "field_name": "errors_out_delta", "field_type": "UInt32", "description": "Errors when transmit packet (delta)", - "measure": "packets" + "measure": "packets", + "units__name": "Packets" } diff --git a/collections/pm.metrictypes/Interface/Load/In.json b/collections/pm.metrictypes/Interface/Load/In.json index 3268f215e2..0958bb7678 100644 --- a/collections/pm.metrictypes/Interface/Load/In.json +++ b/collections/pm.metrictypes/Interface/Load/In.json @@ -7,5 +7,5 @@ "field_type": "UInt64", "description": "Interface input throughput", "measure": "bit/s", - "units__name": "bit/s" + "units__name": "Bit/s" } diff --git a/collections/pm.metrictypes/Interface/Load/Out.json b/collections/pm.metrictypes/Interface/Load/Out.json index b61a3932eb..fe31bcc3a7 100644 --- a/collections/pm.metrictypes/Interface/Load/Out.json +++ b/collections/pm.metrictypes/Interface/Load/Out.json @@ -7,5 +7,5 @@ "field_type": "UInt64", "description": "Interface output throughput", "measure": "bit/s", - "units__name": "bit/s" + "units__name": "Bit/s" } diff --git a/collections/pm.metrictypes/Interface/Multicast/In.json b/collections/pm.metrictypes/Interface/Multicast/In.json index 8e00690e4a..789fad9c61 100644 --- a/collections/pm.metrictypes/Interface/Multicast/In.json +++ b/collections/pm.metrictypes/Interface/Multicast/In.json @@ -6,5 +6,6 @@ "field_name": "multicast_in", "field_type": "UInt64", "description": "Multicast packets on input interface", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Multicast/Out.json b/collections/pm.metrictypes/Interface/Multicast/Out.json index 8dd9712b5c..90a678c8a0 100644 --- a/collections/pm.metrictypes/Interface/Multicast/Out.json +++ b/collections/pm.metrictypes/Interface/Multicast/Out.json @@ -6,5 +6,6 @@ "field_name": "multicast_out", "field_type": "UInt64", "description": "Multicast packets on output interface", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Octets/In.json b/collections/pm.metrictypes/Interface/Octets/In.json index 68ca543b3d..a4b621b1e1 100644 --- a/collections/pm.metrictypes/Interface/Octets/In.json +++ b/collections/pm.metrictypes/Interface/Octets/In.json @@ -6,5 +6,6 @@ "field_name": "octets_in", "field_type": "UInt64", "description": "The total number of octets received on the interface, including framing characters. ", - "measure": "bytes" + "measure": "bytes", + "units__name": "Bytes" } diff --git a/collections/pm.metrictypes/Interface/Octets/Out.json b/collections/pm.metrictypes/Interface/Octets/Out.json index 63c8c06547..71d5c2c7ac 100644 --- a/collections/pm.metrictypes/Interface/Octets/Out.json +++ b/collections/pm.metrictypes/Interface/Octets/Out.json @@ -6,5 +6,6 @@ "field_name": "octets_out", "field_type": "UInt64", "description": "The total number of octets transmitted out of the interface, including framing characters.", - "measure": "bytes" + "measure": "bytes", + "units__name": "Bytes" } diff --git a/collections/pm.metrictypes/Interface/Packets/In.json b/collections/pm.metrictypes/Interface/Packets/In.json index 37fdb37db5..beae714496 100644 --- a/collections/pm.metrictypes/Interface/Packets/In.json +++ b/collections/pm.metrictypes/Interface/Packets/In.json @@ -6,5 +6,6 @@ "field_name": "packets_in", "field_type": "UInt64", "description": "Packets on input interface", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Packets/Out.json b/collections/pm.metrictypes/Interface/Packets/Out.json index 5192f8a149..27483e76b4 100644 --- a/collections/pm.metrictypes/Interface/Packets/Out.json +++ b/collections/pm.metrictypes/Interface/Packets/Out.json @@ -6,5 +6,6 @@ "field_name": "packets_out", "field_type": "UInt64", "description": "Packets on output interface", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/QOS/Discards/ In_Delta.json b/collections/pm.metrictypes/Interface/QOS/Discards/ In_Delta.json index 6ee5121038..1af535cbf1 100644 --- a/collections/pm.metrictypes/Interface/QOS/Discards/ In_Delta.json +++ b/collections/pm.metrictypes/Interface/QOS/Discards/ In_Delta.json @@ -6,5 +6,6 @@ "field_name": "qos_discards_in_delta", "field_type": "UInt64", "description": "Discards packet on input queue (delta)", - "measure": "packets" + "measure": "packets", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Interface/QOS/Discards/ Out_Delta.json b/collections/pm.metrictypes/Interface/QOS/Discards/ Out_Delta.json index d4f5379fe7..7a85d4721b 100644 --- a/collections/pm.metrictypes/Interface/QOS/Discards/ Out_Delta.json +++ b/collections/pm.metrictypes/Interface/QOS/Discards/ Out_Delta.json @@ -6,5 +6,6 @@ "field_name": "qos_discards_out_delta", "field_type": "UInt64", "description": "Discards packet on output queue (delta)", - "measure": "packets" + "measure": "packets", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Interface/QOS/Octets/In.json b/collections/pm.metrictypes/Interface/QOS/Octets/In.json index 53708732c4..b48d291d95 100644 --- a/collections/pm.metrictypes/Interface/QOS/Octets/In.json +++ b/collections/pm.metrictypes/Interface/QOS/Octets/In.json @@ -6,5 +6,6 @@ "field_name": "qos_octets_in", "field_type": "UInt64", "description": "The total number of received octets passed by the interface queue.", - "measure": "bytes" + "measure": "bytes", + "units__name": "Bytes" } diff --git a/collections/pm.metrictypes/Interface/QOS/Octets/Out.json b/collections/pm.metrictypes/Interface/QOS/Octets/Out.json index d08558eece..af4459e30e 100644 --- a/collections/pm.metrictypes/Interface/QOS/Octets/Out.json +++ b/collections/pm.metrictypes/Interface/QOS/Octets/Out.json @@ -6,5 +6,6 @@ "field_name": "qos_octets_out", "field_type": "UInt64", "description": "The total number of transmitted out octets passed by the interface queue.", - "measure": "bytes" + "measure": "bytes", + "units__name": "Bytes" } diff --git a/collections/pm.metrictypes/Interface/QOS/Packets/In.json b/collections/pm.metrictypes/Interface/QOS/Packets/In.json index 88d259d5bf..fc90f5f5c3 100644 --- a/collections/pm.metrictypes/Interface/QOS/Packets/In.json +++ b/collections/pm.metrictypes/Interface/QOS/Packets/In.json @@ -6,5 +6,6 @@ "field_name": "qos_packets_in", "field_type": "UInt64", "description": "Packets on input interface queue", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/QOS/Packets/Out.json b/collections/pm.metrictypes/Interface/QOS/Packets/Out.json index 1cc39ec0ef..2cda8461ac 100644 --- a/collections/pm.metrictypes/Interface/QOS/Packets/Out.json +++ b/collections/pm.metrictypes/Interface/QOS/Packets/Out.json @@ -6,5 +6,6 @@ "field_name": "qos_packets_out", "field_type": "UInt64", "description": "Packets on output interface queue", - "measure": "packet/s" + "measure": "packet/s", + "units__name": "Packets/s" } diff --git a/collections/pm.metrictypes/Interface/Speed.json b/collections/pm.metrictypes/Interface/Speed.json index a4959387a6..79ffa03662 100644 --- a/collections/pm.metrictypes/Interface/Speed.json +++ b/collections/pm.metrictypes/Interface/Speed.json @@ -6,5 +6,6 @@ "field_name": "speed", "field_type": "UInt64", "description": "Interface speed", - "measure": "bit/s" + "measure": "bit/s", + "units__name": "Bit/s" } diff --git a/collections/pm.metrictypes/Interface/Status/Admin.json b/collections/pm.metrictypes/Interface/Status/Admin.json index f851fcf68c..ae89dcab53 100644 --- a/collections/pm.metrictypes/Interface/Status/Admin.json +++ b/collections/pm.metrictypes/Interface/Status/Admin.json @@ -6,5 +6,6 @@ "field_name": "status_admin", "field_type": "UInt8", "description": "Interface admin status", - "measure": "" + "measure": " ", + "units__name": "InterfaceStatus" } diff --git a/collections/pm.metrictypes/Interface/Status/Duplex.json b/collections/pm.metrictypes/Interface/Status/Duplex.json index 26e779f208..c3e7e17d72 100644 --- a/collections/pm.metrictypes/Interface/Status/Duplex.json +++ b/collections/pm.metrictypes/Interface/Status/Duplex.json @@ -6,5 +6,6 @@ "field_name": "status_duplex", "field_type": "UInt8", "description": "Interface duplex status (1 - unknown, 2 - half, 3 - full)", - "measure": " " + "measure": " ", + "units__name": "DuplexStatus" } diff --git a/collections/pm.metrictypes/Interface/Status/Oper.json b/collections/pm.metrictypes/Interface/Status/Oper.json index 8d60c8b112..dc689fbf32 100644 --- a/collections/pm.metrictypes/Interface/Status/Oper.json +++ b/collections/pm.metrictypes/Interface/Status/Oper.json @@ -6,5 +6,6 @@ "field_name": "status_oper", "field_type": "UInt8", "description": "Interface admin status", - "measure": "" + "measure": " ", + "units__name": "InterfaceStatus" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Attenuation_downstream.json b/collections/pm.metrictypes/Interface/xDSL/Line/Attenuation_downstream.json index f97ca75642..66fb60170f 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Attenuation_downstream.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Attenuation_downstream.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_attenuation_down", "field_type": "UInt16", "description": "Measured difference in the the total power transmitted by this ATU and total power received by the peer ATU.", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Attenuation_upstream.json b/collections/pm.metrictypes/Interface/xDSL/Line/Attenuation_upstream.json index ec68f4c071..ec210f0d2d 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Attenuation_upstream.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Attenuation_upstream.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_attenuation_up", "field_type": "UInt16", "description": "Measured difference in the total power transmitted by the peer ATU and the total power received by this ATU.", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/ES_Delta.json b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/ES_Delta.json index 4ddf5ac3fc..ebced44062 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/ES_Delta.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/ES_Delta.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_errors_es_delta", "field_type": "UInt32", "description": "Count of the number of Errored Seconds since agent reset. The errored second parameter is a count of one-second intervals containing one or more crc anomalies, or one or more los or sef defects.", - "measure": "count" + "measure": "count", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOF_Delta.json b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOF_Delta.json index 47da75a82e..976a193879 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOF_Delta.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOF_Delta.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_errors_lof_delta", "field_type": "UInt32", "description": "Count of the number of Loss of Framing failures since agent reset.", - "measure": "count" + "measure": "count", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOLS_Delta.json b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOLS_Delta.json index cc8c67980d..5e5ae67251 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOLS_Delta.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOLS_Delta.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_errors_lols_delta", "field_type": "UInt32", "description": "Count of the number of Loss of Link failures since agent reset.", - "measure": "count" + "measure": "count", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOSS_Delta.json b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOSS_Delta.json index 417de7169b..6448ed8f78 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOSS_Delta.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LOSS_Delta.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_errors_loss_delta", "field_type": "UInt32", "description": "Count of the number of Loss of Signal failures since agent reset.", - "measure": "count" + "measure": "count", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LPRS_Delta.json b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LPRS_Delta.json index 9318cced82..e58eb1c21a 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LPRS_Delta.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/LPRS_Delta.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_errors_lprs_delta", "field_type": "UInt32", "description": "Count of the number of Loss of Power failures since agent reset.", - "measure": "count" + "measure": "count", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/Retrain_Delta.json b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/Retrain_Delta.json index 7eb9ced898..3516be3c98 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/Retrain_Delta.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/Retrain_Delta.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_errors_retrain_delta", "field_type": "UInt32", "description": "Refer to changing the line parameters (retrain) to adapt to the change of transmission line characteristics.", - "measure": "count" + "measure": "count", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/SES_Errors.json b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/SES_Errors.json index f4cee03a77..24603753fc 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/SES_Errors.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/SES_Errors.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_errors_ses_delta", "field_type": "UInt32", "description": "Count of seconds during this interval where there was:\nATU-C:(CRC-8 summed over all bearer channels) >=18 OR\nLOS >=1 OR SEF >=1 OR LPR >=1\nATU-R:(FEBE summed over all bearer channels) >=18 OR\nLOS-FE >=1 OR RDI >=1 OR LPR-FE >=1 .\nThis parameter is inhibited during UAS.", - "measure": "count" + "measure": "count", + "units__name": "Second" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/UAS_Delta.json b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/UAS_Delta.json index fc55bc2c31..38d056408b 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Errors/UAS_Delta.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Errors/UAS_Delta.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_errors_uas_delta", "field_type": "UInt32", "description": "The UAS counts the seconds when the port is not in the activating status. For the port which is being activated, ATUR-UAS increases. When the port is in activating and deactivating period, the statistics of unavailable seconds do not increase.", - "measure": "count" + "measure": "count", + "units__name": "Second" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Noise_margin_downstream.json b/collections/pm.metrictypes/Interface/xDSL/Line/Noise_margin_downstream.json index 736e194d15..44ae675246 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Noise_margin_downstream.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Noise_margin_downstream.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_noise_margin_down", "field_type": "Int16", "description": "Noise Margin as seen by this ATU with respect to its transmitted signal in tenth dB.", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/Noise_margin_upstream.json b/collections/pm.metrictypes/Interface/xDSL/Line/Noise_margin_upstream.json index c826d79baf..03b2ca60e3 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/Noise_margin_upstream.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/Noise_margin_upstream.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_noise_margin_up", "field_type": "Int16", "description": "Noise Margin as seen by this ATU with respect to its received signal in tenth dB.", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/SNR_downstream.json b/collections/pm.metrictypes/Interface/xDSL/Line/SNR_downstream.json index 5554fd8e4d..adb5f29cc6 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/SNR_downstream.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/SNR_downstream.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_snr_down", "field_type": "UInt16", "description": "(Signal-to-noise ratio) Measured difference in level of a desired signal to the level of background noise.", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/SNR_upstream.json b/collections/pm.metrictypes/Interface/xDSL/Line/SNR_upstream.json index ac565e2209..98a0695b41 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/SNR_upstream.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/SNR_upstream.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_snr_up", "field_type": "UInt16", "description": "(Signal-to-noise ratio) Measured difference in level of a desired signal to the level of background noise.", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/TxPower_downstream.json b/collections/pm.metrictypes/Interface/xDSL/Line/TxPower_downstream.json index 759192f73b..3081e73eb0 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/TxPower_downstream.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/TxPower_downstream.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_txpower_down", "field_type": "UInt16", "description": "(≈ voltage) with which device sends its signal to the cable.", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Interface/xDSL/Line/TxPower_upstream.json b/collections/pm.metrictypes/Interface/xDSL/Line/TxPower_upstream.json index 3873976a8e..7059fd89c5 100644 --- a/collections/pm.metrictypes/Interface/xDSL/Line/TxPower_upstream.json +++ b/collections/pm.metrictypes/Interface/xDSL/Line/TxPower_upstream.json @@ -6,5 +6,6 @@ "field_name": "xdsl_line_txpower_up", "field_type": "UInt16", "description": "(≈ voltage) with which device sends its signal to the cable.", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Memory/Heap.json b/collections/pm.metrictypes/Memory/Heap.json index 3e27e479ce..418363810e 100644 --- a/collections/pm.metrictypes/Memory/Heap.json +++ b/collections/pm.metrictypes/Memory/Heap.json @@ -6,5 +6,6 @@ "field_name": "heap", "field_type": "UInt8", "description": "Memory Heap in percents", - "measure": "%" + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/Memory/Load/1min.json b/collections/pm.metrictypes/Memory/Load/1min.json index 45c94c9a51..4bf3adec35 100644 --- a/collections/pm.metrictypes/Memory/Load/1min.json +++ b/collections/pm.metrictypes/Memory/Load/1min.json @@ -5,6 +5,7 @@ "scope__name": "Memory", "field_name": "load_1min", "field_type": "UInt8", - "description": "", - "measure": "%" + "description": null, + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/Memory/Usage.json b/collections/pm.metrictypes/Memory/Usage.json index 72aa6a64bc..e24b76ec0f 100644 --- a/collections/pm.metrictypes/Memory/Usage.json +++ b/collections/pm.metrictypes/Memory/Usage.json @@ -6,5 +6,6 @@ "field_name": "usage", "field_type": "UInt8", "description": "Memory Usage in percents", - "measure": "%" + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/Memory/Usage/5sec.json b/collections/pm.metrictypes/Memory/Usage/5sec.json index 1a3bff4d1e..137b99d55c 100644 --- a/collections/pm.metrictypes/Memory/Usage/5sec.json +++ b/collections/pm.metrictypes/Memory/Usage/5sec.json @@ -6,5 +6,6 @@ "field_name": "usage_5s", "field_type": "UInt8", "description": "Memory Usage in percents", - "measure": "%" + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/Network/STP/Topology_Changes.json b/collections/pm.metrictypes/Network/STP/Topology_Changes.json index b50f21692a..cbc0054e63 100644 --- a/collections/pm.metrictypes/Network/STP/Topology_Changes.json +++ b/collections/pm.metrictypes/Network/STP/Topology_Changes.json @@ -6,5 +6,6 @@ "field_name": "stp_topology_changes", "field_type": "UInt32", "description": "The total number of topology changes detected by this bridge since the management entity was last reset or initialized.", - "measure": "C" + "measure": "C", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Network/STP/Topology_Changes_Delta.json b/collections/pm.metrictypes/Network/STP/Topology_Changes_Delta.json index 751da92426..66fa7d7b86 100644 --- a/collections/pm.metrictypes/Network/STP/Topology_Changes_Delta.json +++ b/collections/pm.metrictypes/Network/STP/Topology_Changes_Delta.json @@ -6,5 +6,6 @@ "field_name": "stp_topology_changes_delta", "field_type": "UInt32", "description": "The delta of topology changes detected by this bridge since the management entity was last collect.", - "measure": "C" + "measure": "C", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Object/SysUptime.json b/collections/pm.metrictypes/Object/SysUptime.json index b68de84e0f..8afc7bbe19 100644 --- a/collections/pm.metrictypes/Object/SysUptime.json +++ b/collections/pm.metrictypes/Object/SysUptime.json @@ -6,5 +6,6 @@ "field_name": "sys_uptime", "field_type": "UInt64", "description": "Object RFC1213-MIB:SysUptime ", - "measure": "sec" + "measure": "sec", + "units__name": "Second" } diff --git a/collections/pm.metrictypes/Ping/Attempts.json b/collections/pm.metrictypes/Ping/Attempts.json index e39cbe4885..3c5b0d8f1e 100644 --- a/collections/pm.metrictypes/Ping/Attempts.json +++ b/collections/pm.metrictypes/Ping/Attempts.json @@ -6,5 +6,6 @@ "field_name": "attempts", "field_type": "UInt16", "description": "ICMP Ping packet loss in per request", - "measure": "int" + "measure": "", + "units__name": "Packets" } diff --git a/collections/pm.metrictypes/Ping/RTT.json b/collections/pm.metrictypes/Ping/RTT.json index 4a4ea35c8f..516c8c4821 100644 --- a/collections/pm.metrictypes/Ping/RTT.json +++ b/collections/pm.metrictypes/Ping/RTT.json @@ -6,5 +6,6 @@ "field_name": "rtt", "field_type": "UInt32", "description": "ICMP Ping round trip time in microseconds", - "measure": "ms" + "measure": "ms", + "units__name": "Millisecond" } diff --git a/collections/pm.metrictypes/Radio/CINR.json b/collections/pm.metrictypes/Radio/CINR.json index 1abaddae2f..46b367ddb0 100644 --- a/collections/pm.metrictypes/Radio/CINR.json +++ b/collections/pm.metrictypes/Radio/CINR.json @@ -6,5 +6,6 @@ "field_name": "cinr", "field_type": "Int16", "description": "Carrier to Interference + Noise Ratio", - "measure": "dB" + "measure": "dB", + "units__name": "Decibel" } diff --git a/collections/pm.metrictypes/Radio/Level/Noise.json b/collections/pm.metrictypes/Radio/Level/Noise.json index 6695126f03..7b871aacce 100644 --- a/collections/pm.metrictypes/Radio/Level/Noise.json +++ b/collections/pm.metrictypes/Radio/Level/Noise.json @@ -6,5 +6,6 @@ "field_name": "noise_level", "field_type": "Int32", "description": "Noise Level", - "measure": "dBm" + "measure": "dBm", + "units__name": "Decibel-mw" } diff --git a/collections/pm.metrictypes/Radio/Level/Signal.json b/collections/pm.metrictypes/Radio/Level/Signal.json index d940aabc72..d02524dda4 100644 --- a/collections/pm.metrictypes/Radio/Level/Signal.json +++ b/collections/pm.metrictypes/Radio/Level/Signal.json @@ -6,5 +6,6 @@ "field_name": "signal_level", "field_type": "Int32", "description": "Signal Level", - "measure": "dBm" + "measure": "dBm", + "units__name": "Decibel-mw" } diff --git a/collections/pm.metrictypes/Radio/RSSI.json b/collections/pm.metrictypes/Radio/RSSI.json index 8956c823c1..a5d907e678 100644 --- a/collections/pm.metrictypes/Radio/RSSI.json +++ b/collections/pm.metrictypes/Radio/RSSI.json @@ -6,5 +6,6 @@ "field_name": "rssi", "field_type": "Int16", "description": "Received signal strength indicator", - "measure": "dBm" + "measure": "dBm", + "units__name": "Decibel-mw" } diff --git a/collections/pm.metrictypes/Radio/RxPower.json b/collections/pm.metrictypes/Radio/RxPower.json index 1be7098462..062acb0a53 100644 --- a/collections/pm.metrictypes/Radio/RxPower.json +++ b/collections/pm.metrictypes/Radio/RxPower.json @@ -6,5 +6,6 @@ "field_name": "rx_power", "field_type": "Float32", "description": "Signal Rx Power on transmitter", - "measure": "dBm" + "measure": "dBm", + "units__name": "Decibel-mw" } diff --git a/collections/pm.metrictypes/Radio/TxPower.json b/collections/pm.metrictypes/Radio/TxPower.json index 8a337288c8..b4383c2f9b 100644 --- a/collections/pm.metrictypes/Radio/TxPower.json +++ b/collections/pm.metrictypes/Radio/TxPower.json @@ -6,5 +6,6 @@ "field_name": "tx_power", "field_type": "Int32", "description": "Signal Tx Power on transmitter", - "measure": "dBm" + "measure": "dBm", + "units__name": "Decibel-mw" } diff --git a/collections/pm.metrictypes/SLA/ICMP_RTT.json b/collections/pm.metrictypes/SLA/ICMP_RTT.json index f3b793327a..a554c1ba6e 100644 --- a/collections/pm.metrictypes/SLA/ICMP_RTT.json +++ b/collections/pm.metrictypes/SLA/ICMP_RTT.json @@ -6,5 +6,6 @@ "field_name": "icmp_rtt", "field_type": "UInt32", "description": "Measured round trip time for ICMP packets in microseconds", - "measure": "μs" + "measure": "μs", + "units__name": "Microsecond" } diff --git a/collections/pm.metrictypes/SLA/JITTER.json b/collections/pm.metrictypes/SLA/JITTER.json index 92d31c517d..e9b8ba1167 100644 --- a/collections/pm.metrictypes/SLA/JITTER.json +++ b/collections/pm.metrictypes/SLA/JITTER.json @@ -6,5 +6,6 @@ "field_name": "jitter", "field_type": "Int32", "description": "Measured deviation of round trip time in microseconds", - "measure": "μs" + "measure": "μs", + "units__name": "Microsecond" } diff --git a/collections/pm.metrictypes/SLA/LOSS.json b/collections/pm.metrictypes/SLA/LOSS.json index 1cb4b6af1d..65c7ad8725 100644 --- a/collections/pm.metrictypes/SLA/LOSS.json +++ b/collections/pm.metrictypes/SLA/LOSS.json @@ -6,5 +6,6 @@ "field_name": "loss", "field_type": "UInt32", "description": "Actual number of lost packets", - "measure": "int" + "measure": "int", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/SLA/UDP_RTT.json b/collections/pm.metrictypes/SLA/UDP_RTT.json index 3f530b7cc5..c959bb3560 100644 --- a/collections/pm.metrictypes/SLA/UDP_RTT.json +++ b/collections/pm.metrictypes/SLA/UDP_RTT.json @@ -6,5 +6,6 @@ "field_name": "udp_rtt", "field_type": "UInt32", "description": "Measured round trip time for UDP packets in microseconds", - "measure": "μs" + "measure": "μs", + "units__name": "Microsecond" } diff --git a/collections/pm.metrictypes/Sensor/Status.json b/collections/pm.metrictypes/Sensor/Status.json index 5c6f3b613c..106e5b686a 100644 --- a/collections/pm.metrictypes/Sensor/Status.json +++ b/collections/pm.metrictypes/Sensor/Status.json @@ -6,5 +6,6 @@ "field_name": "status", "field_type": "UInt8", "description": "Sensor status value", - "measure": "c" + "measure": "c", + "units__name": "StatusEnum" } diff --git a/collections/pm.metrictypes/Sensor/Value.json b/collections/pm.metrictypes/Sensor/Value.json index 65c31aa452..13c1f4ab5e 100644 --- a/collections/pm.metrictypes/Sensor/Value.json +++ b/collections/pm.metrictypes/Sensor/Value.json @@ -6,5 +6,6 @@ "field_name": "value", "field_type": "Float32", "description": "Numeric value of the sensor", - "measure": "c" + "measure": "c", + "units__name": "Scalar" } diff --git a/collections/pm.metrictypes/Sensor/Value_Delta.json b/collections/pm.metrictypes/Sensor/Value_Delta.json index ada14bc224..84eb45d1fe 100644 --- a/collections/pm.metrictypes/Sensor/Value_Delta.json +++ b/collections/pm.metrictypes/Sensor/Value_Delta.json @@ -6,5 +6,6 @@ "field_name": "value_delta", "field_type": "Float32", "description": "For counters, the difference between the current and previous values", - "measure": "c" + "measure": "c", + "units__name": "Scalar" } diff --git a/collections/pm.metrictypes/Sensor/Value_Raw.json b/collections/pm.metrictypes/Sensor/Value_Raw.json index 1474982733..a9c8c4181d 100644 --- a/collections/pm.metrictypes/Sensor/Value_Raw.json +++ b/collections/pm.metrictypes/Sensor/Value_Raw.json @@ -6,5 +6,6 @@ "field_name": "value_raw", "field_type": "Float32", "description": "Numeric value of the sensor before normalization", - "measure": "c" + "measure": "c", + "units__name": "Scalar" } diff --git a/collections/pm.metrictypes/Subscribers/IPoE.json b/collections/pm.metrictypes/Subscribers/IPoE.json index 00535bead7..5f20a2eab3 100644 --- a/collections/pm.metrictypes/Subscribers/IPoE.json +++ b/collections/pm.metrictypes/Subscribers/IPoE.json @@ -6,5 +6,6 @@ "field_name": "ipoe", "field_type": "UInt32", "description": "Total active IPoE sessions on the box", - "measure": "sessions" + "measure": "sessions", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Subscribers/L2TP.json b/collections/pm.metrictypes/Subscribers/L2TP.json index 2d62f1e7b7..4a33496cf7 100644 --- a/collections/pm.metrictypes/Subscribers/L2TP.json +++ b/collections/pm.metrictypes/Subscribers/L2TP.json @@ -6,5 +6,6 @@ "field_name": "l2tp", "field_type": "UInt32", "description": "Total active L2TP sessions on the box", - "measure": "sessions" + "measure": "sessions", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Subscribers/PPP.json b/collections/pm.metrictypes/Subscribers/PPP.json index ace0091568..b3e038f42a 100644 --- a/collections/pm.metrictypes/Subscribers/PPP.json +++ b/collections/pm.metrictypes/Subscribers/PPP.json @@ -6,5 +6,6 @@ "field_name": "ppp", "field_type": "UInt32", "description": "Total active PPP sessions on the box", - "measure": "sessions" + "measure": "sessions", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Subscribers/PPPoE.json b/collections/pm.metrictypes/Subscribers/PPPoE.json index 5bc517c457..72a80c247f 100644 --- a/collections/pm.metrictypes/Subscribers/PPPoE.json +++ b/collections/pm.metrictypes/Subscribers/PPPoE.json @@ -6,5 +6,6 @@ "field_name": "pppoe", "field_type": "UInt32", "description": "Total active PPPoE sessions on the box", - "measure": "sessions" + "measure": "sessions", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Subscribers/PPTP.json b/collections/pm.metrictypes/Subscribers/PPTP.json index f3df224726..fb59c210d5 100644 --- a/collections/pm.metrictypes/Subscribers/PPTP.json +++ b/collections/pm.metrictypes/Subscribers/PPTP.json @@ -6,5 +6,6 @@ "field_name": "pptp", "field_type": "UInt32", "description": "Total active PPTP sessions on the box", - "measure": "sessions" + "measure": "sessions", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Subscribers/Summary.json b/collections/pm.metrictypes/Subscribers/Summary.json index 4972b00a43..05642dea4a 100644 --- a/collections/pm.metrictypes/Subscribers/Summary.json +++ b/collections/pm.metrictypes/Subscribers/Summary.json @@ -6,5 +6,6 @@ "field_name": "summary", "field_type": "UInt32", "description": "Total active sessions on the box", - "measure": "sessions" + "measure": "sessions", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Telephony/SIP/Register_Contacts_Active.json b/collections/pm.metrictypes/Telephony/SIP/Register_Contacts_Active.json index d98b7a666c..e2b19951cd 100644 --- a/collections/pm.metrictypes/Telephony/SIP/Register_Contacts_Active.json +++ b/collections/pm.metrictypes/Telephony/SIP/Register_Contacts_Active.json @@ -6,5 +6,6 @@ "field_name": "sip_register_contacts_active", "field_type": "UInt64", "description": "The number of SIP Contacts register on local device (not on all cluster, if available).", - "measure": "C" + "measure": "C", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Telephony/SIP/Sessions_Active.json b/collections/pm.metrictypes/Telephony/SIP/Sessions_Active.json index 6b62fcf428..094157751b 100644 --- a/collections/pm.metrictypes/Telephony/SIP/Sessions_Active.json +++ b/collections/pm.metrictypes/Telephony/SIP/Sessions_Active.json @@ -6,5 +6,6 @@ "field_name": "sip_sessions_active", "field_type": "UInt64", "description": "The total number of active SIP sessions.", - "measure": "C" + "measure": "C", + "units__name": "Units" } -- GitLab From 7866d37519b145b630c722d099df3db2f371e701 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Fri, 28 May 2021 22:59:22 +0500 Subject: [PATCH 4/8] Fix multicast Group metrics. --- collections/pm.measurementunits/Decibel-uv.json | 9 +++++++++ collections/pm.metrictypes/Interface/RF/TxPower.json | 3 ++- .../Multicast/Channel/Bandwidth/Percent.json | 3 ++- .../pm.metrictypes/Multicast/Channel/Bandwidth/Used.json | 3 ++- .../pm.metrictypes/Multicast/Channel/Group/Count.json | 3 ++- .../pm.metrictypes/Multicast/Group/Bitrate/In.json | 3 ++- .../pm.metrictypes/Multicast/Group/Bitrate/Out.json | 3 ++- collections/pm.metrictypes/Multicast/Group/Status.json | 3 ++- 8 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 collections/pm.measurementunits/Decibel-uv.json diff --git a/collections/pm.measurementunits/Decibel-uv.json b/collections/pm.measurementunits/Decibel-uv.json new file mode 100644 index 0000000000..1de1fbe1a5 --- /dev/null +++ b/collections/pm.measurementunits/Decibel-uv.json @@ -0,0 +1,9 @@ +{ + "name": "Decibel-uv", + "$collection": "pm.measurementunits", + "uuid": "c26cd7d5-7a25-48f1-bdfb-90ceae629245", + "description": "Voltage relative to 1 microvolt.", + "label": "dBuV", + "dashboard_label": "dBuV", + "scale_type": "d" +} diff --git a/collections/pm.metrictypes/Interface/RF/TxPower.json b/collections/pm.metrictypes/Interface/RF/TxPower.json index bbb8cf95a8..f69ef19225 100644 --- a/collections/pm.metrictypes/Interface/RF/TxPower.json +++ b/collections/pm.metrictypes/Interface/RF/TxPower.json @@ -6,5 +6,6 @@ "field_name": "rf_tx_dbm", "field_type": "Float32", "description": "RF Tx power", - "measure": "dBuV" + "measure": "dBuV", + "units__name": "Decibel-uv" } diff --git a/collections/pm.metrictypes/Multicast/Channel/Bandwidth/Percent.json b/collections/pm.metrictypes/Multicast/Channel/Bandwidth/Percent.json index 1c795a7969..a0f0ed0b52 100644 --- a/collections/pm.metrictypes/Multicast/Channel/Bandwidth/Percent.json +++ b/collections/pm.metrictypes/Multicast/Channel/Bandwidth/Percent.json @@ -6,5 +6,6 @@ "field_name": "c_bandwidth_percent", "field_type": "UInt8", "description": "Used Bandwidth in Percent", - "measure": "%" + "measure": "%", + "units__name": "Percent" } diff --git a/collections/pm.metrictypes/Multicast/Channel/Bandwidth/Used.json b/collections/pm.metrictypes/Multicast/Channel/Bandwidth/Used.json index c3965b10ec..42393e0b44 100644 --- a/collections/pm.metrictypes/Multicast/Channel/Bandwidth/Used.json +++ b/collections/pm.metrictypes/Multicast/Channel/Bandwidth/Used.json @@ -6,5 +6,6 @@ "field_name": "c_bandwidth_used", "field_type": "Float32", "description": "Used Bandwidth (bps)", - "measure": "bps" + "measure": "bps", + "units__name": "Bit/s" } diff --git a/collections/pm.metrictypes/Multicast/Channel/Group/Count.json b/collections/pm.metrictypes/Multicast/Channel/Group/Count.json index 8f7dac60cf..2001b4419b 100644 --- a/collections/pm.metrictypes/Multicast/Channel/Group/Count.json +++ b/collections/pm.metrictypes/Multicast/Channel/Group/Count.json @@ -6,5 +6,6 @@ "field_name": "c_group_count", "field_type": "UInt8", "description": "Used multicast groups on channel", - "measure": " " + "measure": " ", + "units__name": "Units" } diff --git a/collections/pm.metrictypes/Multicast/Group/Bitrate/In.json b/collections/pm.metrictypes/Multicast/Group/Bitrate/In.json index 658e2ff49f..3d4eb98932 100644 --- a/collections/pm.metrictypes/Multicast/Group/Bitrate/In.json +++ b/collections/pm.metrictypes/Multicast/Group/Bitrate/In.json @@ -6,5 +6,6 @@ "field_name": "g_bitrate_in", "field_type": "UInt64", "description": "Input Bitrate (bps)", - "measure": "bps" + "measure": "bps", + "units__name": "Bit/s" } diff --git a/collections/pm.metrictypes/Multicast/Group/Bitrate/Out.json b/collections/pm.metrictypes/Multicast/Group/Bitrate/Out.json index 68cf96ec3a..13458d0e47 100644 --- a/collections/pm.metrictypes/Multicast/Group/Bitrate/Out.json +++ b/collections/pm.metrictypes/Multicast/Group/Bitrate/Out.json @@ -6,5 +6,6 @@ "field_name": "g_bitrate_out", "field_type": "UInt64", "description": "Output Bitrate (bps)", - "measure": "bps" + "measure": "bps", + "units__name": "Bit/s" } diff --git a/collections/pm.metrictypes/Multicast/Group/Status.json b/collections/pm.metrictypes/Multicast/Group/Status.json index b58ff60cf4..4e6f84745c 100644 --- a/collections/pm.metrictypes/Multicast/Group/Status.json +++ b/collections/pm.metrictypes/Multicast/Group/Status.json @@ -6,5 +6,6 @@ "field_name": "g_status", "field_type": "Int8", "description": "Multicast Group status 1 - Ok, 0 - Off, -1 - Error ", - "measure": " " + "measure": " ", + "units__name": "StatusEnum" } -- GitLab From 4ef8f882fdc8efaeb133a49884633cc655613c48 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Fri, 28 May 2021 23:20:11 +0500 Subject: [PATCH 5/8] Fix Current. --- collections/pm.measurementunits/Ampere.json | 12 +++++++++++- collections/pm.metrictypes/Environment/Current.json | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/collections/pm.measurementunits/Ampere.json b/collections/pm.measurementunits/Ampere.json index 6c732edd62..c370c69eab 100644 --- a/collections/pm.measurementunits/Ampere.json +++ b/collections/pm.measurementunits/Ampere.json @@ -6,5 +6,15 @@ "label": "A", "dashboard_label": "mamp", "dashboard_sr_color": 16777215, - "scale_type": "d" + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "mamp", + "description": "Milliampere", + "from_primary": "x / 1000", + "label": "mA", + "name": "Milliampere", + "to_primary": "x * 1000" + } + ] } diff --git a/collections/pm.metrictypes/Environment/Current.json b/collections/pm.metrictypes/Environment/Current.json index 958235155d..89d3ea5db1 100644 --- a/collections/pm.metrictypes/Environment/Current.json +++ b/collections/pm.metrictypes/Environment/Current.json @@ -6,5 +6,6 @@ "field_name": "elec_current", "field_type": "Float32", "description": "The metric for the Electric Сurrent", - "measure": "mA" + "measure": "mA", + "units__name": "Ampere" } -- GitLab From ddc1a499e271f2b217d73da0cc5e61244fb9a3f5 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Fri, 28 May 2021 23:45:25 +0500 Subject: [PATCH 6/8] Fix Last Change. --- .../pm.metrictypes/Environment/Power/Input/Status.json | 2 +- collections/pm.metrictypes/Environment/Pulse.json | 2 +- collections/pm.metrictypes/Environment/Status.json | 2 +- collections/pm.metrictypes/Interface/Status/Admin.json | 2 +- collections/pm.metrictypes/Interface/Status/Duplex.json | 2 +- collections/pm.metrictypes/Interface/Status/Oper.json | 2 +- collections/pm.metrictypes/Interface/lastchange.json | 7 ++++--- .../pm.metrictypes/Multicast/Channel/Group/Count.json | 2 +- collections/pm.metrictypes/Multicast/Group/Status.json | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/collections/pm.metrictypes/Environment/Power/Input/Status.json b/collections/pm.metrictypes/Environment/Power/Input/Status.json index 862ac544c9..74f564b4fc 100644 --- a/collections/pm.metrictypes/Environment/Power/Input/Status.json +++ b/collections/pm.metrictypes/Environment/Power/Input/Status.json @@ -6,6 +6,6 @@ "field_name": "power_input_status", "field_type": "Int8", "description": "Power input status", - "measure": " ", + "measure": "", "units__name": "StatusEnum" } diff --git a/collections/pm.metrictypes/Environment/Pulse.json b/collections/pm.metrictypes/Environment/Pulse.json index 2a89bb9382..382b8e7e57 100644 --- a/collections/pm.metrictypes/Environment/Pulse.json +++ b/collections/pm.metrictypes/Environment/Pulse.json @@ -6,6 +6,6 @@ "field_name": "pulse", "field_type": "UInt32", "description": "Metric for pulse output. The number of impulses since switching on.", - "measure": " ", + "measure": "", "units__name": "Units" } diff --git a/collections/pm.metrictypes/Environment/Status.json b/collections/pm.metrictypes/Environment/Status.json index 76757936ce..1363a4a8e3 100644 --- a/collections/pm.metrictypes/Environment/Status.json +++ b/collections/pm.metrictypes/Environment/Status.json @@ -6,6 +6,6 @@ "field_name": "sensor_status", "field_type": "Int8", "description": "Metric for displaying the status of sensors", - "measure": " ", + "measure": "", "units__name": "StatusEnum" } diff --git a/collections/pm.metrictypes/Interface/Status/Admin.json b/collections/pm.metrictypes/Interface/Status/Admin.json index ae89dcab53..b6ec248d99 100644 --- a/collections/pm.metrictypes/Interface/Status/Admin.json +++ b/collections/pm.metrictypes/Interface/Status/Admin.json @@ -6,6 +6,6 @@ "field_name": "status_admin", "field_type": "UInt8", "description": "Interface admin status", - "measure": " ", + "measure": "", "units__name": "InterfaceStatus" } diff --git a/collections/pm.metrictypes/Interface/Status/Duplex.json b/collections/pm.metrictypes/Interface/Status/Duplex.json index c3e7e17d72..3b20f0c464 100644 --- a/collections/pm.metrictypes/Interface/Status/Duplex.json +++ b/collections/pm.metrictypes/Interface/Status/Duplex.json @@ -6,6 +6,6 @@ "field_name": "status_duplex", "field_type": "UInt8", "description": "Interface duplex status (1 - unknown, 2 - half, 3 - full)", - "measure": " ", + "measure": "", "units__name": "DuplexStatus" } diff --git a/collections/pm.metrictypes/Interface/Status/Oper.json b/collections/pm.metrictypes/Interface/Status/Oper.json index dc689fbf32..bce7d57124 100644 --- a/collections/pm.metrictypes/Interface/Status/Oper.json +++ b/collections/pm.metrictypes/Interface/Status/Oper.json @@ -6,6 +6,6 @@ "field_name": "status_oper", "field_type": "UInt8", "description": "Interface admin status", - "measure": " ", + "measure": "", "units__name": "InterfaceStatus" } diff --git a/collections/pm.metrictypes/Interface/lastchange.json b/collections/pm.metrictypes/Interface/lastchange.json index 57bb293e97..e0e451fe7b 100644 --- a/collections/pm.metrictypes/Interface/lastchange.json +++ b/collections/pm.metrictypes/Interface/lastchange.json @@ -1,10 +1,11 @@ { - "name": "Interface | Last Сhange", + "name": "Interface | Last Change", "$collection": "pm.metrictypes", "uuid": "b345c39b-c77a-4e86-89de-746932307e8c", "scope__name": "Interface", "field_name": "lastchange", "field_type": "Int16", "description": "Last change interface day(s)", - "measure": "day(s)" -} \ No newline at end of file + "measure": "day(s)", + "units__name": "Units" +} diff --git a/collections/pm.metrictypes/Multicast/Channel/Group/Count.json b/collections/pm.metrictypes/Multicast/Channel/Group/Count.json index 2001b4419b..a14cc493ea 100644 --- a/collections/pm.metrictypes/Multicast/Channel/Group/Count.json +++ b/collections/pm.metrictypes/Multicast/Channel/Group/Count.json @@ -6,6 +6,6 @@ "field_name": "c_group_count", "field_type": "UInt8", "description": "Used multicast groups on channel", - "measure": " ", + "measure": "", "units__name": "Units" } diff --git a/collections/pm.metrictypes/Multicast/Group/Status.json b/collections/pm.metrictypes/Multicast/Group/Status.json index 4e6f84745c..282bcd0729 100644 --- a/collections/pm.metrictypes/Multicast/Group/Status.json +++ b/collections/pm.metrictypes/Multicast/Group/Status.json @@ -6,6 +6,6 @@ "field_name": "g_status", "field_type": "Int8", "description": "Multicast Group status 1 - Ok, 0 - Off, -1 - Error ", - "measure": " ", + "measure": "", "units__name": "StatusEnum" } -- GitLab From c745f5a05c11e95602e3720109eda077452a72c5 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Sat, 29 May 2021 09:49:53 +0500 Subject: [PATCH 7/8] Fix. --- collections/pm.measurementunits/Ampere.json | 10 +++---- collections/pm.measurementunits/Bytes.json | 8 ++--- .../pm.measurementunits/InterfaceStatus.json | 30 +++++++++++++++---- .../pm.measurementunits/Microsecond.json | 4 +-- .../pm.measurementunits/Millisecond.json | 4 +-- collections/pm.measurementunits/Packets.json | 2 +- .../pm.measurementunits/Packets_s.json | 4 +-- collections/pm.measurementunits/Second.json | 4 +-- collections/pm.measurementunits/bit_s.json | 16 +++++----- .../pm.metrictypes/Environment/Current.json | 2 +- .../Interface/DOM/BiasCurrent.json | 2 +- .../Interface/Status/Admin.json | 6 ++-- .../pm.metrictypes/Interface/Status/Oper.json | 4 +-- collections/pm.metrictypes/Ping/RTT.json | 2 +- collections/pm.metrictypes/SLA/ICMP_RTT.json | 2 +- collections/pm.metrictypes/SLA/JITTER.json | 2 +- collections/pm.metrictypes/SLA/UDP_RTT.json | 2 +- 17 files changed, 62 insertions(+), 42 deletions(-) diff --git a/collections/pm.measurementunits/Ampere.json b/collections/pm.measurementunits/Ampere.json index c370c69eab..60bd032521 100644 --- a/collections/pm.measurementunits/Ampere.json +++ b/collections/pm.measurementunits/Ampere.json @@ -4,17 +4,17 @@ "uuid": "9e59d6e9-debf-48d4-b122-8283e1206797", "description": "Electric current measurement", "label": "A", - "dashboard_label": "mamp", + "dashboard_label": "amp", "dashboard_sr_color": 16777215, "scale_type": "d", "alt_units": [ { "dashboard_label": "mamp", - "description": "Milliampere", - "from_primary": "x / 1000", + "description": "milliAmpere", + "from_primary": "x * 1000", "label": "mA", - "name": "Milliampere", - "to_primary": "x * 1000" + "name": "milliAmpere", + "to_primary": "x / 1000" } ] } diff --git a/collections/pm.measurementunits/Bytes.json b/collections/pm.measurementunits/Bytes.json index 9bab7de17f..4f7a84355f 100644 --- a/collections/pm.measurementunits/Bytes.json +++ b/collections/pm.measurementunits/Bytes.json @@ -2,17 +2,17 @@ "name": "Bytes", "$collection": "pm.measurementunits", "uuid": "c78335e8-540b-4843-9fde-65baed385c9d", - "description": "Bytes x 8", + "description": "Bytes, or multiples thereof, are almost always used to specify the sizes of computer files and the capacity of storage units", "label": "bytes", "dashboard_label": "bytes", - "scale_type": "d", + "scale_type": "b", "alt_units": [ { "dashboard_label": "bits", - "description": "Bits", + "description": "Bit", "from_primary": "x * 8", "label": "bits", - "name": "Bits", + "name": "bit", "to_primary": "x / 8" } ] diff --git a/collections/pm.measurementunits/InterfaceStatus.json b/collections/pm.measurementunits/InterfaceStatus.json index 4f722e22c3..6eaac4a90c 100644 --- a/collections/pm.measurementunits/InterfaceStatus.json +++ b/collections/pm.measurementunits/InterfaceStatus.json @@ -1,19 +1,39 @@ { - "name": "InterfaceStatus", + "name": "InterfaceOperState", "$collection": "pm.measurementunits", "uuid": "75284e4b-3a00-40de-ab36-a210663ed889", - "description": "Interface Operational Status", + "description": "Operational state of the interface", "label": " ", "dashboard_label": " ", "scale_type": "d", "enum": [ + { + "key": "up", + "value": 1 + }, { "key": "Down", - "value": 0 + "value": 2 }, { - "key": "Up", - "value": 1 + "key": "testing", + "value": 3 + }, + { + "key": "unknown", + "value": 4 + }, + { + "key": "dormant", + "value": 5 + }, + { + "key": "notPresent", + "value": 6 + }, + { + "key": "lowerLayerDown", + "value": 7 } ] } diff --git a/collections/pm.measurementunits/Microsecond.json b/collections/pm.measurementunits/Microsecond.json index ffb9ed9eed..d69722d072 100644 --- a/collections/pm.measurementunits/Microsecond.json +++ b/collections/pm.measurementunits/Microsecond.json @@ -1,5 +1,5 @@ { - "name": "Microsecond", + "name": "microSecond", "$collection": "pm.measurementunits", "uuid": "13d2469b-9acb-4997-8a3e-efd48d2ff674", "description": "Time measurement", @@ -20,7 +20,7 @@ "description": "Millisecond", "from_primary": "x / 1000", "label": "ms", - "name": "Millisecond", + "name": "milliSecond", "to_primary": "x * 1000" } ] diff --git a/collections/pm.measurementunits/Millisecond.json b/collections/pm.measurementunits/Millisecond.json index 1f935334c2..86f97c5ac6 100644 --- a/collections/pm.measurementunits/Millisecond.json +++ b/collections/pm.measurementunits/Millisecond.json @@ -1,5 +1,5 @@ { - "name": "Millisecond", + "name": "milliSecond", "$collection": "pm.measurementunits", "uuid": "f3c6a418-88bd-4009-bea1-d5457275073f", "description": "Time measurement", @@ -20,7 +20,7 @@ "description": "Microsecond", "from_primary": "x * 1000", "label": "μs", - "name": "Microsecond", + "name": "microSecond", "to_primary": "x / 1000" } ] diff --git a/collections/pm.measurementunits/Packets.json b/collections/pm.measurementunits/Packets.json index 6d3e64dfed..c4f66d9db3 100644 --- a/collections/pm.measurementunits/Packets.json +++ b/collections/pm.measurementunits/Packets.json @@ -2,7 +2,7 @@ "name": "Packets", "$collection": "pm.measurementunits", "uuid": "fa757cfd-621e-4dad-a8fe-3350ff44e46a", - "description": "Packets count", + "description": "Network packet is a formatted unit of data carried by a packet-switched network.", "label": "packets", "dashboard_label": "packets", "scale_type": "d", diff --git a/collections/pm.measurementunits/Packets_s.json b/collections/pm.measurementunits/Packets_s.json index c824d8bc41..06f0df76d0 100644 --- a/collections/pm.measurementunits/Packets_s.json +++ b/collections/pm.measurementunits/Packets_s.json @@ -2,8 +2,8 @@ "name": "Packets/s", "$collection": "pm.measurementunits", "uuid": "1c1f8f7e-b513-4eea-bdf1-cb4428519420", - "description": "packets per second (pps)", - "label": "packets/sec", + "description": "Packets per second (pps) is a measure of throughput", + "label": "pps", "dashboard_label": "pps", "scale_type": "d", "alt_units": [ diff --git a/collections/pm.measurementunits/Second.json b/collections/pm.measurementunits/Second.json index 2d98566ff4..2b43270432 100644 --- a/collections/pm.measurementunits/Second.json +++ b/collections/pm.measurementunits/Second.json @@ -12,7 +12,7 @@ "description": null, "from_primary": "x * 1000", "label": "ms", - "name": "Millisecond", + "name": "milliSecond", "to_primary": "x / 1000" }, { @@ -20,7 +20,7 @@ "description": null, "from_primary": "x * 1000000", "label": "μs", - "name": "Microsecond", + "name": "microSecond", "to_primary": "x / 1000000" } ] diff --git a/collections/pm.measurementunits/bit_s.json b/collections/pm.measurementunits/bit_s.json index 3e03d82e1b..17af77353a 100644 --- a/collections/pm.measurementunits/bit_s.json +++ b/collections/pm.measurementunits/bit_s.json @@ -2,25 +2,25 @@ "name": "Bit/s", "$collection": "pm.measurementunits", "uuid": "ae068b8b-1c6b-4949-afc0-0e5010a777a4", - "description": "bits per second (bps or bit/sec)", - "label": "bit/sec", + "description": "Bit rate (bitrate or as a variable R) is the number of bits that are conveyed or processed per unit of time", + "label": "bit/s", "dashboard_label": "bps", "scale_type": "d", "alt_units": [ { "dashboard_label": "Bps", - "description": "Bytes per second", + "description": "Byte per second", "from_primary": "x / 8", - "label": "byte/sec", + "label": "B/s", "name": "byte/s", "to_primary": "x * 8" }, { - "dashboard_label": "B", - "description": "Byte", + "dashboard_label": "bytes", + "description": "Bytes", "from_primary": "(x / 8) / time_delta", - "label": "Byte", - "name": "Byte", + "label": "B", + "name": "Bytes", "to_primary": "(x * 8) / time_delta" }, { diff --git a/collections/pm.metrictypes/Environment/Current.json b/collections/pm.metrictypes/Environment/Current.json index 89d3ea5db1..c7d6f2ad21 100644 --- a/collections/pm.metrictypes/Environment/Current.json +++ b/collections/pm.metrictypes/Environment/Current.json @@ -7,5 +7,5 @@ "field_type": "Float32", "description": "The metric for the Electric Сurrent", "measure": "mA", - "units__name": "Ampere" + "units__name": "milliAmpere" } diff --git a/collections/pm.metrictypes/Interface/DOM/BiasCurrent.json b/collections/pm.metrictypes/Interface/DOM/BiasCurrent.json index 4083c569cf..6f86eebf98 100644 --- a/collections/pm.metrictypes/Interface/DOM/BiasCurrent.json +++ b/collections/pm.metrictypes/Interface/DOM/BiasCurrent.json @@ -7,5 +7,5 @@ "field_type": "Int16", "description": "Laser bias current", "measure": "mA", - "units__name": "Ampere" + "units__name": "milliAmpere" } diff --git a/collections/pm.metrictypes/Interface/Status/Admin.json b/collections/pm.metrictypes/Interface/Status/Admin.json index b6ec248d99..9843ffa426 100644 --- a/collections/pm.metrictypes/Interface/Status/Admin.json +++ b/collections/pm.metrictypes/Interface/Status/Admin.json @@ -5,7 +5,7 @@ "scope__name": "Interface", "field_name": "status_admin", "field_type": "UInt8", - "description": "Interface admin status", - "measure": "", - "units__name": "InterfaceStatus" + "description": "Interface admin state", + "measure": " ", + "units__name": "InterfaceOperState" } diff --git a/collections/pm.metrictypes/Interface/Status/Oper.json b/collections/pm.metrictypes/Interface/Status/Oper.json index bce7d57124..42479ed944 100644 --- a/collections/pm.metrictypes/Interface/Status/Oper.json +++ b/collections/pm.metrictypes/Interface/Status/Oper.json @@ -6,6 +6,6 @@ "field_name": "status_oper", "field_type": "UInt8", "description": "Interface admin status", - "measure": "", - "units__name": "InterfaceStatus" + "measure": " ", + "units__name": "InterfaceOperState" } diff --git a/collections/pm.metrictypes/Ping/RTT.json b/collections/pm.metrictypes/Ping/RTT.json index 516c8c4821..ed196ea732 100644 --- a/collections/pm.metrictypes/Ping/RTT.json +++ b/collections/pm.metrictypes/Ping/RTT.json @@ -7,5 +7,5 @@ "field_type": "UInt32", "description": "ICMP Ping round trip time in microseconds", "measure": "ms", - "units__name": "Millisecond" + "units__name": "milliSecond" } diff --git a/collections/pm.metrictypes/SLA/ICMP_RTT.json b/collections/pm.metrictypes/SLA/ICMP_RTT.json index a554c1ba6e..7db049307c 100644 --- a/collections/pm.metrictypes/SLA/ICMP_RTT.json +++ b/collections/pm.metrictypes/SLA/ICMP_RTT.json @@ -7,5 +7,5 @@ "field_type": "UInt32", "description": "Measured round trip time for ICMP packets in microseconds", "measure": "μs", - "units__name": "Microsecond" + "units__name": "microSecond" } diff --git a/collections/pm.metrictypes/SLA/JITTER.json b/collections/pm.metrictypes/SLA/JITTER.json index e9b8ba1167..0b2969a8f0 100644 --- a/collections/pm.metrictypes/SLA/JITTER.json +++ b/collections/pm.metrictypes/SLA/JITTER.json @@ -7,5 +7,5 @@ "field_type": "Int32", "description": "Measured deviation of round trip time in microseconds", "measure": "μs", - "units__name": "Microsecond" + "units__name": "microSecond" } diff --git a/collections/pm.metrictypes/SLA/UDP_RTT.json b/collections/pm.metrictypes/SLA/UDP_RTT.json index c959bb3560..ad9534cab5 100644 --- a/collections/pm.metrictypes/SLA/UDP_RTT.json +++ b/collections/pm.metrictypes/SLA/UDP_RTT.json @@ -7,5 +7,5 @@ "field_type": "UInt32", "description": "Measured round trip time for UDP packets in microseconds", "measure": "μs", - "units__name": "Microsecond" + "units__name": "microSecond" } -- GitLab From c5a0ff5073da090362af917e4ba3e287b5204c5d Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Sat, 29 May 2021 10:13:20 +0500 Subject: [PATCH 8/8] Add check convert expession on AltUnit. --- .../pm.measurementunits/milliAmpere.json | 20 +++++++++++++++++++ pm/models/measurementunits.py | 14 +++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 collections/pm.measurementunits/milliAmpere.json diff --git a/collections/pm.measurementunits/milliAmpere.json b/collections/pm.measurementunits/milliAmpere.json new file mode 100644 index 0000000000..695ff35435 --- /dev/null +++ b/collections/pm.measurementunits/milliAmpere.json @@ -0,0 +1,20 @@ +{ + "name": "milliAmpere", + "$collection": "pm.measurementunits", + "uuid": "a18c82bf-9338-4fe5-93fa-91be9c2a62c0", + "description": "Electric current measurement", + "label": "mA", + "dashboard_label": "mamp", + "dashboard_sr_color": 16777215, + "scale_type": "d", + "alt_units": [ + { + "dashboard_label": "amp", + "description": "Electric current measurement", + "from_primary": "x * 1000", + "label": "A", + "name": "Ampere", + "to_primary": "x / 1000" + } + ] +} diff --git a/pm/models/measurementunits.py b/pm/models/measurementunits.py index c0fc64d097..0954b70360 100644 --- a/pm/models/measurementunits.py +++ b/pm/models/measurementunits.py @@ -13,12 +13,14 @@ from typing import Optional # Third-party modules from mongoengine.document import Document, EmbeddedDocument from mongoengine.fields import StringField, IntField, UUIDField, ListField, EmbeddedDocumentField +from mongoengine.errors import ValidationError import cachetools # NOC modules from noc.core.model.decorator import on_delete_check from noc.core.prettyjson import to_json from noc.core.text import quote_safe_path +from noc.core.expr import get_fn DEFAULT_UNITS_NAME = "Unknown" @@ -44,6 +46,18 @@ class AltUnit(EmbeddedDocument): def __str__(self): return self.name + def clean(self): + if self.from_primary: + try: + get_fn(self.from_primary) + except SyntaxError: + raise ValidationError("Syntx Error on from_primary exression") + if self.to_primary: + try: + get_fn(self.to_primary) + except SyntaxError: + raise ValidationError("Syntx Error on to_primary exression") + @property def json_data(self): return { -- GitLab