diff --git a/site/content/docs/heartbeat-monitors/_index.md b/site/content/docs/heartbeat-monitors/_index.md index c5d685cfb..33d3ad7e5 100644 --- a/site/content/docs/heartbeat-monitors/_index.md +++ b/site/content/docs/heartbeat-monitors/_index.md @@ -17,18 +17,16 @@ aliases: Track your scheduled jobs with Heartbeat monitors. Heartbeat monitors listen for regular pings from your automated tasks, to ensure that they are running as expected. -> Heartbeat checks are available on our [Team and Enterprise plans](https://www.checklyhq.com/pricing). +## What is a Heartbeat monitor? -## What is a Heartbeat check? - -A Heartbeat check is a passive check type that expects pings from an external source, such as a scheduled job on a server, at a defined interval. A ping is an HTTP request to a given endpoint URL using either the `GET` or `POST` method. +A Heartbeat monitor is a passive check type that expects pings from an external source, such as a scheduled job on a server, at a defined interval. A ping is an HTTP request to a given endpoint URL using either the `GET` or `POST` method. When a ping is not received on time, the check will trigger any configured alerts. -![Heartbeat check overview page](/docs/images/heartbeat-checks/heartbeat-check-overview.png) +![Heartbeat monitor overview page](/docs/images/heartbeat-checks/heartbeat-check-overview.png) -Use Heartbeat checks to monitor backup jobs, data imports, and other recurring jobs or scripts. +Use Heartbeat monitors to monitor backup jobs, data imports, and other recurring jobs or scripts. -For example, this is how you ping a Heartbeat check from a Heroku job: +For example, this is how you ping a Heartbeat monitor from a Heroku job: {{< tabs "Heroku example" >}} {{< tab "BASH" >}} @@ -40,9 +38,9 @@ curl -m 5 --retry 3 https://api.checklyhq.com/heartbeats/ping/bcd964a7-6f15-49a5 Note the retry and timeout options. We recommend enabling retries when possible, to avoid false alarms due to temporary network issues or similar. You should also specify a timeout so that the ping doesn't block your ongoing job. -## Creating a Heartbeat check +## Creating a Heartbeat monitor -![Heartbeat check create page](/docs/images/heartbeat-checks/create-heartbeat-check.png) +![Heartbeat monitor create page](/docs/images/heartbeat-checks/create-heartbeat-check.png) ### Name and tag A meaningful name will not only help you and others identify your checks within Checkly, but it will help provide a better alerting experience if your checks fall into an alert state. @@ -61,9 +59,9 @@ Grace is the amount of time Checkly will wait before triggering any alerts when Use grace to compensate for variance in your jobs. ### Alerting -You can configure any of the provided [alert channels](/docs/alerting-and-retries/alert-channels/) for a Heartbeat check. If we don’t provide your preferred alert method, use [webhooks](/docs/alerting-and-retries/webhooks/) to configure your alert flow. +You can configure any of the provided [alert channels](/docs/alerting-and-retries/alert-channels/) for a Heartbeat monitor. If we don’t provide your preferred alert method, use [webhooks](/docs/alerting-and-retries/webhooks/) to configure your alert flow. -## Pinging your Heartbeat check +## Pinging your Heartbeat monitor Once you've created your check, configure your scheduled job to send an HTTP request to your check's ping URL. For examples of how to do this, see [ping examples](/docs/heartbeat-checks/ping-examples). @@ -81,7 +79,7 @@ You can manually send pings via the Checkly UI. Use this to start the check time ![Manually send a ping via the Checkly UI on the check overview page](/docs/images/heartbeat-checks/heartbeat-ping-overview-page.png) -"Ping now" is also available in the quick menu in your list of Heartbeat checks. +"Ping now" is also available in the quick menu in your list of Heartbeat monitors. ![Manually send a ping via the Checkly UI in the quick menu](/docs/images/heartbeat-checks/heartbeat-ping-quick-menu.png) @@ -100,14 +98,14 @@ If you have a check that expects a ping every 60 minutes starting at 09:30, and The [Checkly CLI](/docs/cli/) gives you a JavaScript/TypeScript-native workflow for coding, testing and deploying synthetic monitoring at scale, from your code base. -You can define a Heartbeat check via the CLI. For example: +You can define a Heartbeat monitor via the CLI. For example: {{< tabs "CLI example" >}} {{< tab "TypeScript" >}} ```ts {title="heartbeat.check.ts"} -import { HeartbeatCheck } from 'checkly/constructs' +import { HeartbeatMonitor } from 'checkly/constructs' -new HeartbeatCheck('heartbeat-check-1', { +new HeartbeatMonitor('heartbeat-monitor-1', { name: 'Send weekly newsletter job', period: 7, periodUnit: 'days', @@ -119,9 +117,9 @@ new HeartbeatCheck('heartbeat-check-1', { {{< /tab >}} {{< tab "JavaScript" >}} ```js {title="heartbeat.check.js"} -const { HeartbeatCheck } = require('checkly/constructs') +const { HeartbeatMonitor } = require('checkly/constructs') -new HeartbeatCheck('heartbeat-check-1', { +new HeartbeatMonitor('heartbeat-monitor-1', { name: 'Send weekly newsletter job', period: 7, periodUnit: 'days', @@ -142,4 +140,4 @@ For more options, see the [Check construct reference](/docs/cli/constructs-refer ## Next steps - Learn about the benefits of [Monitoring as Code](/guides/monitoring-as-code/). -- Interpret your [Heartbeat check results](/docs/monitoring/check-results/#heartbeat-check-results). \ No newline at end of file +- Interpret your [Heartbeat monitor results](/docs/monitoring/check-results/#heartbeat-check-results). \ No newline at end of file diff --git a/site/content/docs/heartbeat-monitors/ping-examples.md b/site/content/docs/heartbeat-monitors/ping-examples.md index cab655f0a..58d4a8966 100644 --- a/site/content/docs/heartbeat-monitors/ping-examples.md +++ b/site/content/docs/heartbeat-monitors/ping-examples.md @@ -5,13 +5,13 @@ navTitle: Ping examples weight: 15 menu: resources: - parent: "Heartbeat checks" + parent: "Heartbeat monitors" --- -Here you can find examples on how to ping a Heartbeat check. +Here you can find examples on how to ping a Heartbeat monitor. -Most examples use `GET` as the request method, but Heartbeat checks also accept `POST` requests. Your check won't record `PUT` or `DELETE` requests as pings, and the endpoint will return an error. +Most examples use `GET` as the request method, but Heartbeat monitors also accept `POST` requests. Your check won't record `PUT` or `DELETE` requests as pings, and the endpoint will return an error. ## Shell Adding a ping to a shell script only requires a single line. @@ -71,7 +71,7 @@ spec: ## Node.js -You can use any HTTP request library (`https`, `axios`, etc.) to ping your Heartbeat check. +You can use any HTTP request library (`https`, `axios`, etc.) to ping your Heartbeat monitor. This is an example with the built-in [https.get](https://nodejs.org/api/https.html#httpsgeturl-options-callback) package: @@ -146,7 +146,7 @@ axios.get('https://ping.checklyhq.com/87c05896-3b7d-49ae-83ff-5e81323a54c4') ## Vercel cron jobs -You can monitor your [Vercel cron jobs](https://vercel.com/docs/cron-jobs) with Heartbeat checks. At the end of your cron job, make an HTTP `GET` or `POST` request to your ping URL. For example, using `fetch()`: +You can monitor your [Vercel cron jobs](https://vercel.com/docs/cron-jobs) with Heartbeat monitors. At the end of your cron job, make an HTTP `GET` or `POST` request to your ping URL. For example, using `fetch()`: {{< tabs "Vercel example" >}} {{< tab "Next.js (App Router)" >}}