Website and Server Monitoring with Buddy's Recurrently Executed Pipelines
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.
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 NONE and the time interval to 1 minute.
Set the start date from which the pipeline should be active.
Hint
The 1 minute interval is only available for pipelines with no branches assigned. Normally the minimum time is 5 minutes
Image loading...
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
Image loading...
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.
Image loading...
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:
Image loading...
Tip
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.
Image loading...
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.
Image loading...
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.
Jarek Dylewski
Customer Support
A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.