Commit ceaed127 authored by Flávio Ramalho's avatar Flávio Ramalho
Browse files

Updated persister logging and fixed some issues

parent 265e1f98
......@@ -18,6 +18,9 @@ fact_caching = jsonfile
fact_caching_connection = ansible_facts
fact_caching_timeout = 86400
# Disable retry files
retry_files_enabled = False
inventory = inventory
host_key_checking = False
......
......@@ -74,6 +74,11 @@
owner: "mon-persister"
group: "monasca"
mode: "0640"
- src: "monasca-persister/persister-logging.conf.j2"
dest: "/etc/monasca/persister-logging.conf"
owner: "mon-persister"
group: "monasca"
mode: "0640"
tags:
- monasca-persister-config
- monasca-install-persister
......
......@@ -23,8 +23,6 @@
mode: "0750"
- schema: "mon_mysql.sql"
mode: "0644"
- schema: "winchester.sql"
mode: "0644"
register: schemas
tags:
- monasca-schema-download
......@@ -37,13 +35,12 @@
- monasca-influxdb-schema
- monasca-install-schema
- name: Create mon & winchester databases
- name: Create mon database
mysql_db:
name: "{{ item }}"
state: "present"
with_items:
- "mon"
- "winchester"
when: schemas.changed
tags:
- monasca-mysql-dbcreate
......@@ -67,8 +64,6 @@
with_items:
- name: "mon"
sql: "mon_mysql.sql"
- name: "winchester"
sql: "winchester.sql"
when: schemas.changed
tags:
- monasca-mysql-schema
......
......@@ -128,7 +128,7 @@ def add_service_endpoint(ks_client, name, description, type, url, region,
if endpoint.interface == interface:
return True
else:
ks_client.endpoints.delete(id=endpoint.id)
ks_client.endpoints.delete(endpoint.id)
ks_client.endpoints.create(region=region, service=service, url=url,
interface=interface)
......
......@@ -27,6 +27,12 @@ kafka:
60: 60-seconds-notifications
max_offset_lag: 600 # In seconds, undefined for none
database:
# repo_driver: monasca_notification.common.repositories.postgres.pgsql_repo:PostgresqlRepo
# repo_driver: monasca_notification.common.repositories.orm.orm_repo:OrmRepo
# repo_driver: monasca_notification.common.repositories.mysql.mysql_repo:MysqlRepo
repo_driver: "monasca_notification.common.repositories.mysql.mysql_repo:MysqlRepo"
mysql:
host: "{{ ansible_default_ipv4.address }}"
user: "notification"
......@@ -41,7 +47,7 @@ notification_types:
user: ""
password: ""
timeout: 15
from_addr: "hpcs.mon@hp.com"
from_addr: "monasca@{{ ansible_hostname }}"
webhook:
timeout: 5
......@@ -101,3 +107,6 @@ logging: # Used in logging.dictConfig
handlers:
- file
level: WARN
statsd:
host: "localhost"
port: 8125
[loggers]
keys = root, kafka, influxdb, cassandra
[handlers]
keys = console, file
[formatters]
keys = generic
[logger_root]
level = DEBUG
formatter = default
handlers = console, file
[logger_kafka]
qualname = kafka
level = DEBUG
formatter = default
handlers = console, file
propagate = 0
[logger_influxdb]
qualname = influxdb
level = DEBUG
formatter = default
handlers = console, file
propagate = 0
[logger_cassandra]
qualname = cassandra
level = DEBUG
formatter = default
handlers = console, file
propagate = 0
[handler_console]
class = logging.StreamHandler
args = (sys.stderr,)
level = DEBUG
formatter = generic
[handler_file]
class = logging.handlers.RotatingFileHandler
level = DEBUG
formatter = generic
# store up to 5*100MB of logs
args = ('/var/log/monasca/persister/persister.log', 'a', 104857600, 5)
[formatter_generic]
format = %(asctime)s %(levelname)s [%(name)s][%(threadName)s] %(message)s
\ No newline at end of file
# {{ ansible_managed }}
[DEFAULT]
log_file = persister.log
log_dir = /var/log/monasca/persister
log_config_append=/etc/monasca/persister-logging.conf
# Default log level is WARNING
# Show debugging output in logs (sets DEBUG log level output)
......
# 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.
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
......@@ -55,6 +67,8 @@ DASHBOARDS = getattr(settings, 'GRAFANA_LINKS', GRAFANA_LINKS)
GRAFANA_URL = {'RegionOne': "http://{{ grafana_ip_address }}:3000", }
ENABLE_KIBANA_BUTTON = getattr(settings, 'ENABLE_KIBANA_BUTTON', False)
KIBANA_POLICY_RULE = getattr(settings, 'KIBANA_POLICY_RULE', 'admin_required')
KIBANA_POLICY_SCOPE = getattr(settings, 'KIBANA_POLICY_SCOPE', 'identity')
KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.4:5601/')
OPENSTACK_SSL_NO_VERIFY = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment