Moved to setting up alarms with a role so they can be used more widely
Change-Id: Iafbf59b744785f1a368b75ec7ab1510f36670f60
This commit is contained in:
parent
e4509cb54e
commit
d64e4a6e5d
63
mini-mon.yml
63
mini-mon.yml
@ -116,64 +116,5 @@
|
||||
keystone_url: http://192.168.10.5:35357/v3/
|
||||
keystone_user: mini-mon
|
||||
keystone_password: password
|
||||
tasks:
|
||||
- name: Setup root email notification method
|
||||
monasca_notification_method:
|
||||
name: "Email Root"
|
||||
type: 'EMAIL'
|
||||
address: 'root@localhost'
|
||||
keystone_url: "{{keystone_url}}"
|
||||
keystone_user: "{{keystone_user}}"
|
||||
keystone_password: "{{keystone_password}}"
|
||||
tags:
|
||||
- alarms
|
||||
- system_alarms
|
||||
- monasca_alarms
|
||||
register: out
|
||||
- name: Create System Alarm Definitions
|
||||
monasca_alarm_definition:
|
||||
name: "{{item.name}}"
|
||||
expression: "{{item.expression}}"
|
||||
keystone_token: "{{out.keystone_token}}"
|
||||
match_by: "{{item.match_by | default(['hostname']) }}"
|
||||
monasca_api_url: "{{out.monasca_api_url}}"
|
||||
alarm_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
ok_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
undetermined_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
with_items:
|
||||
- { name: "Host Alive Alarm", expression: "host_alive_status > 0"}
|
||||
- { name: "Http Status Alarm", expression: "http_status > 0", match_by: ["service", "hostname"] }
|
||||
- { name: "High CPU usage", expression: "avg(cpu.idle_perc) < 10 times 3" }
|
||||
- { name: "Disk Inode Usage", expression: "disk.inode_used_perc > 90" }
|
||||
- { name: "Disk Usage", expression: "disk.space_used_perc > 90" }
|
||||
- { name: "Memory usage", expression: "avg(mem.usable_perc) < 10 times 3" }
|
||||
- { name: "Network Errors", expression: "net.in_errors >5 or net.out_errors > 5" }
|
||||
tags:
|
||||
- alarms
|
||||
- system_alarms
|
||||
- name: Create Monasca Alarm Definitions
|
||||
monasca_alarm_definition:
|
||||
name: "{{item.name}}"
|
||||
expression: "{{item.expression}}"
|
||||
keystone_token: "{{out.keystone_token}}"
|
||||
match_by: "{{item.match_by | default(['hostname']) }}"
|
||||
monasca_api_url: "{{out.monasca_api_url}}"
|
||||
alarm_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
ok_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
undetermined_actions:
|
||||
- "{{out.notification_method_id}}"
|
||||
with_items:
|
||||
- { name: "Kafka Consumer Lag", expression: "avg(kafka.consumer_lag) > 100 times 3", match_by: ["consumer_group", "hostname"] }
|
||||
- { name: "Monasca Agent emit time", expression: "avg(monasca.emit_time_sec) > 2 times 3" }
|
||||
- { name: "Monasca Agent collection time", expression: "avg(monasca.collection_time_sec) > 5 times 3" }
|
||||
- { name: "Monasca Notification Configuration DB query time", expression: "avg(monasca.config_db_time.95percentile) > 5 times 3" }
|
||||
- { name: "Monasca Notification email time", expression: "avg(monasca.email_time.95percentile) > 2 times 3" }
|
||||
- { name: "Zookeeper Average Latency", expression: "avg(zookeeper.avg_latency_sec) > 1 times 3" }
|
||||
tags:
|
||||
- alarms
|
||||
- monasca_alarms
|
||||
roles:
|
||||
- {role: monasca-default-alarms, tags: [alarms]}
|
||||
|
@ -4,6 +4,8 @@
|
||||
name: monasca-agent
|
||||
- src: tkuhlman.monasca-api
|
||||
name: monasca-api
|
||||
- src: https://github.com/hpcloud-mon/ansible-monasca-default-alarms
|
||||
name: monasca-default-alarms
|
||||
- src: tkuhlman.monasca-keystone
|
||||
name: monasca-keystone
|
||||
- src: tkuhlman.monasca-notification
|
||||
@ -22,5 +24,5 @@
|
||||
name: storm
|
||||
- src: tkuhlman.zookeeper
|
||||
name: zookeeper
|
||||
- src: https://github.com/tkuhlman/ansible-influxdb
|
||||
- src: https://github.com/hpcloud-mon/ansible-influxdb
|
||||
name: influxdb
|
||||
|
Loading…
Reference in New Issue
Block a user