Monitoring Runner avatar
Monitoring Runner
Try for free

No credit card required

View all Actors
Monitoring Runner

Monitoring Runner

apify/monitoring-runner
Try for free

No credit card required

The monitoring runner is a part of the Apify Monitoring Suite (apify/monitoring). See its readme for more information and how to use this.

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

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    "limit": 1000,
9    "checkersInput": {
10        "RESOURCE_STATS_CHECKER": {},
11        "DEDUPLICATION_CHECKER": { "uniqueKey": "email" },
12        "SCHEMA_VALIDATOR_CHECKER": { "options": [{
13                    "resourceList": [
14                        "id",
15                        "id",
16                    ],
17                    "resourceRegex": "",
18                    "minItemCount": 100,
19                    "maxItemCount": 5000,
20                    "validationSchema": "{ address: String, open: Boolean }",
21                }] },
22    },
23    "reportersInput": {
24        "EMAIL_REPORTER": { "sendMailInput": {
25                "to": "info@apify.com",
26                "subject": "My monitoring task report",
27            } },
28        "SLACK_REPORTER": { "slackInput": {
29                "token": "Your token",
30                "message": "Hey, look what I have done!",
31                "channel": "#monitoring",
32            } },
33        "DASHBOARD_REPORTER": { "notifyOnUpdate": True },
34    },
35}
36
37# Run the Actor and wait for it to finish
38run = client.actor("apify/monitoring-runner").call(run_input=run_input)
39
40# Fetch and print Actor results from the run's dataset (if there are any)
41for item in client.dataset(run["defaultDatasetId"]).iterate_items():
42    print(item)
Developer
Apify logo Maintained by Apify
Actor metrics
  • 34 monthly users
  • 97.0% runs succeeded
  • Created in Aug 2020
  • Modified over 1 year ago
Categories

You might also like these Actors