Matteo Scandolo | eb0d11c | 2017-08-08 13:05:26 -0700 | [diff] [blame^] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain 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, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Srikanth Vavilapalli | 3171360 | 2017-03-03 00:50:18 +0000 | [diff] [blame] | 17 | --- |
| 18 | sources: |
| 19 | - name: meter_source |
| 20 | interval: 600 |
| 21 | meters: |
| 22 | - "*" |
| 23 | sinks: |
| 24 | - meter_sink |
| 25 | - name: cpu_source |
| 26 | interval: 600 |
| 27 | meters: |
| 28 | - "cpu" |
| 29 | sinks: |
| 30 | - cpu_sink |
| 31 | - cpu_delta_sink |
| 32 | - name: disk_source |
| 33 | interval: 600 |
| 34 | meters: |
| 35 | - "disk.read.bytes" |
| 36 | - "disk.read.requests" |
| 37 | - "disk.write.bytes" |
| 38 | - "disk.write.requests" |
| 39 | - "disk.device.read.bytes" |
| 40 | - "disk.device.read.requests" |
| 41 | - "disk.device.write.bytes" |
| 42 | - "disk.device.write.requests" |
| 43 | sinks: |
| 44 | - disk_sink |
| 45 | - name: network_source |
| 46 | interval: 600 |
| 47 | meters: |
| 48 | - "network.incoming.bytes" |
| 49 | - "network.incoming.packets" |
| 50 | - "network.outgoing.bytes" |
| 51 | - "network.outgoing.packets" |
| 52 | sinks: |
| 53 | - network_sink |
| 54 | sinks: |
| 55 | - name: meter_sink |
| 56 | transformers: |
| 57 | publishers: |
| 58 | - direct:// |
| 59 | - name: cpu_sink |
| 60 | transformers: |
| 61 | - name: "rate_of_change" |
| 62 | parameters: |
| 63 | target: |
| 64 | name: "cpu_util" |
| 65 | unit: "%" |
| 66 | type: "gauge" |
| 67 | scale: "100.0 / (10**9 * (resource_metadata.cpu_number or 1))" |
| 68 | publishers: |
| 69 | - direct:// |
| 70 | - name: cpu_delta_sink |
| 71 | transformers: |
| 72 | - name: "delta" |
| 73 | parameters: |
| 74 | target: |
| 75 | name: "cpu.delta" |
| 76 | growth_only: True |
| 77 | publishers: |
| 78 | - direct:// |
| 79 | - name: disk_sink |
| 80 | transformers: |
| 81 | - name: "rate_of_change" |
| 82 | parameters: |
| 83 | source: |
| 84 | map_from: |
| 85 | name: "(disk\\.device|disk)\\.(read|write)\\.(bytes|requests)" |
| 86 | unit: "(B|request)" |
| 87 | target: |
| 88 | map_to: |
| 89 | name: "\\1.\\2.\\3.rate" |
| 90 | unit: "\\1/s" |
| 91 | type: "gauge" |
| 92 | publishers: |
| 93 | - direct:// |
| 94 | - name: network_sink |
| 95 | transformers: |
| 96 | - name: "rate_of_change" |
| 97 | parameters: |
| 98 | source: |
| 99 | map_from: |
| 100 | name: "network\\.(incoming|outgoing)\\.(bytes|packets)" |
| 101 | unit: "(B|packet)" |
| 102 | target: |
| 103 | map_to: |
| 104 | name: "network.\\1.\\2.rate" |
| 105 | unit: "\\1/s" |
| 106 | type: "gauge" |
| 107 | publishers: |
| 108 | - direct:// |