example notification script for alarm

Bug #1549466 reported by Raj Reddy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
Medium
Sundaresan Rajangam
Trunk
Fix Committed
Medium
Sundaresan Rajangam

Bug Description

provide an example notification script that listen to the alarm stream and sends an email

Tags: analytics
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/18157
Submitter: Sundaresan Rajangam (<email address hidden>)

information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18157
Committed: http://github.org/Juniper/contrail-controller/commit/1ce1cfdb9de3823905005bb755c976ee8e5ea1de
Submitter: Zuul
Branch: master

commit 1ce1cfdb9de3823905005bb755c976ee8e5ea1de
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Mar 3 16:55:28 2016 -0800

Notification script for alarm

This patch introduces a python script "contrail-alarm-notify" to send
email notification for alarms based on the /analytics/alarm-stream REST
API.

Sample email notification for Process Failure alarm

subject: [Contrail Alarm] Process Failure -- analytics-node:nodec40
Body:
Source : analytics-node:nodec40
Type : ProcessStatus
Severity : 3
Timestamp : 2016-03-04 00:30:36
Status : Unacknowledged
Description : NodeMgr reports abnormal status for process(es) in NodeStatus.process_info
Details : [
{
"all_of": [
{
"json_operand1_value": "\"PROCESS_STATE_STOPPED\"",
"json_vars": {
"NodeStatus.process_info.process_name": "contrail-snmp-collector"
},
"rule": {
"oper": "!=",
"operand1": {
"keys": [
"NodeStatus",
"process_info",
"process_state"
]
},
"operand2": {
"json_value": "\"PROCESS_STATE_RUNNING\""
}
}
}
]
}
]

Change-Id: I03706fc474d60dccc28c7d692ecdbe067ae79ec9
Partial-Bug: #1549466

Changed in juniperopenstack:
milestone: none → r3.1.0.0-fcs
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/18180
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18180
Committed: http://github.org/Juniper/contrail-packages/commit/e01fc9728dd33847b69ed6f1d75c98285c2ceeea
Submitter: Zuul
Branch: master

commit e01fc9728dd33847b69ed6f1d75c98285c2ceeea
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Mar 4 11:51:03 2016 -0800

Add contrail-alarm-notify script in analytics package

Change-Id: I63657429e58ab95b44382fddeacededb30f4b58f
Partial-Bug: #1549466

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/18233
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18233
Committed: http://github.org/Juniper/contrail-controller/commit/75c4e8e2cab2c905e2bdec6b4abaf896b051f18e
Submitter: Zuul
Branch: R3.0

commit 75c4e8e2cab2c905e2bdec6b4abaf896b051f18e
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Mar 3 16:55:28 2016 -0800

Notification script for alarm

This patch introduces a python script "contrail-alarm-notify" to send
email notification for alarms based on the /analytics/alarm-stream REST
API.

Sample email notification for Process Failure alarm

subject: [Contrail Alarm] Process Failure -- analytics-node:nodec40
Body:
Source : analytics-node:nodec40
Type : ProcessStatus
Severity : 3
Timestamp : 2016-03-04 00:30:36
Status : Unacknowledged
Description : NodeMgr reports abnormal status for process(es) in NodeStatus.process_info
Details : [
{
"all_of": [
{
"json_operand1_value": "\"PROCESS_STATE_STOPPED\"",
"json_vars": {
"NodeStatus.process_info.process_name": "contrail-snmp-collector"
},
"rule": {
"oper": "!=",
"operand1": {
"keys": [
"NodeStatus",
"process_info",
"process_state"
]
},
"operand2": {
"json_value": "\"PROCESS_STATE_RUNNING\""
}
}
}
]
}
]

Change-Id: I03706fc474d60dccc28c7d692ecdbe067ae79ec9
Partial-Bug: #1549466
(cherry picked from commit 1ce1cfdb9de3823905005bb755c976ee8e5ea1de)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/18269
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18269
Committed: http://github.org/Juniper/contrail-packages/commit/5d8b32edbe4590b0e55cc06c917f2da90d11d005
Submitter: Zuul
Branch: R3.0

commit 5d8b32edbe4590b0e55cc06c917f2da90d11d005
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Mar 4 11:51:03 2016 -0800

Add contrail-alarm-notify script in analytics package

Change-Id: I63657429e58ab95b44382fddeacededb30f4b58f
Partial-Bug: #1549466
(cherry picked from commit e01fc9728dd33847b69ed6f1d75c98285c2ceeea)

Revision history for this message
Sundaresan Rajangam (srajanga) wrote :

Reviewed: https://review.opencontrail.org/18547
Committed: http://github.org/Juniper/contrail-packaging/commit/2994e36b1fc97d04394a2bef9c9f6adb92aa2347
Submitter: Zuul
Branch: master

commit 2994e36b1fc97d04394a2bef9c9f6adb92aa2347
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Mar 18 16:47:18 2016 -0700

Add python-sseclient package to contrail_third_party_packages

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/18587
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
Sundaresan Rajangam (srajanga) wrote :

Reviewed: https://review.opencontrail.org/18548
Committed: http://github.org/Juniper/contrail-packaging/commit/3743574e82a48fcd9c47cb7ddf5f00dd644b9862
Submitter: Zuul
Branch: R3.0

commit 3743574e82a48fcd9c47cb7ddf5f00dd644b9862
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Mar 18 16:47:18 2016 -0700

Add python-sseclient package to contrail_third_party_packages

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/18588
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18588
Committed: http://github.org/Juniper/contrail-packages/commit/35caee6b8589381a83675b2adf0ff2760874bd0a
Submitter: Zuul
Branch: R3.0

commit 35caee6b8589381a83675b2adf0ff2760874bd0a
Author: Sundaresan Rajangam <email address hidden>
Date: Mon Mar 21 13:57:29 2016 -0700

Add dependency on python-sseclient for contrail-analytics

Change-Id: I3f06b199421030033c1fa81f9e466dd14f2f7083
Closes-Bug: #1549466
(cherry picked from commit 7fe260bb0a3e739e794bf77082fe3b3d757ac9b3)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/18587
Committed: http://github.org/Juniper/contrail-packages/commit/7fe260bb0a3e739e794bf77082fe3b3d757ac9b3
Submitter: Zuul
Branch: master

commit 7fe260bb0a3e739e794bf77082fe3b3d757ac9b3
Author: Sundaresan Rajangam <email address hidden>
Date: Mon Mar 21 13:57:29 2016 -0700

Add dependency on python-sseclient for contrail-analytics

Change-Id: I3f06b199421030033c1fa81f9e466dd14f2f7083
Closes-Bug: #1549466

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.