Debian Codegraph @

doc/source/specification/measurements.rst

raw
1 ..
2 Copyright 2014 IBM Corp.
3
4 Licensed under the Apache License, Version 2.0 (the "License"); you may
5 not use this file except in compliance with the License. You may obtain
6 a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 License for the specific language governing permissions and limitations
14 under the License.
15
16 .. _measurements:
17
18 =============
19 Measurements
20 =============
21
22 A component that contains statistical or measurement information for TARGET
23 resources that are being monitored. The measurement should be based upon a
24 defined metric (a method of measurement).
25
26 ============ =============== ========= =================================================================================================================
27 Property Type Required Description
28 ============ =============== ========= =================================================================================================================
29 result xs:any Yes The quantitative or qualitative result of a measurement from applying the associated metric
30 metric cadf:Metric Dependent The property describes the metric used in generating the measurement result. Required if not metricId
31 metricId cadf:Identifier Dependent This property identifies a CADF Metric by reference and whose definition exists elsewhere. Required if not metric
32 calculatedBy cadf:Resource No An optional description of the resource that calculated the measurement
33 ============ =============== ========= =================================================================================================================
34
35 Metrics
36 =======
37
38 The Metric data type describes the rules and processes for measuring some
39 activity or resource, resulting in the generation of some values (captured by
40 the Measurement type).
41
42 =========== =============== ======== ==================================================
43 Property Type Required Description
44 =========== =============== ======== ==================================================
45 metricId cadf:identifier Yes The identifier for the metric.
46 unit xs:string Yes The metrics unit (e.g., "ms", "Hz", "GB", etc.)
47 name xs:string No A descriptive name for metric
48 annotations cadf:map No User-defined metric information.
49 =========== =============== ======== ==================================================
50
51 Serialisation
52 =============
53
54 .. code-block:: javascript
55
56 {
57 "typeURI": "http://schemas.dmtf.org/cloud/audit/1.0/log",
58 ...,
59 "metrics": [
60 {
61 "metricId": "myuuid://metric.org/1234",
62 "unit": "GB",
63 "name": "Storage Capacity in Gigabytes"
64 }
65 ],
66 ...,
67 "events": [
68 {
69 "typeURI": "http://schemas.dmtf.org/cloud/audit/1.0/event",
70 ...,
71 "measurements": [
72 {
73 "result": "10",
74 "metricId": "myuuid://metric.org/1234"
75 }
76 ]
77 }
78 ]
79 }