Monitoring
No credit card required
Monitoring
No credit card required
This actor monitors your actors' statuses, validates their datasets' data, and displays useful information in an interactive dashboard. And if something happens, you'll get notified via email or Slack.
Do you want to learn more about this Actor?
Get a demoYou can access the Monitoring programmatically from your own JavaScript applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4// Replace the '<YOUR_API_TOKEN>' with your token
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9// Prepare Actor input
10const input = {
11 "dashboardStatisticsFrequency": "Every day at noon",
12 "validationCheckOptions": `/* global ow */
13 // The `ow` variable represents the ow validation variable. More at https://sindresorhus.com/ow/index.html
14 [
15 {
16 filter: "us", // matches all targets with "us" pattern
17 minItemCount: 5000,
18 schema: {
19 url: ow.string.url,
20 description: ow.string,
21 },
22 },
23 {
24 Ids: ["A1b2C3d4", "B1A2d45"], // matches 2 targets with specific IDs
25 schema: {
26 itemId: ow.number,
27 region: ow.string,
28 },
29 },
30 ]`,
31 "validationCheckFrequency": "Per run",
32 "duplicationCheckFrequency": "Per run"
33};
34
35// Run the Actor and wait for it to finish
36const run = await client.actor("apify/monitoring").call(input);
37
38// Fetch and print Actor results from the run's dataset (if any)
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Monitoring API in JavaScript
The Apify API client for JavaScript is the official library that allows you to use Monitoring API in JavaScript or TypeScript, providing convenience functions and automatic retries on errors.
Install the apify-client
npm install apify-client
Other API clients include:
Actor Metrics
4 monthly users
-
13 stars
50% runs succeeded
Created in Jul 2020
Modified 6 months ago