Remove Grafana Snapshot
It was a good idea, but as html+pngs it doesn't look well nor is used much (if any). Change-Id: I1f394c197686917e98a2be1364c4ae4d53aeee6c
This commit is contained in:
parent
4d90edcdff
commit
c111042326
@ -1,34 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Generate Snapshots
|
||||
#
|
||||
|
||||
- name: Generate General Snapshots
|
||||
shell: "mkdir -p /home/stack/browbeat/{{results_dir}}/{{item[0]}}/; curl -X GET 'http://{{grafana_ip}}:{{grafana_port}}/render/dashboard-solo/db/openstack-general-system-performance?panelId={{item[1].panelId}}&from={{from}}&to={{to}}&var-Cloud={{var_cloud}}&var-Node={{item[0]}}{{host_suffix}}&var-Interface=interface-test&var-Disk=disk-sda&width=1200' > /home/stack/browbeat/{{results_dir}}/{{item[0]}}/{{item[0]}}-{{item[1].name}}.png"
|
||||
with_nested:
|
||||
- "{{ hosts_in_group }}"
|
||||
- "{{ general_panels }}"
|
||||
|
||||
- name: Generate Disk Snapshots
|
||||
shell: "mkdir -p /home/stack/browbeat/{{results_dir}}/{{item[0]}}/;curl -X GET 'http://{{grafana_ip}}:{{grafana_port}}/render/dashboard-solo/db/openstack-general-system-performance?panelId={{item[2].panelId}}&from={{from}}&to={{to}}&var-Cloud={{var_cloud}}&var-Node={{item[0]}}{{host_suffix}}&var-Interface=interface-test&var-Disk=disk-{{item[1]}}&width=1200' > /home/stack/browbeat/{{results_dir}}/{{item[0]}}/{{item[0]}}-{{item[2].name}}-{{item[1]}}.png"
|
||||
with_nested:
|
||||
- "{{ hosts_in_group }}"
|
||||
- "{{ disks_in_group }}"
|
||||
- "{{ disk_panels }}"
|
||||
|
||||
- name: Generate Interface Snapshots
|
||||
shell: "mkdir -p /home/stack/browbeat/{{results_dir}}/{{item[0]}}/;curl -X GET 'http://{{grafana_ip}}:{{grafana_port}}/render/dashboard-solo/db/openstack-general-system-performance?panelId={{item[2].panelId}}&from={{from}}&to={{to}}&var-Cloud={{var_cloud}}&var-Node={{item[0]}}{{host_suffix}}&var-Interface=interface-{{item[1]}}&var-Disk=disk-sda&width=1200' > /home/stack/browbeat/{{results_dir}}/{{item[0]}}/{{item[0]}}-{{item[2].name}}-{{item[1]}}.png"
|
||||
with_nested:
|
||||
- "{{ hosts_in_group }}"
|
||||
- "{{ interfaces_in_group }}"
|
||||
- "{{ interface_panels }}"
|
||||
|
||||
- name: Generate index.html per host
|
||||
template:
|
||||
src=index.html.j2
|
||||
dest=/home/stack/browbeat/{{results_dir}}/{{item}}/index.html
|
||||
owner=stack
|
||||
group=stack
|
||||
mode=0644
|
||||
with_items:
|
||||
- "{{groups[host_type]}}"
|
@ -1,60 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>{{item}}</title>
|
||||
<style type="text/css">
|
||||
a:link { color: #c00 } /* unvisited */
|
||||
a:visited { color: #0c0 } /* visited */
|
||||
a:hover { color: #00c } /* hovers */
|
||||
a:active { color: #ccc } /* active */
|
||||
</style>
|
||||
</head>
|
||||
<body style="background-color: rgb(22, 22, 22)">
|
||||
<div style="color: rgb(255,255,255)">
|
||||
<b>{{item}} - System Performance Snapshot</b>
|
||||
<br>
|
||||
Undercloud:
|
||||
{% for host in groups['undercloud'] %}
|
||||
<a href="../{{host}}">{{host}}</a>
|
||||
{% endfor %}
|
||||
<br>
|
||||
Controllers:
|
||||
{% for host in groups['controller'] %}
|
||||
<a href="../{{host}}">{{host}}</a>
|
||||
{% endfor %}
|
||||
{% if snapshot_compute is defined and snapshot_compute %}
|
||||
<br>
|
||||
Computes:
|
||||
{% for host in groups['compute'] %}
|
||||
<a href="../{{host}}">{{host}}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<br>
|
||||
<a href="#disks">Disks</a> :
|
||||
{% for disk in disks_in_group %}
|
||||
<a href="#disk-{{disk}}">{{disk}}</a>
|
||||
{% endfor %}
|
||||
<br><br>
|
||||
<a href="#interfaces">Interfaces</a> :
|
||||
{% for interface in interfaces_in_group %}
|
||||
<a href="#interface-{{interface}}">{{interface}}</a>
|
||||
{% endfor %}
|
||||
<br><br>
|
||||
{% for panel in general_panels %}
|
||||
<img src="{{item}}-{{panel.name}}.png"/><br>
|
||||
{% endfor %}
|
||||
<div id="disks">
|
||||
{% for disk in disks_in_group %}
|
||||
{% for panel in disk_panels %}
|
||||
<div id="disk-{{disk}}">
|
||||
<img src="{{item}}-{{panel.name}}-{{disk}}.png"/><br>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<div id="interfaces">
|
||||
{% for interface in interfaces_in_group %}
|
||||
{% for panel in interface_panels %}
|
||||
<div id="interface-{{interface}}">
|
||||
<img src="{{item}}-{{panel.name}}-{{interface}}.png"/><br>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</html>
|
@ -1,99 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Grafana Snapshot vars
|
||||
#
|
||||
|
||||
# Task prepends "disk-" prefix for you
|
||||
disks:
|
||||
undercloud:
|
||||
- vda
|
||||
controller:
|
||||
- sda
|
||||
- sda2
|
||||
compute:
|
||||
- sda
|
||||
- sda2
|
||||
|
||||
disk_panels:
|
||||
- panelId: 9
|
||||
name: disk-iops
|
||||
- panelId: 10
|
||||
name: disk-throughput
|
||||
- panelId: 14
|
||||
name: disk-io-time
|
||||
|
||||
# Task prepends "interface-" prefix for you
|
||||
interfaces:
|
||||
undercloud:
|
||||
- br-ctlplane
|
||||
# - br-int
|
||||
- ens3
|
||||
- ens7
|
||||
- lo
|
||||
# - ovs-system
|
||||
controller:
|
||||
- br-ex
|
||||
- br-int
|
||||
- br-tun
|
||||
- br-vlan
|
||||
- enp3s0f0
|
||||
- enp3s0f1
|
||||
- enp4s0f0
|
||||
- enp4s0f1
|
||||
# - ens1f0
|
||||
# - ens1f1
|
||||
- lo
|
||||
# - ovs-system
|
||||
- vlan201
|
||||
- vlan202
|
||||
- vlan203
|
||||
- vlan204
|
||||
compute:
|
||||
- br-ex
|
||||
- br-int
|
||||
- br-tun
|
||||
- br-vlan
|
||||
- enp3s0f0
|
||||
- enp3s0f1
|
||||
- enp4s0f0
|
||||
- enp4s0f1
|
||||
# - ens1f0
|
||||
# - ens1f1
|
||||
- lo
|
||||
# - ovs-system
|
||||
- vlan201
|
||||
- vlan202
|
||||
- vlan203
|
||||
- vlan204
|
||||
|
||||
interface_panels:
|
||||
- panelId: 16
|
||||
name: network-pps
|
||||
- panelId: 17
|
||||
name: network-throughput
|
||||
|
||||
general_panels:
|
||||
- panelId: 1
|
||||
name: all-cpu
|
||||
- panelId: 2
|
||||
name: all-cpu-sum
|
||||
- panelId: 5
|
||||
name: memory-bytes
|
||||
- panelId: 6
|
||||
name: memory-percentage
|
||||
- panelId: 7
|
||||
name: swap-usage
|
||||
- panelId: 19
|
||||
name: conntrack
|
||||
- panelId: 25
|
||||
name: numa
|
||||
- panelId: 26
|
||||
name: irq
|
||||
- panelId: 27
|
||||
name: interrupts
|
||||
- panelId: 28
|
||||
name: load-uptime
|
||||
- panelId: 29
|
||||
name: processes
|
||||
- panelId: 126
|
||||
name: tail-errors
|
@ -1,51 +0,0 @@
|
||||
---
|
||||
#
|
||||
# Snapshot Dashboard
|
||||
#
|
||||
# Example Usage:
|
||||
# ansible-playbook -i hosts browbeat/snapshot-general-performance-dashboard.yml -e "grafana_ip=1.1.1.1 grafana_port=3000 from=1455649200000 to=1455656400000 results_dir=results/ var_cloud=openstack"
|
||||
#
|
||||
# Append snapshot_compute=true to run snapshots against computes.
|
||||
#
|
||||
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
remote_user: stack
|
||||
vars:
|
||||
ansible_connection: local
|
||||
ansible_python_interpreter: "/usr/bin/python"
|
||||
host_type: undercloud
|
||||
host_suffix: ""
|
||||
hosts_in_group: "{{groups['undercloud']}}"
|
||||
disks_in_group: "{{disks['undercloud']}}"
|
||||
interfaces_in_group: "{{interfaces['undercloud']}}"
|
||||
roles:
|
||||
- grafana-snapshot
|
||||
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
remote_user: stack
|
||||
vars:
|
||||
ansible_connection: local
|
||||
ansible_python_interpreter: "/usr/bin/python"
|
||||
host_type: controller
|
||||
host_suffix: ""
|
||||
hosts_in_group: "{{groups['controller']}}"
|
||||
disks_in_group: "{{disks['controller']}}"
|
||||
interfaces_in_group: "{{interfaces['controller']}}"
|
||||
roles:
|
||||
- grafana-snapshot
|
||||
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
remote_user: stack
|
||||
vars:
|
||||
ansible_connection: local
|
||||
ansible_python_interpreter: "/usr/bin/python"
|
||||
host_type: compute
|
||||
host_suffix: ""
|
||||
hosts_in_group: "{{groups['compute']}}"
|
||||
disks_in_group: "{{disks['compute']}}"
|
||||
interfaces_in_group: "{{interfaces['compute']}}"
|
||||
roles:
|
||||
- { role: grafana-snapshot, when: snapshot_compute is defined }
|
@ -26,7 +26,6 @@ ansible:
|
||||
neutron_l3: ansible/browbeat/adjustment-l3.yml
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
grafana_snapshot: ansible/browbeat/snapshot-general-performance-dashboard.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
@ -37,9 +36,6 @@ grafana:
|
||||
grafana_port: 3000
|
||||
dashboards:
|
||||
- openstack-general-system-performance
|
||||
snapshot:
|
||||
enabled: false
|
||||
snapshot_compute: false
|
||||
perfkit:
|
||||
enabled: true
|
||||
sleep_before: 0
|
||||
|
@ -26,7 +26,6 @@ ansible:
|
||||
neutron_l3: ansible/browbeat/adjustment-l3.yml
|
||||
nova_db: ansible/browbeat/adjustment-db.yml
|
||||
workers: ansible/browbeat/adjustment-workers.yml
|
||||
grafana_snapshot: ansible/browbeat/snapshot-general-performance-dashboard.yml
|
||||
metadata: ansible/gather/site.yml
|
||||
connmon:
|
||||
enabled: false
|
||||
@ -37,9 +36,6 @@ grafana:
|
||||
grafana_port: 3000
|
||||
dashboards:
|
||||
- openstack-general-system-performance
|
||||
snapshot:
|
||||
enabled: false
|
||||
snapshot_compute: false
|
||||
perfkit:
|
||||
enabled: false
|
||||
sleep_before: 0
|
||||
|
@ -11,7 +11,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
|
||||
class Grafana(object):
|
||||
@ -63,31 +62,3 @@ class Grafana(object):
|
||||
test_name,
|
||||
dashboard,
|
||||
self.grafana_url[dashboard]))
|
||||
|
||||
def log_snapshot_playbook_cmd(self, from_ts, to_ts, result_dir, test_name):
|
||||
if 'grafana' in self.config and self.config['grafana']['enabled']:
|
||||
extra_vars = self.extra_vars(
|
||||
from_ts, to_ts, result_dir, test_name)
|
||||
snapshot_cmd = 'ansible-playbook -i {} {} -e "{}"'.format(
|
||||
self.hosts_file, self.playbook, extra_vars)
|
||||
self.logger.debug('Snapshot command: {}'.format(snapshot_cmd))
|
||||
|
||||
def run_playbook(self, from_ts, to_ts, result_dir, test_name):
|
||||
if 'grafana' in self.config and self.config['grafana']['enabled']:
|
||||
if self.config['grafana']['snapshot']['enabled']:
|
||||
extra_vars = self.extra_vars(
|
||||
from_ts, to_ts, result_dir, test_name)
|
||||
subprocess_cmd = [
|
||||
'ansible-playbook',
|
||||
'-i',
|
||||
self.hosts_file,
|
||||
self.playbook,
|
||||
'-e',
|
||||
'{}'.format(extra_vars)]
|
||||
snapshot_log = open('{}/snapshot.log'.format(result_dir), 'a+')
|
||||
self.logger.info(
|
||||
'Running ansible to create snapshots for: {}'.format(test_name))
|
||||
subprocess.Popen(
|
||||
subprocess_cmd,
|
||||
stdout=snapshot_log,
|
||||
stderr=subprocess.STDOUT)
|
||||
|
@ -190,9 +190,6 @@ class PerfKit(WorkloadBase.WorkloadBase):
|
||||
{'from_ts': int(from_ts * 1000),
|
||||
'to_ts': int(to_ts * 1000)})
|
||||
self.grafana.print_dashboard_url(test_name)
|
||||
self.grafana.log_snapshot_playbook_cmd(
|
||||
from_ts, to_ts, result_dir, test_name)
|
||||
self.grafana.run_playbook(from_ts, to_ts, result_dir, test_name)
|
||||
|
||||
return success, to_ts, from_ts
|
||||
|
||||
|
@ -73,9 +73,6 @@ class Rally(WorkloadBase.WorkloadBase):
|
||||
to_ts = int(time.time() * 1000)
|
||||
self.grafana.create_grafana_urls({'from_ts': from_ts, 'to_ts': to_ts})
|
||||
self.grafana.print_dashboard_url(test_name)
|
||||
self.grafana.log_snapshot_playbook_cmd(
|
||||
from_ts, to_ts, result_dir, test_name)
|
||||
self.grafana.run_playbook(from_ts, to_ts, result_dir, test_name)
|
||||
return (from_time, to_time)
|
||||
|
||||
def update_tests(self):
|
||||
|
@ -395,9 +395,6 @@ class Shaker(WorkloadBase.WorkloadBase):
|
||||
# Snapshotting
|
||||
self.grafana.create_grafana_urls({'from_ts': from_ts, 'to_ts': to_ts})
|
||||
self.grafana.print_dashboard_url(test_name)
|
||||
self.grafana.log_snapshot_playbook_cmd(
|
||||
from_ts, to_ts, result_dir, test_name)
|
||||
self.grafana.run_playbook(from_ts, to_ts, result_dir, test_name)
|
||||
# Send Data to elastic
|
||||
if self.config['elasticsearch']['enabled']:
|
||||
index_status = self.send_to_elastic(outputfile, scenario['name'], shaker_uuid,
|
||||
|
@ -74,9 +74,6 @@ mapping:
|
||||
type: str
|
||||
workers:
|
||||
type: str
|
||||
grafana_snapshot:
|
||||
type: str
|
||||
required: True
|
||||
shaker_build:
|
||||
type: str
|
||||
metadata:
|
||||
|
Loading…
x
Reference in New Issue
Block a user