New Relic is a powerful platform that revolutionizes software development and performance. By aggregating data from diverse digital sources, it provides comprehensive insights to deeply understand your system. Analyzing this data efficiently allows you to respond proactively to incidents, preventing potential problems. In this article, we will guide you through the process of setting up and getting synthetics monitoring to work in New Relic.
Synthetic Monitor Setup
Setting up synthetic monitoring in New Relic involves a few steps to ensure that you can effectively monitor your applications and services from different locations and simulate user interactions. Before you begin, make sure you have a New Relic account. If you don’t have one, sign up at https://newrelic.com/signup.
Step 1: Accessing Synthetic Monitoring
New Relic’s synthetic monitors act as a vigilant guardian for your website, constantly checking its performance. It keeps track of various aspects, including an overall summary, detailed downtime incidents, and resource statistics. To access synthetic monitoring:
- Navigate to the New Relic UI by visiting “One.newrelic.com.”
- Sign in with your New Relic account credentials.
- From the top navigation menu, select “Synthetics.”
Step 2: Creating a New Monitor
To create a new monitor:
- Click on the “Create a monitor” button to start setting up a new monitor.
Step 3: Selecting Monitor Type
Choose the type of monitor you want to create based on your monitoring requirements. New Relic offers several monitor types:
- Broken Links Monitor: Provide a URL, and this monitor will test all the links on the page for success. Detect failures and view individual non-successful links that caused the failure.
- Certificate Check Monitor: Proactively ping your domain certificates based on a configurable threshold. Pair with an alert to ensure you receive notifications when certificate renewals are needed.
- Ping Monitor: The simplest monitor type that checks if an application is online. It uses a Java HTTP client to make requests to your site.
- Step Monitor: Configurable monitor to perform various actions like asserting modals, text, clicking elements, and dismissing modals.
- Simple Browser Monitor: Pre-built scripted browser monitors that make requests to your site using Google Chrome. Offers a more accurate emulation of an actual customer visit than a simple ping monitor.
- Scripted Browser Monitor: Used for sophisticated, customized monitoring. Create custom scripts to navigate your website, perform specific actions, and ensure specific resources are present.
- API Test Monitor: Monitor API endpoints and validate responses. Ideal for monitoring API functionality and app server performance in addition to your website.
Select the appropriate monitor type by clicking on it.
Step 4: Configuring the Monitor
To effectively set up Synthetic Monitoring in New Relic, follow the steps below for each monitor type:
1. Ping Monitor:
- Enter the URL or IP address for availability monitoring, such as your website’s homepage or an essential API endpoint.
- Choose whether to follow redirects based on your monitoring needs.
- Define alert thresholds for response time and availability to receive timely notifications.
2. Simple Browser Monitor:
- Enter the URL of the page to load in the browser for monitoring, such as a crucial landing page or key user workflow.
- Specify any required headers or parameters for the page load, if applicable.
- Set the time limit for page load and configure alert thresholds for load time and error rates.
3. Scripted Browser Monitor:
- Write a JavaScript script to simulate user interactions, navigate pages, interact with elements, and validate responses.
- Utilize the New Relic script editor with syntax highlighting and error checking for robust scripts.
- Thoroughly test the script to ensure accurate user behavior representation.
4. API Test Monitor:
- Enter the API endpoint to monitor, specifying the HTTP method and required headers or parameters.
- Set up response validations to ensure expected API results, checking response status codes, times, and specific data elements.
- Define alert thresholds for response time and validation failures.
5. Broken Link Monitor:
- Specify a name and URL for monitoring (valid HTTP or HTTPS URL).
- Select the monitoring frequency period.
- Optionally add tags for easy future identification.
- Choose monitor locations, then click “Save monitor” to confirm.
Read Also: How to Pair Sony WF-1000XM4: A Comprehensive Guide
Step 5: Setting Monitor Locations
Choose the locations from which you want to run the monitor. New Relic offers multiple global locations, allowing you to simulate user interactions from various geographical regions. Consider selecting locations that represent your key user bases or regions with high traffic.
Step 6: Setting Monitor Schedule
Decide how frequently you want the monitor to run. Consider the trade-off between monitoring frequency and data volume. More frequent checks provide real-time data but may lead to higher data ingestion costs.
Step 7: Naming and Saving the Monitor
Give your monitor a descriptive and meaningful name. This will help you identify the monitor easily, especially if you have multiple monitors set up. Consider adding tags to categorize the monitor based on application, environment, or any other relevant criteria. Click the “Save” button to create the monitor.
Step 8: Viewing Monitor Results
After your monitor has run for some time, you can view the results in the New Relic UI. In the Synthetic Monitoring dashboard, you’ll find valuable performance metrics, including response times, availability, and any potential errors or failures. Use interactive charts and graphs to analyze trends and identify performance bottlenecks.
Read Also: How to Convert 18 cm to Inches
Step 9: Setting Up Alerts
To ensure prompt action in case of performance issues, you can configure alerting policies based on the monitor results. Define alert conditions and the notification channels (e.g., email, Slack) to receive alerts when specific thresholds are breached. Fine-tune alerting policies to avoid false positives and ensure timely notification of actual issues.
Step 10: Integrating with Dashboards
Leverage New Relic’s features like dashboards and Insights to integrate synthetic monitoring data with other monitoring data for a comprehensive view of your application’s performance. Create custom dashboards to visualize key metrics and gain deeper insights into your application’s behavior. Combine synthetic monitoring data with APM and infrastructure monitoring data to correlate frontend and backend performance.
Conclusion
Synthetic monitoring in New Relic is a crucial tool for ensuring the reliability and performance of your applications from various geographical locations. By simulating user interactions and regularly monitoring key metrics, you can proactively identify and address performance issues before they impact end users. Setting up synthetic monitoring involves a few straightforward steps, but the insights gained from this practice can be invaluable for maintaining a high-quality user experience and meeting service-level objectives. Always keep track of your application’s evolving needs and adjust your monitoring strategy accordingly for continued success.