Merge remote-tracking branch 'upstream/stacklight' into merge-branch

Change-Id: I88df0eadd7501501edfbea67d79e63b52be48b8e
This commit is contained in:
Simon Pasquier 2016-11-25 16:18:44 +01:00
commit af37e09a42
6 changed files with 2864 additions and 2 deletions

View File

@ -2,7 +2,7 @@ parameters:
neutron:
_support:
collectd:
enabled: false
enabled: true
heka:
enabled: true
sensu:
@ -10,4 +10,6 @@ parameters:
sphinx:
enabled: true
config:
enabled: true
enabled: true
grafana:
enabled: true

View File

@ -0,0 +1,10 @@
Import "openstack_neutron"
<Module "openstack_neutron">
KeystoneUrl "{{ plugin.url }}"
Username "{{ plugin.username }}"
Password "{{ plugin.password }}"
Tenant "{{ plugin.tenant }}"
MaxRetries "2"
Timeout "20"
</Module>

File diff suppressed because it is too large Load Diff

19
neutron/meta/collectd.yml Normal file
View File

@ -0,0 +1,19 @@
{%- if pillar.neutron.server %}
{%- from "neutron/map.jinja" import server with context %}
{%- if server.get('enabled', False) %}
local_plugin:
collectd_check_local_endpoint:
endpoint:
neutron-api:
expected_code: 200
url: "http://{{ server.bind.address|replace('0.0.0.0', '127.0.0.1') }}:{{ server.bind.port }}/"
remote_plugin:
openstack_neutron:
plugin: python
template: neutron/files/collectd_openstack_neutron.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 %}
{%- endif %}

4
neutron/meta/grafana.yml Normal file
View File

@ -0,0 +1,4 @@
dashboard:
neutron:
format: json
template: neutron/files/grafana_dashboards/neutron_influxdb.json

135
neutron/meta/heka.yml Normal file
View File

@ -0,0 +1,135 @@
log_collector:
decoder:
neutron:
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:
neutron:
engine: token
delimiter: '\n'
input:
neutron_log:
engine: logstreamer
log_directory: "/var/log"
file_match: 'neutron/(?P<Service>(dhcp-agent|l3-agent|metadata-agent|neutron-netns-cleanup|openvswitch-agent|server))\.log\.?(?P<Seq>\d*)$'
differentiator: ['neutron', '_', 'Service']
priority: ["^Seq"]
decoder: "neutron_decoder"
splitter: "neutron_splitter"
metric_collector:
trigger:
neutron_logs_error:
description: 'Too many errors have been detected in Neutron logs'
severity: warning
no_data_policy: okay
rules:
- metric: log_messages
field:
service: neutron
level: error
relational_operator: '>'
threshold: 0.1
window: 70
periods: 0
function: max
{%- if pillar.neutron.server is defined %}
neutron_api_local_endpoint:
description: 'Neutron API is locally down'
severity: down
rules:
- metric: openstack_check_local_api
field:
service: neutron-api
relational_operator: '=='
threshold: 0
window: 60
periods: 0
function: last
{%- endif %}
alarm:
{%- if pillar.neutron.server is defined %}
neutron_logs:
alerting: enabled
triggers:
- neutron_logs_error
dimension:
service: neutron-logs
neutron_api_endpoint:
alerting: enabled
triggers:
- neutron_api_local_endpoint
dimension:
service: neutron-api-endpoint
{%- endif %}
remote_collector:
trigger:
{%- if pillar.neutron.server is defined %}
neutron_api_check_failed:
description: 'Endpoint check for neutron-api is failed'
severity: down
rules:
- metric: openstack_check_api
field:
service: neutron-api
relational_operator: '=='
threshold: 0
window: 60
periods: 0
function: last
{%- endif %}
alarm:
{%- if pillar.neutron.server is defined %}
neutron_api_check:
triggers:
- neutron_api_check_failed
dimension:
service: neutron-api-check
{%- endif %}
aggregator:
alarm_cluster:
neutron_logs:
policy: highest_severity
alerting: enabled
group_by: hostname
match:
service: neutron-logs
members:
- neutron_logs
dimension:
service: neutron-control
nagios_host: 01-service-clusters
neutron_api_endpoint:
policy: availability_of_members
alerting: enabled
group_by: hostname
match:
service: neutron-api-endpoint
members:
- neutron_api_endpoint
dimension:
service: neutron-control
nagios_host: 01-service-clusters
neutron_api_check:
policy: highest_severity
alerting: enabled
match:
service: neutron-api-check
members:
- neutron_api_check
dimension:
service: neutron-control
nagios_host: 01-service-clusters
neutron_control:
policy: highest_severity
alerting: enabled_with_notification
match:
service: neutron-control
members:
- neutron_logs
- neutron_api_endpoint
- neutron_api_check
dimension:
cluster_name: neutron-control
nagios_host: 00-top-clusters