Monitoring Runner
Try for free
No credit card required
View all Actors
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.
Do you want to learn more about this Actor?
Get a demoThe 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 "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)
41print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
42for item in client.dataset(run["defaultDatasetId"]).iterate_items():
43 print(item)
44
45# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start
Developer
Maintained by Apify
Actor metrics
- 39 monthly users
- 14 stars
- 97.2% runs succeeded
- Created in Aug 2020
- Modified 3 months ago
Categories