Skip to content

Files

Latest commit

melissamlJonathan Rosser
melissaml
and
Jonathan Rosser
Jul 9, 2019
87cbdd6 · Jul 9, 2019

History

History

cluster_metrics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 23, 2018
Jan 10, 2017
Jun 27, 2017
Sep 9, 2016
Jan 26, 2017
Apr 13, 2018
Sep 9, 2016
Nov 17, 2016
Mar 8, 2018
Jan 26, 2017
Apr 13, 2018
Jul 9, 2019
Apr 13, 2018

readme.rst

Gather and visualize cluster wide metrics

Date: 2017-12-01
tags:openstack, ansible
category:*openstack, *nix

About this repository

This set of playbooks will deploy InfluxDB, Telegraf, and Kapacitor for the purpose of collecting metrics on an OpenStack cluster.

Process

Clone the OPS repo

cd /opt
git clone https://git.opendev.org/openstack/openstack-ansible-ops

Copy the env.d files into place

cd openstack-ansible-ops/cluster_metrics
cp etc/env.d/cluster_metrics.yml /etc/openstack_deploy/env.d/

Add the export to update the inventory file location

export ANSIBLE_INVENTORY=/opt/openstack-ansible/playbooks/inventory/dynamic_inventory.py

If you are running the HA Proxy you should run the following playbook as well.

openstack-ansible playbook-metrics-lb.yml

Create the containers

openstack-ansible /opt/openstack-ansible/playbooks/lxc-containers-create.yml -e container_group=cluster-metrics

Install InfluxDB

openstack-ansible playbook-influx-db.yml

Clone the Telegraf repo

git clone https://github.com/mgrzybek/openstack-ansible-telegraf /etc/ansible/roles/openstack-ansible-telegraf

Install Influx Telegraf

If you wish to install telegraf and point it at a specific target, or list of targets, set the telegraf_output_influxdb_targets variable in the user_variables.yml file as a list containing all targets that telegraf should ship metrics to.

openstack-ansible playbook-influx-telegraf.yml --forks 100

Install Kapacitor

openstack-ansible playbook-kapacitor.yml

OpenStack Swift PRoxy Server Dashboard

Once the telegraf daemon is installed onto each host, the Swift proxy-server can be instructed to forward statsd metrics to telegraf. The following configuration enabled the metric generation and need to be added to the user_variables.yml:

swift_proxy_server_conf_overrides:
  DEFAULT:
    log_statsd_default_sample_rate: 10
    log_statsd_metric_prefix: "{{ inventory_hostname }}.swift"
    log_statsd_host: localhost
    log_statsd_port: 8125

Rewrite the swift proxy server configuration with :

cd /opt/openstack-ansible/playbooks
openstack-ansible os-swift-setup.yml --tags swift-config --forks 2