Exploring Technical Aspects: Integrating Atera's PSA and RMM Suite with Acronis Cyber Cloud

Acronis
Acronis Cyber Disaster Recovery

Managed service providers (MSPs) are busier than ever. They’re responsible for managing and protecting an ever-growing amount of data, applications, and systems for their clients in locations that span the data center to the edge and increasingly remote home offices. Historically, this level of automation and integration was not available or required complex projects, software and custom development.

That changed today when Acronis and Atera announced an integration of their popular MSP solutions. Atera, a fast-growing provider of remote monitoring and management (RMM) and professional services automation (PSA) solutions, now offers native integration with Acronis Cyber Backup Cloud. This enables MSPs to seamlessly automate the deployment and management of backup and cyber protection operations with their full set of managed services.

The turn-key integration of Acronis and Atera solutions will help MSPs achieve greater operational efficiency, giving more time to engage with their clients rather than focusing on deployments, service desk tickets, etc. them

Thus, the key part of integration is the monitoring capabilities. In the following tutorial let’s look, how Acronis Cyber Platform API provides enhanced capabilities to support such use cases.

The Acronis Cyber Platform API provides the following entities to support monitoring processing:

  • Tasks
  • Activities
  • Alerts

A task is a set of actions to be performed by the Acronis Cyber Protection at a certain time or event at a client or in the cloud.

An activity is an action performed for achievement of some user goal. Examples: backing up, recovery, exporting a backup, cataloging a vault. An activity may be initiated by a user or by the software itself. Execution of a task always causes one or more activities. Activity is a consistent set of actions accomplishing some finite and well-defined goal.

An alert is an a message with different types from the Acronis Cyber Protection with different level of severity (form warning to critical) connected to the protection routines.

Accessing information regarding all these entities provides a full picture of what happens with protected devices. So let’s look at how we can build the foundation for a simple weekly dashboard with the possibility to drill down to details.

Let’s start from tasks. Imagine, that we want to show completed tasks breakdown to successfully completed, completed with errors and completed with warnings.

At first, we need to have an authorization token to access the API. You can find how to do it in our previous blog posts, e.g. API with Python Quick Start.

As soon as we have an authorization token access_token and base_url to use in calls we can use the following Python code to receive all completed tasks for the last 7 days for a tenant of an API Client was issued as well all the subtenants.

# Create an acceptable date for tasks filtering

last_week = datetime.today() - timedelta(days=7)

filters = {

'completedAt': f'gt({last_week.strftime("%Y-%m-%dT00:00:00Z")})'

}

# Request for all tasks, which were completed last 7 days

response = requests.get(

f'{base_url}api/task_manager/v2/tasks',

auth=BearerAuth(access_token),

params=filters,

headers={"User-Agent": "ACP 1.0/Acronis Cyber Platform Python Examples"}

)

In our case for this demo we suppose that there are not a lot of tasks so we won’t implement paging and the use of filtering of JSON results at the client side.

if response.ok:

# Filter JSON to create 3 lists

# Successfully Completed Tasks

completed_ok_tasks = [

task for task in response.json()["items"]

if (

task["state"] == "completed"

and

task["result"]["code"] == "ok"

)

]

# Filter JSON to create 3 lists

# Tasks Completed with Error

completed_error_tasks = [

task for task in response.json()["items"]

if (

task["state"] == "completed"

and

task["result"]["code"] == "error"

)

]

# Filter JSON to create 3 lists

# Tasks Completed with Warning

completed_warning_tasks = [

task for task in response.json()["items"]

if (

task["state"] == "completed"

and

task["result"]["code"] == "warning"

)

]

So now we have 3 lists:

Tasks Completed with Warning

Tasks Completed with Error

Successfully Completed Tasks

The list can be used for drilldown or auto-create support tickets etc. And we can quickly calculate number of Errors, Warnings and Successful tasks.

print(f'Successful: {len(completed_ok_tasks)}')

print(f'Errors: {len(completed_error_tasks)}')

print(f'Warnings: {len(completed_warning_tasks)}')

Successful: 98

Errors: 2

Warnings: 0

