Merge tag '2016.12.1' into debian/unstable
2016.12.1
diff --git a/FORMULA b/FORMULA
new file mode 100644
index 0000000..7b10676
--- /dev/null
+++ b/FORMULA
@@ -0,0 +1,8 @@
+name: glance
+os: Debian, RedHat
+os_family: Debian, RedHat
+version: 201606
+release: 1
+summary: Formula for installing and configuring glance
+description: Formula for installing and configuring glance
+top_level_dir: glance
diff --git a/README.rst b/README.rst
index a2367bb..50af4ff 100644
--- a/README.rst
+++ b/README.rst
@@ -2,7 +2,9 @@
Glance Image Store
==================
-The Glance project provides services for discovering, registering, and retrieving virtual machine images. Glance has a RESTful API that allows querying of VM image metadata as well as retrieval of the actual image.
+The Glance project provides services for discovering, registering, and
+retrieving virtual machine images. Glance has a RESTful API that allows
+querying of VM image metadata as well as retrieval of the actual image.
Usage
=====
@@ -68,6 +70,42 @@
file: cirros-0.3.1-x86_64-disk.img
source: http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img
public: true
+ audit:
+ enabled: false
+
+
+Client-side RabbitMQ HA setup
+
+.. code-block:: yaml
+
+ glance:
+ server:
+ ....
+ message_queue:
+ engine: rabbitmq
+ members:
+ - host: 10.0.16.1
+ - host: 10.0.16.2
+ - host: 10.0.16.3
+ user: openstack
+ password: pwd
+ virtual_host: '/openstack'
+ ....
+
+
+Enable auditing filter, ie: CADF
+
+.. code-block:: yaml
+
+ glance:
+ server:
+ audit:
+ enabled: true
+ ....
+ filter_factory: 'keystonemiddleware.audit:filter_factory'
+ map_file: '/etc/pycadf/glance_api_audit_map.conf'
+ ....
+
Keystone and cinder region
============================
@@ -85,6 +123,7 @@
region: RegionTwo
...
+
Ceph integration glance
=======================
@@ -95,7 +134,7 @@
enabled: true
version: juno
storage:
- engine: rbd
+ engine: rbd,http
user: glance
pool: images
chunk_size: 8
@@ -103,11 +142,28 @@
* http://ceph.com/docs/master/rbd/rbd-openstack/
-Read more
-=========
+Documentation and Bugs
+============================
-* http://docs.openstack.org/image-guide/content/ch_obtaining_images.html
-* http://cloud-images.ubuntu.com/precise/current/
-* http://fedoraproject.org/en/get-fedora#clouds
-* http://www.cloudbase.it/ws2012r2/
-* http://docs.openstack.org/cli-reference/content/glanceclient_commands.html
+To learn how to deploy OpenStack Salt, consult the documentation available
+online at:
+
+ https://wiki.openstack.org/wiki/OpenStackSalt
+
+In the unfortunate event that bugs are discovered, they should be reported to
+the appropriate bug tracker. If you obtained the software from a 3rd party
+operating system vendor, it is often wise to use their own bug tracker for
+reporting problems. In all other cases use the master OpenStack bug tracker,
+available at:
+
+ http://bugs.launchpad.net/openstack-salt
+
+Developers wishing to work on the OpenStack Salt project should always base
+their work on the latest formulas code, available from the master GIT
+repository at:
+
+ https://git.openstack.org/cgit/openstack/salt-formula-glance
+
+Developers should also join the discussion on the IRC list, at:
+
+ https://wiki.openstack.org/wiki/Meetings/openstack-salt
diff --git a/other-requirements.txt b/bindep.txt
similarity index 100%
rename from other-requirements.txt
rename to bindep.txt
diff --git a/glance/files/collectd_openstack_glance.conf b/glance/files/collectd_openstack_glance.conf
new file mode 100644
index 0000000..ad5179f
--- /dev/null
+++ b/glance/files/collectd_openstack_glance.conf
@@ -0,0 +1,10 @@
+Import "openstack_glance"
+
+<Module "openstack_glance">
+ KeystoneUrl "{{ plugin.url }}"
+ Username "{{ plugin.username }}"
+ Password "{{ plugin.password }}"
+ Tenant "{{ plugin.tenant }}"
+ MaxRetries "2"
+ Timeout "20"
+</Module>
diff --git a/glance/files/entrypoint.sh b/glance/files/entrypoint.sh
new file mode 100644
index 0000000..29ac8b3
--- /dev/null
+++ b/glance/files/entrypoint.sh
@@ -0,0 +1,28 @@
+{%- from "glance/map.jinja" import server with context -%}
+#!/bin/bash -e
+
+cat /srv/salt/pillar/glance-server.sls | envsubst > /tmp/glance-server.sls
+mv /tmp/glance-server.sls /srv/salt/pillar/glance-server.sls
+
+salt-call --local --retcode-passthrough state.highstate
+
+{% for service in server.services %}
+service {{ service }} stop || true
+{% endfor %}
+
+#Fix ownership for api.log file
+chown -R glance:glance /var/log/glance/
+
+if [ "$1" == "api" ]; then
+ echo "starting glance-api"
+ su glance --shell=/bin/sh -c '/usr/bin/glance-api --config-file=/etc/glance/glance-api.conf'
+elif [ "$1" == "registry" ]; then
+ echo "starting glance-registry"
+ su glance --shell=/bin/sh -c '/usr/bin/glance-registry --config-file=/etc/glance/glance-registry.conf'
+else
+ echo "No parameter submitted, don't know what to start" 1>&2
+fi
+
+{#-
+vim: syntax=jinja
+-#}
diff --git a/glance/files/grafana_dashboards/glance_influxdb.json b/glance/files/grafana_dashboards/glance_influxdb.json
new file mode 100644
index 0000000..b88b663
--- /dev/null
+++ b/glance/files/grafana_dashboards/glance_influxdb.json
@@ -0,0 +1,3267 @@
+{
+ "annotations": {
+ "enable": true,
+ "list": [
+ {
+ "datasource": "lma",
+ "enable": true,
+ "iconColor": "#C0C6BE",
+ "iconSize": 13,
+ "lineColor": "rgba(255, 96, 96, 0.592157)",
+ "name": "Status",
+ "query": "select title,tags,text from annotations where $timeFilter and cluster = 'glance'",
+ "showLine": true,
+ "tagsColumn": "tags",
+ "textColumn": "text",
+ "titleColumn": "title"
+ }
+ ]
+ },
+ "editable": true,
+ "hideControls": false,
+ "id": null,
+ "links": [],
+ "originalTitle": "Glance",
+ "refresh": "1m",
+ "rows": [
+ {
+ "collapse": false,
+ "editable": true,
+ "height": "250px",
+ "panels": [
+ {
+ "cacheTimeout": null,
+ "colorBackground": true,
+ "colorValue": false,
+ "colors": [
+ "rgba(71, 212, 59, 0.4)",
+ "rgba(241, 181, 37, 0.73)",
+ "rgba(225, 40, 40, 0.59)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 6,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "condition": "",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "groupby_field": "",
+ "interval": "",
+ "measurement": "cluster_status",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"environment_label\" =~ /^$environment$/ AND \"cluster_name\" = 'glance' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "cluster_name",
+ "operator": "=",
+ "value": "glance"
+ }
+ ]
+ }
+ ],
+ "thresholds": "1,3",
+ "title": "",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "no data",
+ "value": "null"
+ },
+ {
+ "op": "=",
+ "text": "OKAY",
+ "value": "0"
+ },
+ {
+ "op": "=",
+ "text": "WARN",
+ "value": "1"
+ },
+ {
+ "op": "=",
+ "text": "UNKN",
+ "value": "2"
+ },
+ {
+ "op": "=",
+ "text": "CRIT",
+ "value": "3"
+ },
+ {
+ "op": "=",
+ "text": "DOWN",
+ "value": "4"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(71, 212, 59, 0.4)",
+ "rgba(245, 150, 40, 0.73)",
+ "rgba(225, 40, 40, 0.59)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 13,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": true
+ },
+ "targets": [
+ {
+ "column": "value",
+ "condition": "",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "count",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupby_field": "",
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT sum(\"count\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_status\" = '5xx' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "count"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "sum"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_status",
+ "operator": "=",
+ "value": "5xx"
+ }
+ ]
+ }
+ ],
+ "thresholds": "0,1",
+ "title": "HTTP 5xx errors",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "fill": 0,
+ "grid": {
+ "threshold1": null,
+ "threshold1Color": "rgba(216, 200, 27, 0.27)",
+ "threshold2": null,
+ "threshold2Color": "rgba(234, 112, 112, 0.22)"
+ },
+ "id": 7,
+ "interval": ">60s",
+ "legend": {
+ "alignAsTable": true,
+ "avg": true,
+ "current": false,
+ "max": true,
+ "min": true,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "connected",
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "span": 8,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "alias": "GET",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT max(\"upper_90\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_method\" = 'GET' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "upper_90"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "max"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_method",
+ "operator": "=",
+ "value": "GET"
+ }
+ ]
+ },
+ {
+ "alias": "POST",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT max(\"upper_90\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_method\" = 'POST' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "upper_90"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "max"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_method",
+ "operator": "=",
+ "value": "POST"
+ }
+ ]
+ },
+ {
+ "alias": "PUT",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT max(\"upper_90\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_method\" = 'PUT' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "C",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "upper_90"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "max"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_method",
+ "operator": "=",
+ "value": "PUT"
+ }
+ ]
+ },
+ {
+ "alias": "DELETE",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT max(\"upper_90\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_method\" = 'DELETE' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "D",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "upper_90"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "max"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_method",
+ "operator": "=",
+ "value": "DELETE"
+ }
+ ]
+ },
+ {
+ "alias": "PATCH",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT max(\"upper_90\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_method\" = 'PATCH' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "E",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "upper_90"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "max"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_method",
+ "operator": "=",
+ "value": "PATCH"
+ }
+ ]
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "HTTP response time on $server",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "xaxis": {
+ "show": true
+ },
+ "yaxes": [
+ {
+ "format": "s",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ }
+ ]
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "fill": 1,
+ "grid": {
+ "threshold1": null,
+ "threshold1Color": "rgba(216, 200, 27, 0.27)",
+ "threshold2": null,
+ "threshold2Color": "rgba(234, 112, 112, 0.22)",
+ "thresholdLine": false
+ },
+ "id": 9,
+ "interval": "> 60s",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 2,
+ "links": [],
+ "nullPointMode": "connected",
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "span": 4,
+ "stack": false,
+ "steppedLine": true,
+ "targets": [
+ {
+ "alias": "healthy",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_check_api",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_check_api\" WHERE \"environment_label\" =~ /^$environment$/ AND \"service\" = 'glance-api' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "service",
+ "operator": "=",
+ "value": "glance-api"
+ }
+ ]
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "API Availability",
+ "tooltip": {
+ "msResolution": false,
+ "shared": false,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "xaxis": {
+ "show": true
+ },
+ "yaxes": [
+ {
+ "format": "none",
+ "label": "",
+ "logBase": 1,
+ "max": 1,
+ "min": 0,
+ "show": false
+ },
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ]
+ },
+ {
+ "aliasColors": {},
+ "bars": true,
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "fill": 0,
+ "grid": {
+ "threshold1": null,
+ "threshold1Color": "rgba(216, 200, 27, 0.27)",
+ "threshold2": null,
+ "threshold2Color": "rgba(234, 112, 112, 0.22)",
+ "thresholdLine": false
+ },
+ "id": 8,
+ "interval": "> 60s",
+ "legend": {
+ "alignAsTable": true,
+ "avg": false,
+ "current": false,
+ "hideEmpty": false,
+ "max": true,
+ "min": true,
+ "rightSide": false,
+ "show": true,
+ "total": true,
+ "values": true
+ },
+ "lines": false,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "connected",
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "span": 8,
+ "stack": true,
+ "steppedLine": false,
+ "targets": [
+ {
+ "alias": "2xx",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "count",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT sum(\"count\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_status\" = '2xx' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "count"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "sum"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_status",
+ "operator": "=",
+ "value": "2xx"
+ }
+ ]
+ },
+ {
+ "alias": "1xx",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "count",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT sum(\"count\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_status\" = '1xx' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "count"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "sum"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_status",
+ "operator": "=",
+ "value": "1xx"
+ }
+ ]
+ },
+ {
+ "alias": "3xx",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "count",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT sum(\"count\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_status\" = '3xx' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "C",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "count"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "sum"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_status",
+ "operator": "=",
+ "value": "3xx"
+ }
+ ]
+ },
+ {
+ "alias": "4xx",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "count",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT sum(\"count\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_status\" = '4xx' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "D",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "count"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "sum"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_status",
+ "operator": "=",
+ "value": "4xx"
+ }
+ ]
+ },
+ {
+ "alias": "5xx",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "count",
+ "groupBy": [
+ {
+ "interval": "auto",
+ "params": [
+ "auto"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "openstack_glance_http_response_times",
+ "policy": "default",
+ "query": "SELECT sum(\"count\") FROM \"openstack_glance_http_response_times\" WHERE \"hostname\" =~ /$server/ AND \"http_status\" = '5xx' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "E",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "count"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "sum"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/$server/"
+ },
+ {
+ "condition": "AND",
+ "key": "http_status",
+ "operator": "=",
+ "value": "5xx"
+ }
+ ]
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Number of HTTP responses on $server",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "show": true
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ]
+ }
+ ],
+ "showTitle": true,
+ "title": "Service Status"
+ },
+ {
+ "collapse": false,
+ "editable": true,
+ "height": "100px",
+ "panels": [
+ {
+ "content": "<br />\n<h3 align=\"center\"> Up </h3>",
+ "editable": true,
+ "error": false,
+ "id": 21,
+ "links": [],
+ "mode": "html",
+ "span": 2,
+ "style": {},
+ "title": "",
+ "type": "text"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 22,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "haproxy_backend_servers",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"haproxy_backend_servers\" WHERE \"environment_label\" =~ /^$environment$/ AND \"backend\" = 'glance_api' AND \"state\" = 'up' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "backend",
+ "value": "glance_api"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "up"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "API",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 23,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "haproxy_backend_servers",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"haproxy_backend_servers\" WHERE \"environment_label\" =~ /^$environment$/ AND \"backend\" = 'glance_registry_api' AND \"state\" = 'up' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "backend",
+ "value": "glance_registry_api"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "up"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "Registry",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "content": "",
+ "editable": true,
+ "error": false,
+ "id": 24,
+ "links": [],
+ "mode": "markdown",
+ "span": 6,
+ "style": {},
+ "title": "",
+ "type": "text"
+ },
+ {
+ "content": "<br />\n<h3 align=\"center\"> Down </h3>",
+ "editable": true,
+ "error": false,
+ "id": 25,
+ "links": [],
+ "mode": "html",
+ "span": 2,
+ "style": {},
+ "title": "",
+ "type": "text"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": true,
+ "colors": [
+ "rgba(255, 255, 255, 0.97)",
+ "rgba(255, 255, 255, 0.89)",
+ "rgba(245, 54, 54, 0.9)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 26,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "haproxy_backend_servers",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"haproxy_backend_servers\" WHERE \"environment_label\" =~ /^$environment$/ AND \"backend\" = 'glance_api' AND \"state\" = 'down' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "backend",
+ "value": "glance_api"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "down"
+ }
+ ]
+ }
+ ],
+ "thresholds": "0,1",
+ "title": "",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": true,
+ "colors": [
+ "rgba(255, 255, 255, 0.97)",
+ "rgba(255, 255, 255, 0.89)",
+ "rgba(245, 54, 54, 0.9)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 27,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "haproxy_backend_servers",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"haproxy_backend_servers\" WHERE \"environment_label\" =~ /^$environment$/ AND \"backend\" = 'glance_registry_api' AND \"state\" = 'down' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "backend",
+ "value": "glance_registry_api"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "down"
+ }
+ ]
+ }
+ ],
+ "thresholds": "0,1",
+ "title": "",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "content": "",
+ "editable": true,
+ "error": false,
+ "id": 28,
+ "links": [],
+ "mode": "markdown",
+ "span": 6,
+ "style": {},
+ "title": "",
+ "type": "text"
+ }
+ ],
+ "showTitle": true,
+ "title": "Glance services"
+ },
+ {
+ "collapse": false,
+ "editable": true,
+ "height": "250px",
+ "panels": [
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 1,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_images",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_images\" WHERE \"environment_label\" =~ /^$environment$/ AND \"visibility\" = 'public' AND \"state\" = 'active' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "visibility",
+ "value": "public"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "active"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "Public images",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 14,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_images",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_images\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'private' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "value": "private"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "Private images",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "datasource": null,
+ "decimals": 0,
+ "editable": true,
+ "error": false,
+ "fill": 0,
+ "grid": {
+ "threshold1": null,
+ "threshold1Color": "rgba(216, 200, 27, 0.27)",
+ "threshold2": null,
+ "threshold2Color": "rgba(234, 112, 112, 0.22)"
+ },
+ "id": 29,
+ "interval": "> 60s",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "connected",
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "span": 8,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "alias": "public",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "hide": false,
+ "measurement": "openstack_glance_images",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_images\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'public' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "value": "public"
+ }
+ ]
+ },
+ {
+ "alias": "private",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_images",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_images\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'private' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "operator": "=",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "operator": "=",
+ "value": "private"
+ }
+ ]
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Number of images",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "xaxis": {
+ "show": true
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ]
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "bytes",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 17,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_images_size",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_images_size\" WHERE \"environment_label\" =~ /^$environment$/ AND \"visibility\" = 'public' AND \"state\" = 'active' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "visibility",
+ "value": "public"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "active"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "bytes",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 18,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_images_size",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_images_size\" WHERE \"environment_label\" =~ /^$environment$/ AND \"visibility\" = 'private' AND \"state\" = 'active' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "visibility",
+ "value": "private"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "active"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "fill": 0,
+ "grid": {
+ "threshold1": null,
+ "threshold1Color": "rgba(216, 200, 27, 0.27)",
+ "threshold2": null,
+ "threshold2Color": "rgba(234, 112, 112, 0.22)"
+ },
+ "id": 30,
+ "interval": "> 60s",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "connected",
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "span": 8,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "alias": "public",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_images_size",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_images_size\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'public' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "value": "public"
+ }
+ ]
+ },
+ {
+ "alias": "private",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_images_size",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_images_size\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'private' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "value": "private"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Images size",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "xaxis": {
+ "show": true
+ },
+ "yaxes": [
+ {
+ "format": "bytes",
+ "label": "",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ]
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 15,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_snapshots",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_snapshots\" WHERE \"environment_label\" =~ /^$environment$/ AND \"visibility\" = 'public' AND \"state\" = 'active' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "visibility",
+ "value": "public"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "active"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "Public snapshots",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 16,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_snapshots",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_snapshots\" WHERE \"environment_label\" =~ /^$environment$/ AND \"visibility\" = 'private' AND \"state\" = 'active' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "visibility",
+ "value": "private"
+ },
+ {
+ "condition": "AND",
+ "key": "state",
+ "value": "active"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "Private snapshots",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "datasource": null,
+ "decimals": 0,
+ "editable": true,
+ "error": false,
+ "fill": 0,
+ "grid": {
+ "threshold1": null,
+ "threshold1Color": "rgba(216, 200, 27, 0.27)",
+ "threshold2": null,
+ "threshold2Color": "rgba(234, 112, 112, 0.22)"
+ },
+ "id": 31,
+ "interval": "> 60s",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "connected",
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "span": 8,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "alias": "public",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_snapshots",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_snapshots\" WHERE \"environment_label\" =~ /^$environment$/ AND \"visibility\" = 'public' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "visibility",
+ "value": "public"
+ }
+ ]
+ },
+ {
+ "alias": "private",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_snapshots",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_snapshots\" WHERE \"environment_label\" =~ /^$environment$/ AND \"visibility\" = 'private' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "visibility",
+ "value": "private"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Number of snapshots",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "xaxis": {
+ "show": true
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ]
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "bytes",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 19,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_snapshots_size",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_snapshots_size\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'public' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "value": "public"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "format": "bytes",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 20,
+ "interval": "> 60s",
+ "links": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "targets": [
+ {
+ "column": "value",
+ "dsType": "influxdb",
+ "fill": "",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "null"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_snapshots_size",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_snapshots_size\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'private' AND $timeFilter GROUP BY time($interval) fill(null)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "value": "private"
+ }
+ ]
+ }
+ ],
+ "thresholds": "",
+ "title": "",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "0",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "datasource": null,
+ "editable": true,
+ "error": false,
+ "fill": 0,
+ "grid": {
+ "threshold1": null,
+ "threshold1Color": "rgba(216, 200, 27, 0.27)",
+ "threshold2": null,
+ "threshold2Color": "rgba(234, 112, 112, 0.22)"
+ },
+ "id": 32,
+ "interval": "> 60s",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "connected",
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "span": 8,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "alias": "public",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_snapshots_size",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_snapshots_size\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'public' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "value": "public"
+ }
+ ]
+ },
+ {
+ "alias": "private",
+ "column": "value",
+ "dsType": "influxdb",
+ "function": "last",
+ "groupBy": [
+ {
+ "params": [
+ "$interval"
+ ],
+ "type": "time"
+ },
+ {
+ "params": [
+ "0"
+ ],
+ "type": "fill"
+ }
+ ],
+ "groupByTags": [],
+ "measurement": "openstack_glance_snapshots_size",
+ "policy": "default",
+ "query": "SELECT last(\"value\") FROM \"openstack_glance_snapshots_size\" WHERE \"environment_label\" =~ /^$environment$/ AND \"state\" = 'active' AND \"visibility\" = 'private' AND $timeFilter GROUP BY time($interval) fill(0)",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "environment_label",
+ "operator": "=",
+ "value": "$environment"
+ },
+ {
+ "key": "state",
+ "value": "active"
+ },
+ {
+ "condition": "AND",
+ "key": "visibility",
+ "value": "private"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Snapshots size",
+ "tooltip": {
+ "msResolution": false,
+ "shared": true,
+ "value_type": "cumulative"
+ },
+ "type": "graph",
+ "xaxis": {
+ "show": true
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": 0,
+ "show": true
+ },
+ {
+ "format": "short",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ]
+ }
+ ],
+ "showTitle": true,
+ "title": "Resources"
+ }
+ ],
+ "schemaVersion": 12,
+ "sharedCrosshair": true,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "enable": true,
+ "list": [
+ {
+ "allFormat": "regex values",
+ "current": {},
+ "datasource": null,
+ "hide": 0,
+ "includeAll": false,
+ "name": "environment",
+ "options": [],
+ "query": "show tag values from cpu_idle with key = environment_label",
+ "refresh": 1,
+ "refresh_on_load": true,
+ "regex": "",
+ "type": "query"
+ },
+ {
+ "allFormat": "regex values",
+ "current": {},
+ "datasource": null,
+ "hide": 0,
+ "includeAll": true,
+ "name": "server",
+ "options": [],
+ "query": "show tag values from openstack_glance_http_response_times with key = hostname where environment_label =~ /^$environment$/ ",
+ "refresh": 1,
+ "refresh_on_load": true,
+ "regex": "",
+ "type": "query"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-1h",
+ "to": "now"
+ },
+ "timepicker": {
+ "collapse": false,
+ "enable": true,
+ "notice": false,
+ "now": true,
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ],
+ "status": "Stable",
+ "time_options": [
+ "5m",
+ "15m",
+ "1h",
+ "6h",
+ "12h",
+ "24h",
+ "2d",
+ "7d",
+ "30d"
+ ],
+ "type": "timepicker"
+ },
+ "timezone": "browser",
+ "title": "Glance",
+ "version": 2
+}
diff --git a/glance/files/heka.toml b/glance/files/heka.toml
index 8affda6..e43a84b 100644
--- a/glance/files/heka.toml
+++ b/glance/files/heka.toml
@@ -1,15 +1,13 @@
-{%- if pillar.glance.server is defined %}
[logstreamer_glance]
type = "LogstreamerInput"
log_directory = "/var/log/glance"
-file_match = '(?P<Service>.+)\.log\.?(?P<Seq>\d*)$'
+file_match = '(?P<Service>.+)\.log\.?(?P<Index>\d*)?(.gz)?'
differentiator = ['glance','_','Service']
priority = ["^Index"]
decoder = "openstack"
+oldest_duration = "168h"
[openstack]
type = "SandboxDecoder"
filename = "lua_modules/decoders/openstack.lua"
module_directory = "/usr/share/heka/lua_modules;/usr/share/heka/lua_modules/common"
-
-{% endif %}
diff --git a/glance/files/kilo/glance-api.conf.Debian b/glance/files/kilo/glance-api.conf.Debian
index 34967c1..54a91b0 100644
--- a/glance/files/kilo/glance-api.conf.Debian
+++ b/glance/files/kilo/glance-api.conf.Debian
@@ -246,8 +246,17 @@
notification_driver = messagingv2
# Configuration options if sending notifications via rabbitmq (these are
# the defaults)
+
+{%- if server.message_queue.members is defined %}
+rabbit_hosts = {% for member in server.message_queue.members -%}
+ {{ member.host }}:{{ member.get('port', 5672) }}
+ {%- if not loop.last -%},{%- endif -%}
+ {%- endfor -%}
+{%- else %}
rabbit_host = {{ server.message_queue.host }}
rabbit_port = {{ server.message_queue.port }}
+{%- endif %}
+
rabbit_use_ssl = false
rabbit_userid = {{ server.message_queue.user }}
rabbit_password = {{ server.message_queue.password }}
diff --git a/glance/files/liberty/glance-api-paste.ini b/glance/files/liberty/glance-api-paste.ini
index 5b0e6b4..c809673 100644
--- a/glance/files/liberty/glance-api-paste.ini
+++ b/glance/files/liberty/glance-api-paste.ini
@@ -1,38 +1,39 @@
+{%- from "glance/map.jinja" import server with context %}
# Use this pipeline for no auth or image caching - DEFAULT
[pipeline:glance-api]
-pipeline = healthcheck versionnegotiation osprofiler unauthenticated-context rootapp
+pipeline = healthcheck versionnegotiation osprofiler unauthenticated-context {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for image caching and no auth
[pipeline:glance-api-caching]
-pipeline = healthcheck versionnegotiation osprofiler unauthenticated-context cache rootapp
+pipeline = healthcheck versionnegotiation osprofiler unauthenticated-context cache {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for caching w/ management interface but no auth
[pipeline:glance-api-cachemanagement]
-pipeline = healthcheck versionnegotiation osprofiler unauthenticated-context cache cachemanage rootapp
+pipeline = healthcheck versionnegotiation osprofiler unauthenticated-context cache cachemanage {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for keystone auth
[pipeline:glance-api-keystone]
-pipeline = healthcheck versionnegotiation osprofiler authtoken context rootapp
+pipeline = healthcheck versionnegotiation osprofiler authtoken context {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for keystone auth with image caching
[pipeline:glance-api-keystone+caching]
-pipeline = healthcheck versionnegotiation osprofiler authtoken context cache rootapp
+pipeline = healthcheck versionnegotiation osprofiler authtoken context cache {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for keystone auth with caching and cache management
[pipeline:glance-api-keystone+cachemanagement]
-pipeline = healthcheck versionnegotiation osprofiler authtoken context cache cachemanage rootapp
+pipeline = healthcheck versionnegotiation osprofiler authtoken context cache cachemanage {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for authZ only. This means that the registry will treat a
# user as authenticated without making requests to keystone to reauthenticate
# the user.
[pipeline:glance-api-trusted-auth]
-pipeline = healthcheck versionnegotiation osprofiler context rootapp
+pipeline = healthcheck versionnegotiation osprofiler context {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for authZ only. This means that the registry will treat a
# user as authenticated without making requests to keystone to reauthenticate
# the user and uses cache management
[pipeline:glance-api-trusted-auth+cachemanagement]
-pipeline = healthcheck versionnegotiation osprofiler context cache cachemanage rootapp
+pipeline = healthcheck versionnegotiation osprofiler context cache cachemanage {% if server.audit.enabled %}audit {% endif %}rootapp
[composite:rootapp]
paste.composite_factory = glance.api:root_app_factory
@@ -84,3 +85,9 @@
paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
hmac_keys = SECRET_KEY
enabled = yes
+
+{%- if server.audit.enabled %}
+[filter:audit]
+paste.filter_factory = {{ server.get("audit", {}).get("filter_factory", "keystonemiddleware.audit:filter_factory") }}
+audit_map_file = {{ server.get("audit", {}).get("map_file", "/etc/pycadf/glance_api_audit_map.conf") }}
+{%- endif %}
diff --git a/glance/files/liberty/glance-api.conf.Debian b/glance/files/liberty/glance-api.conf.Debian
index 3acf3f3..6dad168 100644
--- a/glance/files/liberty/glance-api.conf.Debian
+++ b/glance/files/liberty/glance-api.conf.Debian
@@ -1,4 +1,5 @@
{%- from "glance/map.jinja" import server with context %}
+{% set storage_engines = server.storage.engine.split(',') %}
[DEFAULT]
# Show more verbose log output (sets INFO log level output)
#verbose = False
@@ -246,8 +247,17 @@
notification_driver = messagingv2
# Configuration options if sending notifications via rabbitmq (these are
# the defaults)
+#
+{%- if server.message_queue.members is defined %}
+rabbit_hosts = {% for member in server.message_queue.members -%}
+ {{ member.host }}:{{ member.get('port', 5672) }}
+ {%- if not loop.last -%},{%- endif -%}
+ {%- endfor -%}
+{%- else %}
rabbit_host = {{ server.message_queue.host }}
rabbit_port = {{ server.message_queue.port }}
+{%- endif %}
+
rabbit_use_ssl = false
rabbit_userid = {{ server.message_queue.user }}
rabbit_password = {{ server.message_queue.password }}
@@ -568,12 +578,12 @@
# by the stores option.
# Deprecated group/name - [DEFAULT]/default_store
# Default: 'file'
-{%- if server.storage.engine == 'file' %}
+{%- if 'file' in storage_engines %}
default_store = file
stores = glance.store.filesystem.Store,
glance.store.http.Store
{%- else %}
-default_store = {{ server.storage.engine }}
+default_store = {{ storage_engines[0] }}
stores = {{ server.storage.engine }}
{%- endif %}
# ============ Filesystem Store Options ========================
@@ -756,7 +766,7 @@
# ============ RBD Store Options =============================
-{%- if server.storage.engine == 'rbd' %}
+{%- if 'rbd' in storage_engines %}
# ============ RBD Store Options =============================
# Ceph configuration file path
diff --git a/glance/files/mitaka/glance-api-paste.ini b/glance/files/mitaka/glance-api-paste.ini
index 9efd19f..d2e33c0 100644
--- a/glance/files/mitaka/glance-api-paste.ini
+++ b/glance/files/mitaka/glance-api-paste.ini
@@ -1,38 +1,39 @@
+{%- from "glance/map.jinja" import server with context %}
# Use this pipeline for no auth or image caching - DEFAULT
[pipeline:glance-api]
-pipeline = cors healthcheck versionnegotiation osprofiler unauthenticated-context rootapp
+pipeline = cors healthcheck versionnegotiation osprofiler unauthenticated-context {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for image caching and no auth
[pipeline:glance-api-caching]
-pipeline = cors healthcheck versionnegotiation osprofiler unauthenticated-context cache rootapp
+pipeline = cors healthcheck versionnegotiation osprofiler unauthenticated-context cache {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for caching w/ management interface but no auth
[pipeline:glance-api-cachemanagement]
-pipeline = cors healthcheck versionnegotiation osprofiler unauthenticated-context cache cachemanage rootapp
+pipeline = cors healthcheck versionnegotiation osprofiler unauthenticated-context cache cachemanage {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for keystone auth
[pipeline:glance-api-keystone]
-pipeline = cors healthcheck versionnegotiation osprofiler authtoken context rootapp
+pipeline = cors healthcheck versionnegotiation osprofiler authtoken context {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for keystone auth with image caching
[pipeline:glance-api-keystone+caching]
-pipeline = cors healthcheck versionnegotiation osprofiler authtoken context cache rootapp
+pipeline = cors healthcheck versionnegotiation osprofiler authtoken context cache {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for keystone auth with caching and cache management
[pipeline:glance-api-keystone+cachemanagement]
-pipeline = cors healthcheck versionnegotiation osprofiler authtoken context cache cachemanage rootapp
+pipeline = cors healthcheck versionnegotiation osprofiler authtoken context cache cachemanage {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for authZ only. This means that the registry will treat a
# user as authenticated without making requests to keystone to reauthenticate
# the user.
[pipeline:glance-api-trusted-auth]
-pipeline = cors healthcheck versionnegotiation osprofiler context rootapp
+pipeline = cors healthcheck versionnegotiation osprofiler context {% if server.audit.enabled %}audit {% endif %}rootapp
# Use this pipeline for authZ only. This means that the registry will treat a
# user as authenticated without making requests to keystone to reauthenticate
# the user and uses cache management
[pipeline:glance-api-trusted-auth+cachemanagement]
-pipeline = cors healthcheck versionnegotiation osprofiler context cache cachemanage rootapp
+pipeline = cors healthcheck versionnegotiation osprofiler context cache cachemanage {% if server.audit.enabled %}audit {% endif %}rootapp
[composite:rootapp]
paste.composite_factory = glance.api:root_app_factory
@@ -81,6 +82,12 @@
hmac_keys = SECRET_KEY #DEPRECATED
enabled = yes #DEPRECATED
+{%- if server.audit.enabled %}
+[filter:audit]
+paste.filter_factory = {{ server.get("audit", {}).get("filter_factory", "keystonemiddleware.audit:filter_factory") }}
+audit_map_file = {{ server.get("audit", {}).get("map_file", "/etc/pycadf/glance_api_audit_map.conf") }}
+{%- endif %}
+
[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = glance
diff --git a/glance/files/mitaka/glance-api.conf.Debian b/glance/files/mitaka/glance-api.conf.Debian
index ccf27b8..d0055a4 100644
--- a/glance/files/mitaka/glance-api.conf.Debian
+++ b/glance/files/mitaka/glance-api.conf.Debian
@@ -1,4 +1,5 @@
{%- from "glance/map.jinja" import server with context %}
+{% set storage_engines = server.storage.engine.split(',') %}
[DEFAULT]
#
@@ -761,11 +762,11 @@
# List of stores enabled. Valid stores are: cinder, file, http, rbd,
# sheepdog, swift, s3, vsphere (list value)
#stores = file,http
-{%- if server.storage.engine == 'file' %}
+{%- if 'file' in storage_engines %}
default_store = file
stores = file,http
{%- else %}
-default_store = {{ server.storage.engine }}
+default_store = {{ storage_engines[0] }}
stores = {{ server.storage.engine }}
{%- endif %}
# Default scheme to use to store image data. The scheme must be
@@ -913,7 +914,7 @@
# The config file that has the swift account(s)configs. (string value)
#swift_store_config_file = <None>
-{%- if server.storage.engine == 'rbd' %}
+{%- if 'rbd' in storage_engines %}
# RADOS images will be chunked into objects of this size (in
# megabytes). For best performance, this should be a power of two.
# (integer value)
@@ -1510,44 +1511,25 @@
# Allowed values: round-robin, shuffle
#kombu_failover_strategy = round-robin
-# The RabbitMQ broker address where a single node is used. (string
-# value)
-# Deprecated group/name - [DEFAULT]/rabbit_host
-#rabbit_host = localhost
+{%- if server.message_queue.members is defined %}
+rabbit_hosts = {% for member in server.message_queue.members -%}
+ {{ member.host }}:{{ member.get('port', 5672) }}
+ {%- if not loop.last -%},{%- endif -%}
+ {%- endfor -%}
+{%- else %}
rabbit_host = {{ server.message_queue.host }}
-
-# The RabbitMQ broker port where a single node is used. (port value)
-# Minimum value: 0
-# Maximum value: 65535
-# Deprecated group/name - [DEFAULT]/rabbit_port
-#rabbit_port = 5672
rabbit_port = {{ server.message_queue.port }}
-
-# RabbitMQ HA cluster host:port pairs. (list value)
-# Deprecated group/name - [DEFAULT]/rabbit_hosts
-#rabbit_hosts = $rabbit_host:$rabbit_port
+{%- endif %}
# Connect over SSL for RabbitMQ. (boolean value)
# Deprecated group/name - [DEFAULT]/rabbit_use_ssl
#rabbit_use_ssl = false
-
-# The RabbitMQ userid. (string value)
-# Deprecated group/name - [DEFAULT]/rabbit_userid
-#rabbit_userid = guest
rabbit_userid = {{ server.message_queue.user }}
-
-# The RabbitMQ password. (string value)
-# Deprecated group/name - [DEFAULT]/rabbit_password
-#rabbit_password = guest
rabbit_password = {{ server.message_queue.password }}
# The RabbitMQ login method. (string value)
# Deprecated group/name - [DEFAULT]/rabbit_login_method
#rabbit_login_method = AMQPLAIN
-
-# The RabbitMQ virtual host. (string value)
-# Deprecated group/name - [DEFAULT]/rabbit_virtual_host
-#rabbit_virtual_host = /
rabbit_virtual_host = {{ server.message_queue.virtual_host }}
# How frequently to retry connecting with RabbitMQ. (integer value)
diff --git a/glance/files/mitaka/glance-registry-paste.ini b/glance/files/mitaka/glance-registry-paste.ini
new file mode 100644
index 0000000..492dbc6
--- /dev/null
+++ b/glance/files/mitaka/glance-registry-paste.ini
@@ -0,0 +1,35 @@
+# Use this pipeline for no auth - DEFAULT
+[pipeline:glance-registry]
+pipeline = healthcheck osprofiler unauthenticated-context registryapp
+
+# Use this pipeline for keystone auth
+[pipeline:glance-registry-keystone]
+pipeline = healthcheck osprofiler authtoken context registryapp
+
+# Use this pipeline for authZ only. This means that the registry will treat a
+# user as authenticated without making requests to keystone to reauthenticate
+# the user.
+[pipeline:glance-registry-trusted-auth]
+pipeline = healthcheck osprofiler context registryapp
+
+[app:registryapp]
+paste.app_factory = glance.registry.api:API.factory
+
+[filter:healthcheck]
+paste.filter_factory = oslo_middleware:Healthcheck.factory
+backends = disable_by_file
+disable_by_file_path = /etc/glance/healthcheck_disable
+
+[filter:context]
+paste.filter_factory = glance.api.middleware.context:ContextMiddleware.factory
+
+[filter:unauthenticated-context]
+paste.filter_factory = glance.api.middleware.context:UnauthenticatedContextMiddleware.factory
+
+[filter:authtoken]
+paste.filter_factory = keystonemiddleware.auth_token:filter_factory
+
+[filter:osprofiler]
+paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
+hmac_keys = SECRET_KEY #DEPRECATED
+enabled = yes #DEPRECATED
diff --git a/glance/files/mitaka/policy.json b/glance/files/mitaka/policy.json
new file mode 100644
index 0000000..f49bc08
--- /dev/null
+++ b/glance/files/mitaka/policy.json
@@ -0,0 +1,61 @@
+{
+ "context_is_admin": "role:admin",
+ "default": "",
+
+ "add_image": "",
+ "delete_image": "",
+ "get_image": "",
+ "get_images": "",
+ "modify_image": "",
+ "publicize_image": "role:admin",
+ "copy_from": "",
+
+ "download_image": "",
+ "upload_image": "",
+
+ "delete_image_location": "",
+ "get_image_location": "",
+ "set_image_location": "",
+
+ "add_member": "",
+ "delete_member": "",
+ "get_member": "",
+ "get_members": "",
+ "modify_member": "",
+
+ "manage_image_cache": "role:admin",
+
+ "get_task": "role:admin",
+ "get_tasks": "role:admin",
+ "add_task": "role:admin",
+ "modify_task": "role:admin",
+
+ "deactivate": "",
+ "reactivate": "",
+
+ "get_metadef_namespace": "",
+ "get_metadef_namespaces":"",
+ "modify_metadef_namespace":"",
+ "add_metadef_namespace":"",
+
+ "get_metadef_object":"",
+ "get_metadef_objects":"",
+ "modify_metadef_object":"",
+ "add_metadef_object":"",
+
+ "list_metadef_resource_types":"",
+ "get_metadef_resource_type":"",
+ "add_metadef_resource_type_association":"",
+
+ "get_metadef_property":"",
+ "get_metadef_properties":"",
+ "modify_metadef_property":"",
+ "add_metadef_property":"",
+
+ "get_metadef_tag":"",
+ "get_metadef_tags":"",
+ "modify_metadef_tag":"",
+ "add_metadef_tag":"",
+ "add_metadef_tags":""
+
+}
diff --git a/glance/map.jinja b/glance/map.jinja
index 73a3799..a79bade 100644
--- a/glance/map.jinja
+++ b/glance/map.jinja
@@ -1,13 +1,19 @@
{% set server = salt['grains.filter_by']({
'Debian': {
- 'pkgs': ['glance', 'glance-api', 'glance-registry', 'glance-common', 'python-glance', 'python-glance-store', 'python-glanceclient'],
+ 'pkgs': ['glance', 'glance-api', 'glance-registry', 'glance-common', 'python-glance', 'python-glance-store', 'python-glanceclient', 'gettext-base', 'python-memcache', 'python-pycadf'],
'services': ['glance-api', 'glance-registry'],
'notification': False,
+ 'audit': {
+ 'enabled': false
+ }
},
'RedHat': {
- 'pkgs': ['openstack-glance', 'python-glanceclient'],
+ 'pkgs': ['openstack-glance', 'python-glanceclient','python-pycadf'],
'services': ['openstack-glance-api', 'openstack-glance-registry'],
'notification': False,
+ 'audit': {
+ 'enabled': false
+ }
},
-}, merge=salt['pillar.get']('glance:server')) %}
+}, merge=pillar.glance.get('server', {})) %}
diff --git a/glance/meta/collectd.yml b/glance/meta/collectd.yml
new file mode 100644
index 0000000..edcd624
--- /dev/null
+++ b/glance/meta/collectd.yml
@@ -0,0 +1,18 @@
+{%- from "glance/map.jinja" import server with context %}
+{%- if server.get('enabled', False) %}
+local_plugin:
+ collectd_check_local_endpoint:
+ endpoint:
+ glance-api:
+ expected_code: 300
+ url: "http://{{ server.bind.address|replace('0.0.0.0', '127.0.0.1') }}:{{ server.bind.port }}/"
+
+remote_plugin:
+ openstack_glance:
+ plugin: python
+ template: glance/files/collectd_openstack_glance.conf
+ url: "http://{{ server.identity.host }}:{{ server.identity.port }}/v{% if server.identity.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
+ username: {{ server.identity.user }}
+ password: {{ server.identity.password }}
+ tenant: {{ server.identity.tenant }}
+{%- endif %}
diff --git a/glance/meta/config.yml b/glance/meta/config.yml
new file mode 100644
index 0000000..e3d054a
--- /dev/null
+++ b/glance/meta/config.yml
@@ -0,0 +1,25 @@
+config:
+ {%- if pillar.glance.server is defined %}
+ {%- from "glance/map.jinja" import server with context %}
+ glance-api.conf:
+ source: "salt://glance/files/{{ server.version }}/glance-api.conf.{{ grains.os_family|default('Debian') }}"
+ template: jinja
+ glance-cache.conf:
+ source: "salt://glance/files/{{ server.version }}/glance-cache.conf.{{ grains.os_family|default('Debian') }}"
+ template: jinja
+ glance-registry.conf:
+ source: "salt://glance/files/{{ server.version }}/glance-registry.conf.{{ grains.os_family|default('Debian') }}"
+ template: jinja
+ glance-scrubber.conf:
+ source: "salt://glance/files/{{ server.version }}/glance-scrubber.conf.{{ grains.os_family|default('Debian') }}"
+ template: jinja
+ glance-api-paste.ini:
+ source: "salt://glance/files/{{ server.version }}/glance-api-paste.ini"
+ template: jinja
+ glance-registry-paste.ini:
+ source: "salt://glance/files/{{ server.version }}/glance-registry-paste.ini"
+ template: jinja
+ policy.json:
+ source: "salt://glance/files/{{ server.version }}/policy.json"
+ template: jinja
+ {%- endif %}
\ No newline at end of file
diff --git a/glance/meta/grafana.yml b/glance/meta/grafana.yml
new file mode 100644
index 0000000..a4aea19
--- /dev/null
+++ b/glance/meta/grafana.yml
@@ -0,0 +1,4 @@
+dashboard:
+ glance:
+ format: json
+ template: glance/files/grafana_dashboards/glance_influxdb.json
diff --git a/glance/meta/heka.yml b/glance/meta/heka.yml
new file mode 100644
index 0000000..dd46e89
--- /dev/null
+++ b/glance/meta/heka.yml
@@ -0,0 +1,128 @@
+log_collector:
+ decoder:
+ glance:
+ engine: sandbox
+ module_file: /usr/share/lma_collector/decoders/openstack_log.lua
+ module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
+ adjust_timezone: true
+ splitter:
+ glance:
+ engine: token
+ delimiter: '\n'
+ input:
+ glance_log:
+ engine: logstreamer
+ log_directory: "/var/log"
+ file_match: 'glance/(?P<Service>.+)\.log\.?(?P<Seq>\d*)$'
+ differentiator: ['glance', '_', 'Service']
+ priority: ["^Seq"]
+ decoder: "glance_decoder"
+ splitter: "glance_splitter"
+metric_collector:
+ trigger:
+ glance_logs_error:
+ description: 'Too many errors have been detected in Glance logs.'
+ severity: warning
+ no_data_policy: okay
+ rules:
+ - metric: log_messages
+ field:
+ service: glance
+ level: error
+ relational_operator: '>'
+ threshold: 0.1
+ window: 70
+ periods: 0
+ function: max
+ glance_api_local_endpoint:
+ description: 'Glance API is locally down.'
+ severity: down
+ rules:
+ - metric: openstack_check_local_api
+ field:
+ service: glance-api
+ relational_operator: '=='
+ threshold: 0
+ window: 60
+ periods: 0
+ function: last
+ alarm:
+ glance_logs:
+ alerting: enabled
+ triggers:
+ - glance_logs_error
+ dimension:
+ service: glance-logs
+ glance_api_endpoint:
+ alerting: enabled
+ triggers:
+ - glance_api_local_endpoint
+ dimension:
+ service: glance-api-endpoint
+remote_collector:
+ trigger:
+ glance_api_check_failed:
+ description: 'Endpoint check for glance-api is failed'
+ severity: down
+ rules:
+ - metric: openstack_check_api
+ field:
+ service: glance-api
+ relational_operator: '=='
+ threshold: 0
+ window: 60
+ periods: 0
+ function: last
+ alarm:
+ glance_api_check:
+ alerting: enabled
+ triggers:
+ - glance_api_check_failed
+ dimension:
+ service: glance-api-check
+aggregator:
+ alarm_cluster:
+ glance_logs:
+ policy: status_of_members
+ alerting: enabled
+ group_by: hostname
+ match:
+ service: glance-logs
+ members:
+ - glance_logs
+ dimension:
+ service: glance
+ nagios_host: 01-service-clusters
+ glance_api_endpoint:
+ policy: availability_of_members
+ alerting: enabled
+ group_by: hostname
+ match:
+ service: glance-api-endpoint
+ members:
+ - glance_api_endpoint
+ dimension:
+ service: glance
+ nagios_host: 01-service-clusters
+ glance_api_check:
+ policy: highest_severity
+ alerting: enabled
+ match:
+ service: glance-api-check
+ members:
+ - glance_api_check
+ dimension:
+ service: glance
+ nagios_host: 01-service-clusters
+ glance:
+ policy: highest_severity
+ alerting: enabled_with_notification
+ match:
+ service: glance
+ members:
+ - glance_logs
+ - glance_api_endpoint
+ - glance_api_check
+ dimension:
+ cluster_name: glance
+ nagios_host: 00-top-clusters
diff --git a/glance/meta/salt.yml b/glance/meta/salt.yml
new file mode 100644
index 0000000..ae564cf
--- /dev/null
+++ b/glance/meta/salt.yml
@@ -0,0 +1,7 @@
+orchestrate:
+ server:
+ priority: 530
+ batch: 1
+ require:
+ - salt: keystone.server
+
diff --git a/glance/meta/sensu.yml b/glance/meta/sensu.yml
index e796266..7cf26dc 100644
--- a/glance/meta/sensu.yml
+++ b/glance/meta/sensu.yml
@@ -1,3 +1,4 @@
+{%- from "glance/map.jinja" import server with context %}
check:
local_glance_api_proc:
command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C glance-api -u glance -c 1:20"
@@ -12,20 +13,20 @@
subscribers:
- local-glance-server
remote_openstack_glance_api:
- command: "PATH=$PATH:/usr/local/bin oschecks-check_glance_api --os_auth_url='http://:::openstack.host::::5000/v2.0' --os_username=:::openstack.user::: --os_password=':::openstack.password:::' --os_tenant_name=:::openstack.tenant:::"
+ command: "PATH=$PATH:/usr/local/bin oschecks-check_glance_api --os_auth_url='http://:::openstack.host::::5000/v2.0' --os_username=:::openstack.user::: --os_password=':::openstack.password:::' --os_tenant_name=:::openstack.tenant::: --os-region-name {{ server.identity.region }}"
interval: 60
occurrences: 1
subscribers:
- remote-network
remote_openstack_glance_image_exists:
- command: "PATH=$PATH:/usr/local/bin oschecks-check_glance_image_exists --os_auth_url='http://:::openstack.host::::5000/v2.0' --os_username=:::openstack.user::: --os_password=':::openstack.password:::' --os_tenant_name=:::openstack.tenant:::"
+ command: "PATH=$PATH:/usr/local/bin oschecks-check_glance_image_exists --os_auth_url='http://:::openstack.host::::5000/v2.0' --os_username=:::openstack.user::: --os_password=':::openstack.password:::' --os_tenant_name=:::openstack.tenant::: --os-region-name {{ server.identity.region }}"
interval: 120
occurrences: 1
subscribers:
- remote-network
remote_openstack_glance_upload:
- command: "PATH=$PATH:/usr/local/bin oschecks-check_glance_upload --os_auth_url='http://:::openstack.host::::5000/v2.0' --os_username=:::openstack.user::: --os_password=':::openstack.password:::' --os_tenant_name=:::openstack.tenant:::"
+ command: "PATH=$PATH:/usr/local/bin oschecks-check_glance_upload --os_auth_url='http://:::openstack.host::::5000/v2.0' --os_username=:::openstack.user::: --os_password=':::openstack.password:::' --os_tenant_name=:::openstack.tenant::: --os-region-name {{ server.identity.region }}"
interval: 300
occurrences: 1
subscribers:
- - remote-network
\ No newline at end of file
+ - remote-network
diff --git a/glance/server.sls b/glance/server.sls
index 75d240b..bc02a54 100644
--- a/glance/server.sls
+++ b/glance/server.sls
@@ -61,8 +61,8 @@
- template: jinja
- require:
- pkg: glance_packages
- - watch_in:
- - service: glance_services
+
+{%- if not grains.get('noservices', False) %}
glance_services:
service.running:
@@ -71,6 +71,7 @@
- watch:
- file: /etc/glance/glance-api.conf
- file: /etc/glance/glance-registry.conf
+ - file: /etc/glance/glance-api-paste.ini
glance_install_database:
cmd.run:
@@ -78,14 +79,26 @@
- require:
- service: glance_services
-/srv/glance:
- file.directory:
- - user: root
- - group: root
+{%- endif %}
+
+{%- if grains.get('virtual_subtype', None) == "Docker" %}
+
+glance_entrypoint:
+ file.managed:
+ - name: /entrypoint.sh
+ - template: jinja
+ - source: salt://glance/files/entrypoint.sh
- mode: 755
- - makedirs: true
+
+{%- endif %}
+
+/var/lib/glance/images:
+ file.directory:
+ - mode: 755
+ - user: glance
+ - group: glance
- require:
- - cmd: glance_install_database
+ - pkg: glance_packages
{%- for image in server.get('images', []) %}
diff --git a/metadata/service/control/cluster.yml b/metadata/service/control/cluster.yml
index f27ed77..463a426 100644
--- a/metadata/service/control/cluster.yml
+++ b/metadata/service/control/cluster.yml
@@ -29,6 +29,7 @@
port: 35357
user: glance
password: ${_param:keystone_glance_password}
+ region: RegionOne
tenant: service
message_queue:
engine: rabbitmq
@@ -37,7 +38,6 @@
user: openstack
password: ${_param:rabbitmq_openstack_password}
virtual_host: '/openstack'
- ha_queues: true
storage:
engine: file
cache:
diff --git a/metadata/service/control/container.yml b/metadata/service/control/container.yml
new file mode 100644
index 0000000..f8d0f98
--- /dev/null
+++ b/metadata/service/control/container.yml
@@ -0,0 +1,45 @@
+parameters:
+ kubernetes:
+ control:
+ configmap:
+ glance-server:
+ grains:
+ os_family: Debian
+ pillar:
+ glance:
+ server:
+ enabled: true
+ version: ${_param:glance_version}
+ workers: 8
+ database:
+ engine: mysql
+ host: ${_param:mysql_service_host}
+ port: 3306
+ name: glance
+ user: glance
+ password: ${_param:mysql_glance_password}
+ registry:
+ host: 0.0.0.0
+ port: 9191
+ bind:
+ address: 0.0.0.0
+ port: 9292
+ identity:
+ engine: keystone
+ host: ${_param:keystone_service_host}
+ port: 35357
+ user: glance
+ password: ${_param:keystone_glance_password}
+ region: RegionOne
+ tenant: service
+ message_queue:
+ engine: rabbitmq
+ host: ${_param:rabbitmq_service_host}
+ port: 5672
+ user: openstack
+ password: ${_param:rabbitmq_openstack_password}
+ virtual_host: '/openstack'
+ storage:
+ engine: file
+ cache:
+ engine: memcached
\ No newline at end of file
diff --git a/metadata/service/control/single.yml b/metadata/service/control/single.yml
index af1dc11..2f23a6b 100644
--- a/metadata/service/control/single.yml
+++ b/metadata/service/control/single.yml
@@ -27,6 +27,7 @@
port: 35357
user: glance
password: ${_param:keystone_glance_password}
+ region: RegionOne
tenant: service
message_queue:
engine: rabbitmq
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 260ce7e..06f1456 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -2,10 +2,14 @@
glance:
_support:
collectd:
- enabled: false
+ enabled: true
heka:
enabled: true
sensu:
enabled: true
sphinx:
enabled: true
+ config:
+ enabled: true
+ grafana:
+ enabled: true
diff --git a/tests/pillar/cluster.sls b/tests/pillar/cluster.sls
index 3e0e665..ec8f989 100644
--- a/tests/pillar/cluster.sls
+++ b/tests/pillar/cluster.sls
@@ -24,14 +24,19 @@
port: 35357
user: glance
password: password
+ region: RegionOne
tenant: service
message_queue:
engine: rabbitmq
- host: 127.0.0.1
- port: 5672
+ members:
+ - host: 127.0.0.1
+ - host: 127.0.1.1
+ - host: 127.0.2.1
user: openstack
password: password
virtual_host: '/openstack'
- ha_queues: true
storage:
engine: file
+ audit:
+ filter_factory: 'keystonemiddleware.audit:filter_factory'
+ map_file: '/etc/pycadf/glance_api_audit_map.conf'
diff --git a/tests/pillar/single.sls b/tests/pillar/single.sls
index 7512001..89dd253 100644
--- a/tests/pillar/single.sls
+++ b/tests/pillar/single.sls
@@ -22,6 +22,7 @@
port: 35357
user: glance
password: password
+ region: RegionOne
tenant: service
message_queue:
engine: rabbitmq
diff --git a/tests/pillar/single_ceph.sls b/tests/pillar/single_ceph.sls
index e4e9791..5e28763 100644
--- a/tests/pillar/single_ceph.sls
+++ b/tests/pillar/single_ceph.sls
@@ -21,6 +21,7 @@
port: 35357
user: glance
password: password
+ region: RegionOne
tenant: service
message_queue:
engine: rabbitmq
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 3f42101..6710a50 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -64,6 +64,7 @@
file_client: local
cachedir: ${SALT_CACHE_DIR}
verify_env: False
+minion_id_caching: False
file_roots:
base: