Alerts are sent from Hopsworks using Prometheus' Alert manager. In order to send alerts we first need to configure the Alert manager. To do that click on your name in the top right corner of the navigation bar and choose Cluster Settings from the dropdown menu. In the Cluster Settings' Alerts tab you can configure the alert manager to send alerts via email, slack or pagerduty.
1. Email Alerts#
To send alerts via email you need to configure an SMTP server. Click on the Configure button on the left side of the email row and fill out the form that pops up.
- Default from: the address used as sender in the alert email.
- SMTP smarthost: the Simple Mail Transfer Protocol (SMTP) host through which emails are sent.
- Default hostname (optional): hostname to identify to the SMTP server.
- Authentication method: how to authenticate to the SMTP server. CRAM-MD5, LOGIN or PLAIN.
Optionally cluster wide Email alert receivers can be added in Default receiver emails. These receivers will be available to all users when they create event triggered alerts.
2. Slack Alerts#
Alert can also be sent via Slack message. To be able to send Slack messages you first need to configure a Slack webhook. Click on the Configure button on the left side of the slack row and past in your Slack webhook in Webhook.
Optionally cluster wide Slack alert receivers can be added in Slack channel/user. These receivers will be available to all users when they create event triggered alerts.
Pagerduty is another way you can send alerts from Hopsworks. Click on the Configure button on the left side of the pagerduty row and fill out the form that pops up.
Fill in Pagerduty URL: the URL to send API requests to.
Optionally cluster wide Pagerduty alert receivers can be added in Service key/Routing key. By first choosing the PagerDuty integration type:
- global event routing (routing_key): when using PagerDuty integration type
Events API v2.
- service (service_key): when using PagerDuty integration type
Then adding the Service key/Routing key of the receiver(s). PagerDuty provides documentation on how to integrate with Prometheus' Alert manager.
If you are familiar with Prometheus' Alert manager you can also configure alerts by editing the yaml/json file directly.
Example: Adding the yaml snippet shown below in the global section of the alert manager configuration will have the same effect as creating the SMTP configuration as shown in section 1 above.
global: smtp_smarthost: smtp.gmail.com:587 smtp_from: email@example.com smtp_auth_username: firstname.lastname@example.org smtp_auth_password: XXXXXXXXX smtp_auth_identity: email@example.com ...
To test the alerts by creating triggers from Jobs and Feature group validations see Alerts.