blob: b21d12e50de80c18d8a9e04695e60f7097fb58c6 [file] [log] [blame]
Matteo Scandoloeb0d11c2017-08-08 13:05:26 -07001
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 Vavilapalli1dfc9c82016-12-20 02:58:32 +000017---
18- name: Validate Monitoring URL is completely UP and valid metrics are returned
19 uri:
Srikanth Vavilapalli71aa28d2017-01-31 00:43:13 +000020 url: "{{monitoringservice.results[1].json[0].ceilometer_ssh_proxy_url}}v2/meters"
Srikanth Vavilapalli1dfc9c82016-12-20 02:58:32 +000021 status_code: 200
22 return_content: yes
23 body_format: json
24 HEADER_Content-Type: "application/json"
25 register: metrics
26 until: "(metrics.status == 200) and (metrics.content|from_json|length>0)"
27 retries: 5
28 delay: 10
29
30- name: assert disk related infra metrics are present
31 assert:
32 that: "'disk.write.requests' in metrics.content"
33 msg: "Metrics does not contains disk related statistics"
34
35- name: assert memory related infra metrics are present
36 assert:
37 that: "'memory' in metrics.content"
38 msg: "Metrics does not contains memory related statistics"
39
40- name: assert cpu related infra metrics are present
41 assert:
42 that: "'cpu' in metrics.content"
43 msg: "Metrics does not contains cpu related statistics"
44