blob: b1ba68045d93a09d33360365d14e3a0631f66b2f [file] [log] [blame]
Matteo Scandoloeb0d11c2017-08-08 13:05:26 -07001
2{#
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16#}
17
18
rdudyala996d70b2016-10-13 17:40:55 +000019---
20sources:
21 - name: meter_source
22 interval: 600
23 meters:
24 - "*"
25 sinks:
26 - meter_sink
27 - name: cpu_source
28 interval: 600
29 meters:
30 - "cpu"
31 sinks:
32 - cpu_sink
33 - name: disk_source
34 interval: 600
35 meters:
36 - "disk.read.bytes"
37 - "disk.read.requests"
38 - "disk.write.bytes"
39 - "disk.write.requests"
40 - "disk.device.read.bytes"
41 - "disk.device.read.requests"
42 - "disk.device.write.bytes"
43 - "disk.device.write.requests"
44 sinks:
45 - disk_sink
46 - name: network_source
47 interval: 600
48 meters:
49 - "network.incoming.bytes"
50 - "network.incoming.packets"
51 - "network.outgoing.bytes"
52 - "network.outgoing.packets"
53 sinks:
54 - network_sink
55{% if onos %}
56 - name: sdn_source1
57 interval: 600
58 meters:
59 - "switch"
60 - "switch.*"
61 resources: {{ new_line }}
62{%- for urls in onos_endpoints %}
63 - {{ urls }} {{ new_line}}
64{%- if loop.last -%}
65{{ new_tab }}sinks:
66 - sdn_sink
67{%- endif -%}
68{%- endfor -%}
69{% endif %}
70sinks:
71 - name: meter_sink
72 transformers:
73 publishers:
74 - notifier://
75{% if openstack %}
76 - udp://{{ listen_ip_addr }}:{{ port_number }}
77{% endif %}
78 - name: cpu_sink
79 transformers:
80 - name: "rate_of_change"
81 parameters:
82 target:
83 name: "cpu_util"
84 unit: "%"
85 type: "gauge"
86 scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))"
87 publishers:
88 - notifier://
89{% if openstack %}
90 - udp://{{ listen_ip_addr }}:4455
91{% endif %}
92 - name: disk_sink
93 transformers:
94 - name: "rate_of_change"
95 parameters:
96 source:
97 map_from:
98 name: "(disk\\.device|disk)\\.(read|write)\\.(bytes|requests)"
99 unit: "(B|request)"
100 target:
101 map_to:
102 name: "\\1.\\2.\\3.rate"
103 unit: "\\1/s"
104 type: "gauge"
105 publishers:
106 - notifier://
107 - name: network_sink
108 transformers:
109 - name: "rate_of_change"
110 parameters:
111 source:
112 map_from:
113 name: "network\\.(incoming|outgoing)\\.(bytes|packets)"
114 unit: "(B|packet)"
115 target:
116 map_to:
117 name: "network.\\1.\\2.rate"
118 unit: "\\1/s"
119 type: "gauge"
120 publishers:
121 - notifier://
122{% if onos %}
123 - name: sdn_sink
124 transformers:
125 publishers:
126 - notifier://
127 - {{ onos_target }}
128{% endif %}