We're excited to introduce Check-ins, our no-fuss solution to monitoring your scheduled jobs and continuous processes.
AppSignal Check-ins allow you to seamlessly monitor the scheduling, run times, and health of your scheduled jobs and processes, with a simple setup using helpers or API endpoints.
In this post, we'll introduce you to the new Check-ins feature and show you how to start monitoring your app's background processes with AppSignal.
Eliminate Blind Spots with Check-ins
You can use Check-ins to answer common questions like:
- Did my scheduled job run on time?
- How long did it take for my scheduled job to run?
- Did my cron job fail?
- Are my background processes running as expected?
- How often does my background process/scheduled job run?
AppSignal provides instant occurrence-level insights into your scheduled jobs and can notify you when a job fails to run, runs off schedule, or exceeds its max runtime, eliminating blind spots and helping you proactively manage your scheduled jobs.
One Overview for All Your Check-ins
Check-ins provide a straightforward overview of all your scheduled jobs and continuous processes, including the latest failure, success, and status of the most recent occurrence.
Occurrence-Level Check-In Insights for Deep Debugging
Each Check-in has a summary showing the status and duration of the last five successful and failed occurrences.
You can also view all occurrences for a Check-in and dive deeper into individual occurrences to inspect their performance.
Receive Notifications if a Job Fails or Runs Off Schedule
AppSignal notifies you if a scheduled job or continuous process encounters an issue using your preferred communication channel, such as Slack, Discord, or Microsoft Teams, helping you quickly resolve issues and ensuring your scheduled jobs and background processes run smoothly.
Collaborate with Team Members or Leave Messages for Your Future Self
Each Check-in has its own Logbook, which you can use to share status updates during investigations into failing occurrences, add important contextual insights, communicate with teammates, or leave messages for your future self.
Create Your First Check-in with Just Two Steps
AppSignal makes monitoring your scheduled jobs and background processes easy with its simple setup. Each of our integrations comes with handy helpers, or you can alternatively send Check-in data to our API.
Before getting started, make sure your AppSignal integration is up to date. Check-ins work in the following integration versions and higher:
- AppSignal for Ruby version 3.13.0
- AppSignal for Elixir version 2.12.2
- AppSignal for Node.js version 3.4.9
- AppSignal for Python version 1.3.8
More detailed release information can be found in our Changelog.
Step One: Create Your Check-In
To get started, go to the Check-in feature in AppSignal and set up your first Check-in. For scheduled jobs, choose a Cron Check-in, and for continuous processes, select a Heartbeat Check-in.
You'll need to give your Check-in a name and provide us with your server's time zone. If you're monitoring a scheduled job, we'll need to know its cron syntax, too.
Once you've created your Check-in, you'll need to implement it in your codebase with one of our helpers or API calls.
Step Two: Configure Your Code
To keep configuration simple, we recommend using our helpers to send Check-in data to AppSignal.
The helper and API endpoints you'll need to use will vary depending on whether you've created a Cron
or Heartbeat Check-in
.
Setting Up Cron Check-ins for Scheduled Job Monitoring
AppSignal's Check-in helpers allow you to report the completion of a scheduled job or, if you want to monitor a job's actual runtime, the start and finish of a scheduled job.
The code samples below demonstrate how to use Check-ins to report the start and finish of a scheduled job. Remember, some integrations may require you to import these Check-in helpers before calling them.
def send_invoices do Appsignal.CheckIn.cron("send_invoices", fn -> # ... your code here ... end) end
// Don't forget to import the `checkIn` helpers: import { checkIn } from "@appsignal/nodejs"; function sendInvoices() { checkIn.cron("send_invoices", () => { // ... your code here ... }); } // If the function passed to `cron` returns a promise, the finish event // will be reported to AppSignal if the promise resolves, allowing you // to track the duration of async functions: import { checkIn } from "@appsignal/nodejs"; async function sendInvoices() { await checkIn.cron("send_invoices", async () => { // ... your async code here ... }); } // If the promise is rejected, or if it never resolves, the finish event // will not be reported to AppSignal.
# Don't forget to import the `cron` helper function from the # `appsignal.check_in` module. from appsignal.check_in import cron def send_invoices(): # ... your code here ... cron("send_invoices", send_invoices)
def send_invoices() Appsignal::CheckIn.cron("send_invoices") do # ... your code here ... end end
Alternatively, you can send Check-in data to the following API endpoint:
https://appsignal-endpoint.net/check_ins/cron
Here is an example of a Cron
Check-in API request that lets AppSignal know a process has finished. More detailed technical instructions can be found in our Check-ins documentation.
curl -D - -X POST -G 'https://appsignal-endpoint.net/check_ins/cron' \ -d 'api_key=YOUR-APP-LEVEL-API-KEY' \ -d 'identifier=YOUR-CHECK-IN-IDENTIFIER'
POST https://appsignal-endpoint.net/check_ins/cron ?api_key=YOUR-APP-LEVEL-API-KEY &identifier=YOUR-CHECK-IN-IDENTIFIER
Setting Up Heartbeat Check-ins for Continuous Process Monitoring
Like our Cron Check-ins, AppSignal's integrations come with handy helpers for sending Heartbeats to AppSignal. These helpers will wrap around your process and send regular Heartbeat Check-ins to AppSignal; depending on your integration, you may need to import these helpers before calling them.
loop do Appsignal::CheckIn.heartbeat("job_processor") # ... your code here ... end
def job_processing_loop do Appsignal.CheckIn.heartbeat("job_processor") # ... your code here ... job_processing_loop() end
// Don't forget to import the `checkIn` helpers: import { checkIn } from "@appsignal/nodejs"; while (true) { checkIn.heartbeat("job_processor"); // ... your code here ... }
We're working on expanding Heartbeat helper support to our Python integration.
To send Heartbeats continuously, you can pass the { continuous: true }
option to the Heartbeat helper method. Passing the continuous option will send a heartbeat to AppSignal every thirty seconds and allow you to monitor the lifetime of a process.
Appsignal::CheckIn.heartbeat("job_processor", continuous: true)
# This will spawn a new Elixir process, linked to the current process. # If the current process exits, the heartbeat process will also exit. Appsignal.CheckIn.heartbeat("job_processor", continuous: true) # It is also possible to add a continuous heartbeat sending process # to a supervision tree. This will ensure that the process is restarted # alongside the rest of the supervised children. Supervisor.start_link([ {Appsignal.CheckIn.Heartbeat, "my_application"}, # ... other children processes ... ], strategy: :one_for_one)
// Don't forget to import the `checkIn` helpers: import { checkIn } from "@appsignal/nodejs"; checkIn.heartbeat("job_processor", { continuous: true });
Alternatively, you can send Check-in data to the following API endpoint:
https://appsignal-endpoint.net/check_ins/heartbeat
Here is an example of a Heartbeat
Check-in API request. More detailed technical instructions can be found in our Check-ins documentation.
curl -D - -X POST -G 'https://appsignal-endpoint.net/check_ins/heartbeat' \ -d 'api_key=YOUR-APP-LEVEL-API-KEY' \ -d 'identifier=YOUR-CHECK-IN-IDENTIFIER'
POST https://appsignal-endpoint.net/check_ins/heartbeat ?api_key=YOUR-APP-LEVEL-API-KEY &identifier=YOUR-CHECK-IN-IDENTIFIER
Start Monitoring Scheduled Jobs and Processes Today with Check-ins
AppSignal Check-ins provide developers with a powerful, straightforward way to eliminate blind spots and optimize background jobs and processes. Whether you choose our handy helper methods or prefer sending data via our easy-to-use API endpoints, you can start monitoring within minutes.
Integrated seamlessly into AppSignal's comprehensive monitoring toolkit, which includes Error Tracking, Uptime Monitoring, Log Management, and more, Check-ins are available to all customers on all plans.
With our 30-day free trial and easy-to-use installation wizard, you can start sending metrics to AppSignal faster than it takes to drink a cup of coffee. Plus, if you send us an email, we'll even send you delicious stroopwafels!