Monitoring avatar
Monitoring
Try for free

No credit card required

View all Actors
Monitoring

Monitoring

apify/monitoring
Try for free

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.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn mode

Node.js

Python

curl

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "dashboardStatisticsFrequency": "Every day at noon",
11    "validationCheckOptions": `/* global ow */
12        // The `ow` variable represents the ow validation variable. More at https://sindresorhus.com/ow/index.html
13         [
14            {
15                filter: "us", // matches all targets with "us" pattern
16                minItemCount: 5000,
17                schema: {
18                    url: ow.string.url,
19                    description: ow.string,
20                },
21            },
22            {
23                Ids: ["A1b2C3d4", "B1A2d45"], // matches 2 targets with specific IDs
24                schema: {
25                    itemId: ow.number,
26                    region: ow.string,
27                },
28            },
29        ]`,
30    "validationCheckFrequency": "Per run",
31    "duplicationCheckFrequency": "Per run"
32};
33
34(async () => {
35    // Run the Actor and wait for it to finish
36    const run = await client.actor("apify/monitoring").call(input);
37
38    // Fetch and print Actor results from the run's dataset (if any)
39    console.log('Results from dataset');
40    const { items } = await client.dataset(run.defaultDatasetId).listItems();
41    items.forEach((item) => {
42        console.dir(item);
43    });
44})();
Developer
Apify logo Maintained by Apify
Actor metrics
  • 6 monthly users
  • 63.6% runs succeeded
  • Created in Jul 2020
  • Modified 7 months ago
Categories

You might also like these Actors