We can also use the same approach for activities to receive all completed tasks for the last 7 days for a tenant of an API Client was issued as well all the subtenants.

# Create an acceptable date for tasks filtering

last_week = datetime.today() - timedelta(days=7)

filters = {

'completedAt': f'gt({last_week.strftime("%Y-%m-%dT00:00:00Z")})'

}

# Request for all activities, which were completed last 7 days

response = requests.get(

f'{base_url}api/task_manager/v2/activities',

auth=BearerAuth(access_token),

params=filters,

headers={"User-Agent": "ACP 1.0/Acronis Cyber Platform Python Examples"}

)

In our case for the demo we suppose that there are not a lot of activities so we won’t implement paging and use filtering of JSON results at client side.

if response.ok:

# Filter JSON to create 3 lists

# Successfully Completed Activities

completed_ok_activities = [

activity for activity in response.json()["items"]

if (

activity["state"] == "completed"

and

activity["result"]["code"] == "ok"

)

]

# Filter JSON to create 3 lists

# Activities Completed With Error

completed_error_activities = [

activity for activity in response.json()["items"]

if (

activity["state"] == "completed"

and

activity["result"]["code"] == "error"

)

]

# Filter JSON to create 3 lists

# Activities Completed With Warning

completed_warning_activities = [

activity for activity in response.json()["items"]

if (

activity["state"] == "completed"

and

activity["result"]["code"] == "warning"

)

]

So now we have 3 lists:

Activities Completed with Warning

Activities Completed with Error

Successfully Completed Activities

The list can be used for drilldown or auto-create support tickets etc. And we can quickly calculate the number of Errors, Warnings and Successful activities.

print(f'Successful: {len(completed_ok_activities)}')

print(f'Errors: {len(completed_error_activities)}')

print(f'Warnings: {len(completed_warning_activities)}')

Successful: 22

Errors: 0

Warnings: 0

With alerts we will use the same approach. The only difference is accepted time format, which is unix timestamp.

last_week = (datetime.today() - timedelta(days=7)).replace(hour=0, minute=0, second=0, microsecond=0)

# Unix Time in nanoseconds (1 billionth of a second)

last_week = last_week.replace(tzinfo=timezone.utc).timestamp()*1000000

filters = {

'updated_at': f'gt({int(last_week)})'

}

# Request for all alerts, which were updated last 7 days

response = requests.get(

f'{base_url}api/alert_manager/v1/alerts',

auth=BearerAuth(access_token),

params=filters,

headers={"User-Agent": "ACP 1.0/Acronis Cyber Platform Python Examples"}

)

In our case for the demo we suppose that there are not a lot of alerts so we won’t implement paging and use filtering of JSON results at client side.

if response.ok:

# Filter JSON to create 3 lists

# Warnings

warning_alerts = [

alert for alert in response.json()["items"]

if (

alert["severity"] == "warning"

)

]

# Filter JSON to create 3 lists

# Errors

error_alerts = [

alert for alert in response.json()["items"]

if (

alert["severity"] == "error"

)

]

# Filter JSON to create 3 lists

# Critical

critical_alerts = [

alert for alert in response.json()["items"]

if (

alert["severity"] == "critical"

)

]

So now we have 3 lists:

Warnings alerts

Errors alerts

Critical alerts

The list can be used for drilldown or auto-create support tickets etc. And we can quickly calculate the number of Errors, Warnings and Critical alerts.

print(f'Critical: {len(critical_alerts)}')

print(f'Errors: {len(error_alerts)}')

print(f'Warnings: {len(warning_alerts)}')

Critical: 0

Errors: 0

Warnings: 6

Summary

Now you know how to use our Tasks, Activities and Alerts API, to enable monitoring support.

Start today, register on the Acronis Developer Portal and see the code samples available

Contact our team through the feedback/request form on the Acronis Developer Portal

Review solutions available in the Acronis Cyber Cloud Solutions Portal

About Acronis

A Swiss company founded in Singapore in 2003, Acronis has 15 offices worldwide and employees in 50+ countries. Acronis Cyber Protect Cloud is available in 26 languages in 150 countries and is used by over 20,000 service providers to protect over 750,000 businesses.