openstack-monitoring/playbooks/haproxy-install.yml

41 lines
1.3 KiB
YAML

---
# Copyright 2019 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Monitor haproxy
hosts: haproxy
gather_facts: "{{ osa_gather_facts | default(True) }}"
user: root
roles:
- role: sensu_common
tasks:
- import_tasks: common-tasks/install-plugins.yml
vars:
sensu_plugins: ['sensu-plugins-haproxy']
- import_tasks: common-tasks/configure-sudo.yml
vars:
sensu_commands:
- /opt/sensu/embedded/bin/check-haproxy.rb -S /var/run/haproxy.stat -c 100 -b 100 -B 100 -A
- import_tasks: common-tasks/setup-checks.yml
vars:
sensu_checks:
- name: haproxy
command: sudo check-haproxy.rb -S /var/run/haproxy.stat -c 100 -b 100 -B 100 -A
vars:
sensu_service: haproxy
environment: "{{ deployment_environment_variables | default({}) }}"
tags:
- haproxy