Filter Gnocchi traffic optionally
When using Swift storage for Gnocchi we want to add a filter to the Ceilometer middleware for Swift to exclude reporting traffic caused by Gnocchi storing data into Swift to avoid feedback-loops. This is typically done by isolating the Gnocchi in a dedicated Project in Keystone. The best place to filter this traffic is in the middleware as opposed to filtering in the Ceilometer Collector. Related-To: I67b5bff394ad35cf95d10ba32d602954799d7348 Change-Id: If20248494d4e6c127db4ffdf77ae43482f64fe58
This commit is contained in:
parent
750ccaa9e8
commit
1d55c377b8
@ -13,8 +13,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Enable/Disable Ceilometer
|
||||
# Enable/Disable Telemetry projects
|
||||
swift_ceilometer_enabled: False
|
||||
swift_gnocchi_enabled: False
|
||||
|
||||
## Verbosity Options
|
||||
debug: False
|
||||
|
@ -168,3 +168,31 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
||||
# KNOWN ISSUE(stevelle) Never fail. Swift playbook runs before Gnocchi in a
|
||||
# standard deploy. The project for Gnocchi will not have been created yet.
|
||||
# There is a known issue in project / user / role lifecycles that causes a
|
||||
# circular service dependency here. The Swift playbook must be run a second
|
||||
# time, after the Gnocchi playbook runs, when it uses Swift storage as a
|
||||
# workaround.
|
||||
- name: Get Gnocchi project id
|
||||
keystone:
|
||||
command: get_project
|
||||
tenant_name: "{{ gnocchi_service_project_name }}"
|
||||
endpoint: "{{ keystone_service_adminurl }}"
|
||||
login_user: "{{ keystone_admin_user_name }}"
|
||||
login_password: "{{ keystone_auth_admin_password }}"
|
||||
login_project_name: "{{ keystone_admin_tenant_name }}"
|
||||
insecure: "{{ keystone_service_adminuri_insecure }}"
|
||||
register: get_gnocchi_project
|
||||
failed_when: False
|
||||
when:
|
||||
- swift_gnocchi_enabled | bool
|
||||
- swift_gnocchi_service_project_id is not defined
|
||||
|
||||
- name: Store Gnocchi project id
|
||||
set_fact:
|
||||
swift_gnocchi_service_project_id: "{{ keystone_facts.id }}"
|
||||
when:
|
||||
- swift_gnocchi_enabled | bool
|
||||
- get_gnocchi_project | success
|
||||
|
@ -189,5 +189,8 @@ control_exchange = swift
|
||||
driver = messagingv2
|
||||
url = rabbit://{% for host in swift_rabbitmq_telemetry_servers.split(',') %}{{ swift_rabbitmq_telemetry_userid }}:{{ swift_rabbitmq_telemetry_password }}@{{ host }}:{{ swift_rabbitmq_telemetry_port }}{% if not loop.last %},{% else %}/{{ swift_rabbitmq_telemetry_vhost }}{% endif %}{% endfor %}
|
||||
topic = notifications
|
||||
{% if swift_gnocchi_service_project_id is defined %}
|
||||
ignore_projects = "{{ swift_gnocchi_service_project_id }}""
|
||||
{% endif %}
|
||||
log_level = WARN
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user