Availability is the key factor when running an online business: monitoring and reporting, event management, keeping unavailability periods as short as possible. This guide will explain you how to automate monitoring-related tasks with Buddy's pipelines and facilitate the workflow at your support center.
Objectives of this guide
With this guide you’ll be able to:
- Learn the concept of a pipeline run recurrently
- Find out how it can help you automate monitoring-related tasks
- Set up monitoring for your website using pipelines
This guide assumes that you already know Buddy and its powerful pipelines.
What is the recurring mode and when it comes in handy
Recurring pipelines are triggered automatically at a specific time. They are perfect as far as monitoring is concerned: check whatever you want to check automatically, promptly and without your help, and report the results in a way that you prefer.
Setting up a website monitoring pipeline
In this example we’ll create a pipeline that will monitor website availability by checking if the text we expect to find is actually there (the text is the evidence the site is loading properly).
Configure pipeline details
- Go to the project with your website and create a new pipeline.
- Set the trigger mode to recurrent to reveal recurrence configuration.
- Set the branch to
NONEand the time interval to
- Set the start date from which the pipeline should be active.
The 1 minute interval is only available for pipelines with no branches assigned. Normally the minimum time is 5 minutes
Add monitoring actions
Now it's time to add actions to the newly created pipeline. We'll need three actions in total:
1x Web action – this action will send a request to the given URL and check for a string to make sure that the site is online and delivers the right content
2x SMS actions – one in Actions run on failure, the second in Actions run on back to normal. This way you will receive a message to your mobile when the site is down + another one when the action is back online.
If everything was configured correctly, Buddy will check your website status every 60 seconds, and send a message to the selected channel if something is wrong. The whole pipeline should look like this:
You can decide if you want to send the message on every failed execution or only once by changing a setting in the Action tab. This is especially imporant in case of mobile messages to keep your budget under control.
Check how your pipeline is doing
Every pipeline features an execution report with details on execution time and incidents marked spread over a period of time – a great tool to improve your incident management processes.
Other jobs for recurring pipelines
Recurring pipelines have many practical applications besides monitoring web sites.
1. Run integration and unit tests daily
Recurring pipelines can be employed to trigger integration tests once a day at night. Running through the entire test suite can take much time. In our case (Selenium-based scenarios) the total testing time amounts to four hours. We need (and want!) to run the scripts, but not on every push. Thus we set up a recurring pipeline that triggers tests after hours and only in case of changes in the code.
2. Deliver your applications at a specific time
Other possible tasks you can automate with recurring pipelines are deliveries, scheduled at specific intervals.
3. Perform backups
The perfect job for recurring pipelines is also performing backups at certain intervals.