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 more

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4client = ApifyClient("<YOUR_API_TOKEN>")
5
6# Prepare the Actor input
7run_input = {
8    "dashboardStatisticsFrequency": "Every day at noon",
9    "validationCheckOptions": """/* global ow */
10// The `ow` variable represents the ow validation variable. More at https://sindresorhus.com/ow/index.html
11 [
12    {
13        filter: \"us\", // matches all targets with \"us\" pattern
14        minItemCount: 5000,
15        schema: {
16            url: ow.string.url,
17            description: ow.string,
18        },
19    },
20    {
21        Ids: [\"A1b2C3d4\", \"B1A2d45\"], // matches 2 targets with specific IDs
22        schema: {
23            itemId: ow.number,
24            region: ow.string,
25        },
26    },
27]""",
28    "validationCheckFrequency": "Per run",
29    "duplicationCheckFrequency": "Per run",
30}
31
32# Run the Actor and wait for it to finish
33run = client.actor("apify/monitoring").call(run_input=run_input)
34
35# Fetch and print Actor results from the run's dataset (if there are any)
36print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
37for item in client.dataset(run["defaultDatasetId"]).iterate_items():
38    print(item)
39
40# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start
Developer
Maintained by Apify
Actor metrics
  • 3 monthly users
  • 14 stars
  • 28.0% runs succeeded
  • Created in Jul 2020
  • Modified about 1 month ago
Categories