Menu
Grafana Cloud

Create your first check

This tutorial shows how to get started with Synthetic Monitoring by creating a check, and visualizing the data that’s collected from a test execution.

In this tutorial you will:

  • Create a ping check
  • Visualize your check dashboard
  • Inspect logs created from your test executions

Before you begin

To create your first Synthetic Monitoring check, you must have the following:

Note

This tutorial uses the test-api.k6.io service, which is a public shared environment. You can use it and follow along this tutorial, or you can use a service that you own. The test-api.k6.io service is also open source if you’d like to deploy a private instance.

Create a ping check

To set up your first check, you can ping a target system to see if it’s reachable by sending a network packet to the host and waiting for a response. That’s the simplest check for system availability.

To create a ping check:

  1. Log in to your Grafana instance.
  2. On the left-side menu, select Testing & synthetics > Synthetics.
  3. Click Initialize the plugin if this is your first time using Synthetics.
  4. Click Create a check or Add new check.
  5. Choose Ping as your check type under the supported protocols on the API Endpoint card.
  6. In the New API Endpoint check page, you’ll see five steps.
    1. In the Request step:
      1. Enter a Job name.
      2. Enter test-api.k6.io for the Request target.
      3. Click Execution in the sidebar to go the last step.
    2. In the Execution step:
      1. Select the Probe locations to test from, or click All to test from all locations.
      2. You can leave the Frequency parameter with its default value.
      3. Click Submit to create your check.

After your click Submit, you’ll see the Checks page with your check added to the list. Synthetic Monitoring starts executing your check with the frequency you configured, and the Uptime, Reachability, and Latency fields will show information after it has been executed a few times.

View a check’s dashboard

To view the dashboard for the check you just created:

  • From the Checks page, click View dashboard on the check card.

The check dashboard includes a few different panels, such as Uptime, Reachability, Average latency, Error rate by probe, and Logs for failed checks. You can also filter out the dashboard information by using the probe and the time picker.

If you have set up alerts for a check, you can also use the Alerts firing and alerts pending toggles to overlay alert information on the dashboard.

For each panel, you can also hover over it, click the menu icon, and select Explore or Copy JSON to copy the panel to your own dashboards. Refer to Create a dashboard for more details.

View check logs

You can view the check metrics or logs by using the Grafana Explore feature.

  1. Click Explore on the left-side menu.
  2. Choose your Loki data source from the data source picker drop-down list. The data source name follows the naming convention grafana-cloud-INSTANCE_NAME-logs.
  3. Under Label filters, select check_name as the label, and select ping as the value.
  4. Click Run query, or press Shift+Enter.

You’ll see a panel with the logs collected for all ping checks in your Grafana instance.

The logs can be useful if you want to see more detailed information about how your check behaves, whether it’s passing or failing, or if you want to create a custom panel with specific filter options.

Refer to the Loki LogQL documentation if you want to customize the query you’re using.

Next steps

With a check created, you can:

  • Refer to Check types to get an overview of other types of checks and additional things you can do with Synthetic Monitoring.
  • Refer to Synthetic Monitoring alerting to learn how to create an alert and be notified in case your check fails.