In this tutorial you will add an alert monitor to the instance you created, so you are emailed in the event that your instance fails to run.
An alert group is a group of people (their emails and phone numbers) that should be notified in the event that an alert is triggered. In this example, the alert trigger is our instance failing to run.
- Web App
Click the Settings link on the left-hand sidebar and open the Alert Groups tab. Click +Alert Group and give it the name "Test Alert Group".
Under the Users card of your alert group, select your user from the dropdown.
To add a new group with your user in it, you will need to know your users's ID. You can then use that ID to create a new group called "Test Alert Group"
# List organization users with IDsprism organization:users:list --extendedId Name EmailVXNlcjpiYjkzN2M1Ny02MTVmLTQ5MDYtOGI4Yi0yNTQ3YjJlZGU3NzY= James Patton email@example.com # Create an alert groupprism alerts:groups:create --name 'Test Alert Group' --users '["VXNlcjpiYjkzN2M1Ny02MTVmLTQ5MDYtOGI4Yi0yNTQ3YjJlZGU3NzY="]'
- Web App
Open your instance by clicking the Instances link on the left-hand side and selecting the instance you created in the last step. From your instance page, click the Monitors tab. Click the + Monitor button on the top-right of this page. Name the monitor "My First Monitor", and select the "Execution Failed" trigger.
Once the monitor is created you will find yourself in the monitor's Summary tab.
Under the Notifications card, select the "Test Alert Group" group you created above.
To create an alert monitor you will need to know the ID of your instance, and the ID of your alert group.
You will also need to know the ID of the "Execution Failed" alert trigger.
You can use those IDs with the
prism alerts:monitors:create command to create an alert monitor.
# Get instance IDprism instances:list --columns id,name Id NameSW5zdGFuY2U6ODEyMjNiZTEtODA2ZC00ZjE5LTkzMTItOWU0MDU3ZTc5YmY3 My First Instance # Get "Execution Failed" trigger IDprism alerts:triggers:list --extended Id NameQWxlcnRUcmlnZ2VyOjc5N2E1OTEyLTE3ZjctNDZkMy1hYTkxLThkOTdmNGYzYmUwZQ== Log Level Matched or ExceededQWxlcnRUcmlnZ2VyOmQ2OGZlNjg2LTY2Y2QtNDkwMy1iNGM1LWQ0OTE1NWZkNTk1YQ== Execution Duration Matched or ExceededQWxlcnRUcmlnZ2VyOmI3MjljOTM2LTJjOTQtNGFiYi1hODE4LTI5MGE0ZTBhODY2Mw== Execution CompletedQWxlcnRUcmlnZ2VyOjJlYWI4ZDAxLTQyMzMtNGQ1OC05NTljLWU1YzNlMmM5Y2FhNA== Execution FailedQWxlcnRUcmlnZ2VyOmNkODQ5NzA0LThhOGUtNDc5Zi1iMmNlLTQ1ZGI1MGU1NGQyMw== Execution StartedQWxlcnRUcmlnZ2VyOjBkZTkwZDBhLTEzOGYtNGIzMy05NGJlLTMxNjFmNWViNGMwOQ== Instance RemovedQWxlcnRUcmlnZ2VyOjM3ZWFkNDNiLTUyYTYtNGM2Ni1iNTg2LThmYmMwNzk5ODY5NQ== Instance DisabledQWxlcnRUcmlnZ2VyOjVmOGVhNGViLTFlNmEtNGVhNy1iZDdiLTNlYWRmNWQ1MTJjMg== Instance EnabledQWxlcnRUcmlnZ2VyOjAwODgyM2JjLThlZTAtNDNkNS04ZTkzLTY5YjExZjMwZThhOA== Execution Overdue # Get your alert group's IDprism alerts:groups:list --extended Id NameQWxlcnRHcm91cDo4NDFhMmMzYS02Nzc0LTRkZjAtYmVlOC04MmYwOWYyMTQ2ODM= Test Alert Group # Add an alert monitor to your instanceprism alerts:monitors:create \ --name 'My First Monitor' \ --instance SW5zdGFuY2U6ODEyMjNiZTEtODA2ZC00ZjE5LTkzMTItOWU0MDU3ZTc5YmY3 \ --triggers '["QWxlcnRUcmlnZ2VyOjJlYWI4ZDAxLTQyMzMtNGQ1OC05NTljLWU1YzNlMmM5Y2FhNA=="]' \ --groups '["QWxlcnRHcm91cDo4NDFhMmMzYS02Nzc0LTRkZjAtYmVlOC04MmYwOWYyMTQ2ODM="]'
Return to your integration in the web app by clicking Integrations on the left-hand sidebar and choosing your integration, and change the Slack webhook URL to a fake one, like https://hooks.slack.com/services/FOO/BAR/BAZ.
Publish your erroneous integration again by clicking the Publish button. Go back to the instance you created by clicking the Instances button on the left-hand side and selecting your instance. Click Deploy to deploy the latest published integration to your instance, and then click the RUN TEST button for your instance.
You should get an email stating that you instance failed to run to completion.
Congratulations! You created a fully functioning integration, deployed an instance to a customer, and configured alert monitors to alert your team if something goes wrong.
You are now ready to create your own integrations. Here are a few things we recommend you try next: