Using Synthetic Monitoring
You can use Synthetic Monitoring to reduce monitoring complexity while taking advantage of Grafana Cloud capabilities. You can use Synthetic Monitoring to do the following:
Collect metrics and logs on every check Troubleshoot problems with endpoints you’re monitoring to fully understand why a check has failed. In Synthetic Monitoring, along with metrics, logs are collected for each check run. Prometheus metrics and Logs from checks are published directly to your Grafana Cloud account.
Use blackbox monitoring Because Synthetic Monitoring is built on top of Prometheus blackbox exporter, we allow check configurations through UI in Grafana or via API.
Synthetic Monitoring includes Ping, DNS, HTTP, HTTPS, and TCP checks.
Enable alerting Use Synthetic Monitoring to leverage Prometheus-style alerting to ensure these alerts are making their way to the right people through the right notification method.
Note: You must create a different check for each check type. Each check type offers different configuration options based on the Prometheus blackbox exporter.
To set up your first check, let’s ping a target system to see if it is reachable by sending a network packet to the host and waiting for a response. This is the simplest check for system availability.
Create a ping check
- In your Grafana instance, go to Synthetic Monitoring > Checks.
- Click New Check.
- Choose PING as the Check Type.
- Enter a Job Name.
- Enter a Target. This is the hostname or IP of the system to check.
- Select the Probe Locations to test from, or click All to test from all locations.
- Click Save.
The Synthetic Monitoring backend distributes the check to all selected probes. Each probe pings the configured target and reports metrics and logging data back to your Grafana Cloud account. Follow the steps in Viewing your check data to dig deeper.
View the ping dashboard
Grafana dashboards display your data in panels arranged in rows. Synthetic Monitoring ships with default dashboards that can be customized, or you can create your own.
- Click Search (magnifying glass icon) in the menu bar.
syntheticin the search bar at the top of the screen.
- Click Synthetic Monitoring Ping from the list of Synthetic Monitoring dashboards.
This dashboard shows details of all ping checks you have set up. You’ll see a world map with the selected probe locations for the check, plus uptime, average latency, and any error logs at the bottom of the panel.
If you have multiple ping checks set up and would like to see only one of them, select a different job in the drop-down above the world map.
View check logs
You can view the check metrics or logs directly with the Grafana Explore feature if you are using Grafana 6.0 or later.
- Click Explore (compass icon) in the left menu bar.
- Choose your Loki data source from the top left drop-down list.
- In the query bar, next to Log labels, enter
- Click Run Query in the upper right corner, or press Shift+Enter.
You will see the logs collected for all ping checks. See the Loki LogQL documentation if you want to query the logs deeper.
We also include log panel in each check type dashboard
See the Checks page to get an overview of other types of checks and additional things you can do with Synthetic Monitoring.
Related Grafana Cloud resources
How to set up and visualize synthetic monitoring at scale with Grafana Cloud
Learn how to use Kubernetes, Grafana Loki, and Grafana Cloud’s synthetic monitoring feature to set up your infrastructure's checks in this GrafanaCONline session.
Using Grafana Cloud to drive manufacturing plant efficiency
This GrafanaCONline session tells how Grafana helps a 75-year-old manufacturing company with product quality and equipment maintenance.