Snapshots via Grafana Anonymous Access
+ Anonymous access on grafana allows pngs to be rendered without authentication + Fixed ansible 2.0 depreciation warning. + Specify ansible_python_interpreter to avoid following issue: - https://github.com/ansible/ansible/issues/13773 Change-Id: I2f68d8e9ad5f9f39befb05a023cc68b1de754e94
This commit is contained in:
parent
cc5fee596b
commit
86dba51a41
@ -4,20 +4,20 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
- name: Generate General Snapshots
|
- name: Generate General Snapshots
|
||||||
shell: "mkdir -p /home/stack/browbeat/{{results_dir}}/{{item[0]}}/; curl -X GET -H 'Authorization: Bearer {{grafana_api_key}}' '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"
|
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:
|
with_nested:
|
||||||
- "{{ hosts_in_group }}"
|
- "{{ hosts_in_group }}"
|
||||||
- "{{ general_panels }}"
|
- "{{ general_panels }}"
|
||||||
|
|
||||||
- name: Generate Disk Snapshots
|
- name: Generate Disk Snapshots
|
||||||
shell: "mkdir -p /home/stack/browbeat/{{results_dir}}/{{item[0]}}/;curl -X GET -H 'Authorization: Bearer {{grafana_api_key}}' '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"
|
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:
|
with_nested:
|
||||||
- "{{ hosts_in_group }}"
|
- "{{ hosts_in_group }}"
|
||||||
- "{{ disks_in_group }}"
|
- "{{ disks_in_group }}"
|
||||||
- "{{ disk_panels }}"
|
- "{{ disk_panels }}"
|
||||||
|
|
||||||
- name: Generate Interface Snapshots
|
- name: Generate Interface Snapshots
|
||||||
shell: "mkdir -p /home/stack/browbeat/{{results_dir}}/{{item[0]}}/;curl -X GET -H 'Authorization: Bearer {{grafana_api_key}}' '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"
|
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:
|
with_nested:
|
||||||
- "{{ hosts_in_group }}"
|
- "{{ hosts_in_group }}"
|
||||||
- "{{ interfaces_in_group }}"
|
- "{{ interfaces_in_group }}"
|
||||||
|
@ -3,42 +3,48 @@
|
|||||||
# Snapshot Dashboard
|
# Snapshot Dashboard
|
||||||
#
|
#
|
||||||
# Example Usage:
|
# Example Usage:
|
||||||
# ansible-playbook -i hosts browbeat/snapshot-general-performance-dashboard.yml -e "grafana_ip=1.1.1.1 grafana_port=3000 grafana_api_key=<apikey> from=1455649200000 to=1455656400000 results_dir=results/ var_cloud=openstack"
|
# 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.
|
# Append snapshot_compute=true to run snapshots against computes.
|
||||||
#
|
#
|
||||||
|
|
||||||
- hosts: undercloud
|
- hosts: localhost
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
remote_user: stack
|
remote_user: stack
|
||||||
vars:
|
vars:
|
||||||
|
ansible_connection: local
|
||||||
|
ansible_python_interpreter: "/usr/bin/python"
|
||||||
host_type: undercloud
|
host_type: undercloud
|
||||||
host_suffix: ""
|
host_suffix: ""
|
||||||
hosts_in_group: groups['undercloud']
|
hosts_in_group: "{{groups['undercloud']}}"
|
||||||
disks_in_group: "{{disks['undercloud']}}"
|
disks_in_group: "{{disks['undercloud']}}"
|
||||||
interfaces_in_group: "{{interfaces['undercloud']}}"
|
interfaces_in_group: "{{interfaces['undercloud']}}"
|
||||||
roles:
|
roles:
|
||||||
- grafana-snapshot
|
- grafana-snapshot
|
||||||
|
|
||||||
- hosts: undercloud
|
- hosts: localhost
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
remote_user: stack
|
remote_user: stack
|
||||||
vars:
|
vars:
|
||||||
|
ansible_connection: local
|
||||||
|
ansible_python_interpreter: "/usr/bin/python"
|
||||||
host_type: controller
|
host_type: controller
|
||||||
host_suffix: ""
|
host_suffix: ""
|
||||||
hosts_in_group: groups['controller']
|
hosts_in_group: "{{groups['controller']}}"
|
||||||
disks_in_group: "{{disks['controller']}}"
|
disks_in_group: "{{disks['controller']}}"
|
||||||
interfaces_in_group: "{{interfaces['controller']}}"
|
interfaces_in_group: "{{interfaces['controller']}}"
|
||||||
roles:
|
roles:
|
||||||
- grafana-snapshot
|
- grafana-snapshot
|
||||||
|
|
||||||
- hosts: undercloud
|
- hosts: localhost
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
remote_user: stack
|
remote_user: stack
|
||||||
vars:
|
vars:
|
||||||
|
ansible_connection: local
|
||||||
|
ansible_python_interpreter: "/usr/bin/python"
|
||||||
host_type: compute
|
host_type: compute
|
||||||
host_suffix: ""
|
host_suffix: ""
|
||||||
hosts_in_group: groups['compute']
|
hosts_in_group: "{{groups['compute']}}"
|
||||||
disks_in_group: "{{disks['compute']}}"
|
disks_in_group: "{{disks['compute']}}"
|
||||||
interfaces_in_group: "{{interfaces['compute']}}"
|
interfaces_in_group: "{{interfaces['compute']}}"
|
||||||
roles:
|
roles:
|
||||||
|
@ -22,7 +22,6 @@ grafana:
|
|||||||
- openstack-general-system-performance
|
- openstack-general-system-performance
|
||||||
snapshot:
|
snapshot:
|
||||||
enabled: false
|
enabled: false
|
||||||
grafana_api_key: (Your API Key Here)
|
|
||||||
snapshot_compute: false
|
snapshot_compute: false
|
||||||
perfkit:
|
perfkit:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -22,7 +22,6 @@ grafana:
|
|||||||
- openstack-general-system-performance
|
- openstack-general-system-performance
|
||||||
snapshot:
|
snapshot:
|
||||||
enabled: false
|
enabled: false
|
||||||
grafana_api_key: (Your API Key Here)
|
|
||||||
snapshot_compute: false
|
snapshot_compute: false
|
||||||
perfkit:
|
perfkit:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -23,7 +23,6 @@ grafana:
|
|||||||
- openstack-general-system-performance
|
- openstack-general-system-performance
|
||||||
snapshot:
|
snapshot:
|
||||||
enabled: false
|
enabled: false
|
||||||
grafana_api_key: (Your API Key Here)
|
|
||||||
snapshot_compute: false
|
snapshot_compute: false
|
||||||
rally:
|
rally:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -23,7 +23,6 @@ grafana:
|
|||||||
- openstack-general-system-performance
|
- openstack-general-system-performance
|
||||||
snapshot:
|
snapshot:
|
||||||
enabled: false
|
enabled: false
|
||||||
grafana_api_key: (Your API Key Here)
|
|
||||||
snapshot_compute: false
|
snapshot_compute: false
|
||||||
rally:
|
rally:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -22,7 +22,6 @@ grafana:
|
|||||||
- openstack-general-system-performance
|
- openstack-general-system-performance
|
||||||
snapshot:
|
snapshot:
|
||||||
enabled: false
|
enabled: false
|
||||||
grafana_api_key: (Your API Key Here)
|
|
||||||
snapshot_compute: false
|
snapshot_compute: false
|
||||||
perfkit:
|
perfkit:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -15,7 +15,6 @@ class Grafana:
|
|||||||
def get_extra_vars(self, from_ts, to_ts, result_dir, test_name):
|
def get_extra_vars(self, from_ts, to_ts, result_dir, test_name):
|
||||||
extra_vars = 'grafana_ip={} '.format(self.config['grafana']['grafana_ip'])
|
extra_vars = 'grafana_ip={} '.format(self.config['grafana']['grafana_ip'])
|
||||||
extra_vars += 'grafana_port={} '.format(self.config['grafana']['grafana_port'])
|
extra_vars += 'grafana_port={} '.format(self.config['grafana']['grafana_port'])
|
||||||
extra_vars += 'grafana_api_key={} '.format(self.config['grafana']['snapshot']['grafana_api_key'])
|
|
||||||
extra_vars += 'from={} '.format(from_ts)
|
extra_vars += 'from={} '.format(from_ts)
|
||||||
extra_vars += 'to={} '.format(to_ts)
|
extra_vars += 'to={} '.format(to_ts)
|
||||||
extra_vars += 'results_dir={}/{} '.format(result_dir, test_name)
|
extra_vars += 'results_dir={}/{} '.format(result_dir, test_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user