
At a high level, SmokePing is a tool that checks network latency, providing valuable insights into your network's performance. Setting up SmokePing in multiple Vultr locations can help address potential network issues with cloud compute services before they occur. By emulating customer connections, SmokePing can highlight external problems and network issues that may not be visible internally. This guide shows you how to monitor latency with SmokePing on Ubuntu 20.04.
smokeping.example.com.SmokePing has the ability to monitor in an active passive format. This allows views from different locations. The configuration and steps below depict a single location and are meant to be used as a starting point for developing a more robust monitoring platform. The first location should be where your user base is more heavily concentrated or what suits your use-case. This guide uses a Ubuntu 20.04 x64 server with 25GB SSD and IPv4 connectivity. Ensure that HTTP and HTTPS traffic can pass through the firewall to the instance.
Create an A record that points your domain name to the IP address of your cloud compute instance.
SmokePing requires a web server, and this guide uses Nginx. SmokePing also requires Common Gateway Interface (CGI) scripting. The guide implements fcgiwrap. To install SmokePing and fcgiwrap, as well as update the server, run these commands:
When prompted by the Postfix installer, choose Internet Site. When prompted for mail name, leave the name of the server. Leave the mail for postmaster and root blank.
The CGI wrapper needs to interact with Nginx. Configure Nginx with the default configuration.
As a best practice for Nginx, delete the default web site.
Create a no-site web site, which answers any requests destined for the host that do not contain the correct DNS name.
Paste the following configuration into the file.
Save the file and exit.
Create a site configuration for SmokePing.
Paste the following configuration in the file. Change the server_name directive to match your DNS record name.
Save the file and exit.
Link the two configuration files to the Nginx configuration.
Restart the web server.
Nginx should restart without any errors. If it returns any errors, check the syntax by running:
Enable HTTPS with LetsEncrypt. Replace the example values with your DNS name and email address.
With this configuration completed, your web server is available with HTTPS.
The final step is configuring SmokePing to use HTTPS and to ping clients.
Edit the General configuration
Change the following values:
Save the file and exit.
Edit the Targets and add monitored hosts:
Append the following to the end of the file (as well as any extra hosts):
Save the file and exit.
Restart the SmokePing daemon.
By default, Postfix attempts to send mail directly, which is insecure. Follow these steps to configure SendGrid as the mail relay.
Make a note of your API key, it will be shown one time.
Edit the main Postfix configuration file.
Add these lines to the end.
Save the configuration.
Create a password file.
Add the following line. Replace API-KEY-GOES-HERE with your API key.
Save and exit the file.
Change the permissions, encrypt the file, and restart Postfix.
You can use SmokePing to graph latency between your servers running in different Vultr locations and configure it to send email alerts during outages. SmokePing gives you a better overview of your architecture from various points around the world.
0 Comments
Be the first to comment and share your perspective with the community.