Here’s how to configure the monitoring and logging as-a-service solution to exchange information with Jira, Slack and HipChat.

Monasca is the monitoring and logging as-a-service solution in OpenStack. Monasca combines metric information, e.g. CPU, Disk space, with log messages. Monasca is a cloud native application based on microservices and it uses Kafka to stream real time data.

Monasca uses a push approach to prevent that data can be lost in case of network failure. Another key feature of Monasca is to store large quantities of data to allow deep analysis. Monasca is also multi-tenant, highly available, vertically and horizontally scalable.

Architecture

Monasca architecture is extensible in order to be easily integrated with other OpenStack services and legacy systems. This characteristic helps Monasca to notify other systems or to record issues in several tools.

Monasca already offers integration with email, PagerDuty, WebHook, Jira, Slack and HipChat. The notification engine is the Monasca component that consumes alarm state transition messages from the message queue and sends notifications for alarms, if required. As the architecture diagram shows, it is possible to extend the notification engine to send information to additional external systems.

The latest notification methods are Jira, Slack and HipChat. Here’s how to configure Monasca and these three systems in order to exchange information.

Notification plugins

In order to work with the notification engine, you must update monasca-notification and monasca-ui.

source /opt/monasca-notification/bin/activate
pip install --upgrade monasca-notification

systemctl restart monasca-notification
pip install --upgrade monasca-ui
systemctl restart httpd

After upgrading or updating the notification engine and the UI,  it’s possible to display the “Create Notification Method” UI that shows the default notification methods that can be used.

Jira

Some configuration updates are required to send notifications from Monasca to Jira.

Install Jira:

source /opt/monasca-notification/bin/activate

pip install jira

Update the /etc/monasca/notification.yaml config file:

notification_types:

plugins:

- monasca_notification.plugins.jira_notifier:JiraNotifier

 

jira:

user: user

password: password

# proxy: http://yourid:[email protected]:8080

Restart the notification engine:

systemctl restart monasca-notification

Now you can create a notification to be sent when an alarm is triggered, via either CLI or UI.

monasca notification-create jira-notification JIRA https://xxx.xxx.xxx.xxx/?project=MON

When an alarm is triggered (e.g. CPU higher than 10 percent) then Monasca will communicate with Jira to file a new issue. The issue is associated with an ID, so that if the alarm is updated (for example the alarm status changes in Monasca), that will be reflected in the Jira ticket.

Slack

A similar configuration is required for Slack.
Update the notification config file /etc/monasca/notification.yaml:

notification_types:
    plugins:
        - monasca_notification.plugins.slack_notifier:SlackNotifier

    slack:
        timeout: 20
        ca_certs: "/etc/ssl/certs/ca-bundle.crt"
        insecure: False
        # proxy: http://yourid:[email protected]:8080

Restart the notification engine:

systemctl restart monasca-notification

Create Monasca notification via either CLI or UI.

monasca notification-create Slack SLACK https://slack.com/api/chat.postMessage?token=&channel=#

Then trigger an alarm that invokes Slack.

 

HipChat

HipChat is similar to Jira and Slack.

Update the notification config file /etc/monasca/notification.yaml:

notification_types:

plugins:

- monasca_notification.plugins.hipchat_notifier:HipChatNotifier

 

hipchat:

timeout: 20

ca_certs: "/etc/ssl/certs/ca-bundle.crt"

insecure: False

proxy: http://yourid:[email protected]:8080

Create a notification via either CLI or UI.

monasca notification-create HipChatTest HIPCHAT https://api.hipchat.com/v2/room/<Room ID>/notification?auth_token=<access token>

Then let Monasca communicate with HipChat.

It’s possible to configure Monasca to notify external systems such as email, WebHook, Jira and Slack. Monasca architecture can be easily extended to communicate with other systems. In particular, the notification engine is the component responsible to communicate with external systems. Common use cases involve the communication between Monasca and team messaging tools that help engineers to understand cloud issues deeper and to react faster.

Get involved

If you want to know more about and contribute to Monasca check out the main page or get connected to the IRC channel or the meetings.

Author Cristiano Bellucci will be co-presenting a session at the upcoming OpenStack Summit Vancouver titled “An edge computing case study for Monasca: Smart City (AI-powered) Surveillance and Monitoring. ” Along with Giovanni Merlino and Antonio Puliafito, he’ll take you to the Italian city of Messina for a case study.