ebc1ed72d6
Added more test coverage for email notifications. Moved notification methods from notification_processor to new types directory. types/interface.py now automatically records statsd information for configured types. Configuration for a type is now optional. Uncofigured types are not able to send notifications. Notifications that come across for unconfigured types generate a warning. Email notification type now explicity exits when unable to connect to an SMTP server. Change-Id: I213d815965761736eb3680b5e14206ba7bef7e90
75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
kafka:
|
|
url: 192.168.10.4:9092 # or comma seperated list of multiple hosts
|
|
group: monasca-notification
|
|
alarm_topic: alarm-state-transitions
|
|
notification_topic: alarm-notifications
|
|
max_offset_lag: 600 # In seconds, undefined for none
|
|
|
|
mysql:
|
|
host: 192.168.10.4
|
|
user: notification
|
|
passwd: password
|
|
db: mon
|
|
# A dictionary set according to the params defined in, http://dev.mysql.com/doc/refman/5.0/en/mysql-ssl-set.html
|
|
# ssl: {'ca': '/path/to/ca'}
|
|
|
|
notification_types:
|
|
email:
|
|
server: 192.168.10.4
|
|
port: 25
|
|
user:
|
|
password:
|
|
timeout: 60
|
|
from_addr: hpcs.mon@hp.com
|
|
|
|
webhook:
|
|
timeout: 5
|
|
|
|
pagerduty:
|
|
timeout: 5
|
|
url: "https://events.pagerduty.com/generic/2010-04-15/create_event.json"
|
|
|
|
processors:
|
|
alarm:
|
|
number: 2
|
|
ttl: 14400 # In seconds, undefined for none. Alarms older than this are not processed
|
|
notification:
|
|
number: 4
|
|
|
|
queues:
|
|
alarms_size: 256
|
|
finished_size: 256
|
|
notifications_size: 256
|
|
sent_notifications_size: 50 # limiting this size reduces potential # of re-sent notifications after a failure
|
|
|
|
zookeeper:
|
|
url: 192.168.10.4:2181 # or comma seperated list of multiple hosts
|
|
|
|
logging: # Used in logging.dictConfig
|
|
version: 1
|
|
disable_existing_loggers: False
|
|
formatters:
|
|
default:
|
|
format: "%(asctime)s %(levelname)s %(name)s %(message)s"
|
|
handlers:
|
|
console:
|
|
class: logging.StreamHandler
|
|
formatter: default
|
|
file:
|
|
class : logging.handlers.RotatingFileHandler
|
|
filename: /tmp/notification.log
|
|
formatter: default
|
|
maxBytes: 10485760 # Rotate at file size ~10MB
|
|
backupCount: 5 # Keep 5 older logs around
|
|
loggers:
|
|
kazoo:
|
|
level: WARN
|
|
kafka:
|
|
level: WARN
|
|
statsd:
|
|
level: WARN
|
|
root:
|
|
handlers:
|
|
- console
|
|
level: DEBUG
|