Adjust collectd interval and sleep before/after benchmark

+ Also collect ceph processes in collectd.conf
+ Move sleep before/after to rally portion of config file

Change-Id: I7f6f76ea1f32808d1e2482a656c4090761ce8c8e
This commit is contained in:
Alex Krzos 2016-02-15 12:23:52 -05:00
parent c47f0ad59b
commit eb2ebb346d
7 changed files with 29 additions and 10 deletions

View File

@ -6,11 +6,17 @@ connmon_host: 192.0.2.1
dns_server: 8.8.8.8
# collectd params:
# epel_repo for collectd packages
# graphite_host, where to send the collectd metrics
# Collectd interval (seconds)
collectd_interval: 10
# epel Repository for collectd packages
epel_repo: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# Graphite Server ip address (Collectd -> Graphite server)
graphite_host: 1.1.1.1
# Graphite prefix / Cloud name used both with graphite and grafana dashboards
graphite_prefix: openstack
# Grafana API Key (Used to upload Grafana dashboards)
grafana_api_key: (Your Grafana API Key)
# Grafana Server IP Address (Can be hosted on the Graphite server)
grafana_host: 1.1.1.1

View File

@ -26,7 +26,8 @@
group=root
mode=0644
with_items:
- ip_address: "{{ graphite_host }}"
- interval: "{{ collectd_interval }}"
ip_address: "{{ graphite_host }}"
prefix: "{{ graphite_prefix }}"
- name: Copy collectd config files

View File

@ -1,7 +1,7 @@
# Installed by Browbeat Ansible Installer
# Interval default of 10s
Interval 10.0
# Interval default is 10s
Interval {{ item.interval }}
# Allow collectd to log
LoadPlugin syslog
@ -84,6 +84,12 @@ PreCacheChain "PreCache"
ProcessMatch "ceilometer-api" "python.+ceilometer-api"
ProcessMatch "ceilometer-collector" "python.+ceilometer-collector"
# Ceph
ProcessMatch "ceph-mon" "^/usr/bin/ceph-mon"
ProcessMatch "ceph-osd" "^/usr/bin/ceph-osd"
ProcessMatch "diamond" "python.+diamond"
ProcessMatch "salt-minion" "python.+salt-minion"
# Cinder
ProcessMatch "cinder-api" "python.+cinder-api"
ProcessMatch "cinder-scheduler" "python.+cinder-scheduler"

View File

@ -55,7 +55,7 @@
- openstack_cloud_system_performance_comparsion.json
- name: Remove Existing Dashboards
command: "curl -X DELETE -H 'Authorization: Bearer {{ grafana_api_key }}' -H 'Content-Type: application/json' http://{{ graphite_host }}:3000/api/dashboards/db/{{ item }}"
command: "curl -X DELETE -H 'Authorization: Bearer {{ grafana_api_key }}' -H 'Content-Type: application/json' http://{{ grafana_host }}:3000/api/dashboards/db/{{ item }}"
when: overwrite_existing
with_items:
- "{{ graphite_prefix }}-all-nodes-cpu"
@ -67,7 +67,7 @@
- name: Upload Dashboards to Grafana
command: "curl -X POST -H 'Authorization: Bearer {{ grafana_api_key }}' -H 'Content-Type: application/json' -d @{{ item }} http://{{ graphite_host }}:3000/api/dashboards/db"
command: "curl -X POST -H 'Authorization: Bearer {{ grafana_api_key }}' -H 'Content-Type: application/json' -d @{{ item }} http://{{ grafana_host }}:3000/api/dashboards/db"
with_items:
- all_cpu_graphs.json
- all_memory_graphs.json

View File

@ -22,6 +22,8 @@ grafana:
- openstack-general-system-performance
url: http://grafana-host.example.com:3000/dashboard/db/
rally:
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
benchmarks:
cinder:

View File

@ -22,6 +22,8 @@ grafana:
- openstack-general-system-performance
url: http://grafana-host.example.com:3000/dashboard/db/
rally:
sleep_before: 5
sleep_after: 5
venv: /home/stack/rally-venv/bin/activate
benchmarks:
cinder:

View File

@ -28,16 +28,18 @@ class Rally:
self.logger.debug("--------------------------------")
from_ts = int(time.time() * 1000)
if 'sleep_before' in self.config['rally']:
time.sleep(self.config['rally']['sleep_before'])
task_args = str(scenario_args).replace("'", "\"")
cmd = "source {}; ".format(self.config['rally']['venv'])
cmd += "rally task start {} --task-args \'{}\' 2>&1 | tee {}.log".format(task_file,
task_args, test_name)
self.tools.run_cmd(cmd)
if 'sleep_after' in self.config['rally']:
time.sleep(self.config['rally']['sleep_after'])
to_ts = int(time.time() * 1000)
if 'grafana' in self.config and self.config['grafana']['enabled']:
from_ts -= - 10000
to_ts += 10000
url = self.config['grafana']['url']
cloud_name = self.config['grafana']['cloud_name']
for dashboard in self.config['grafana']['dashboards']: