No SNMP, no log files. How to monitor ?

- Log in to post comments

Hi Michael,
The structure of the outputs for the "alerts" script includes each new alert in separate section defined by [ ]. Example output of single alert (acropsh list_alerts.py > output.txt) with my comments bolded below:
=========
[ Start of new alert record
('.DmlTimeStamp', 'sqword', 175),
('.ID', 'guid', '133C250E-4FA2-B023-5F53-293C36ACB42B'), ID of the alert
('.ID^PrimaryKey', 'nil', None),
('.ID^Type', 'string', 'Alerts::Object'),
('.Meta.ActivityID', 'guid', '7B380DE2-253D-43FC-91D2-3B73C5287351'),
('.Meta.ActivityName', 'string', 'Preparing for backup of virtual machine'),
('.Meta.BackupLocations', 'array', [
#0 Number of the backup location used in the backup plan which triggered the alert (#0 for first location #X for X location)
[
('.DisplayName', 'string', 'DedupLocation2'), Name of the backup location (since this alert is from backup activity)
('.Type', 'string', 'storage_node'), Type of the backup location (Acronis Storage Node in this example)
],
### Separator between the sections (here: between backup location decription and backup sources description)
]),
('.Meta.BackupLocations^IsContainer', 'string', 'vector'),
('.Meta.BackupSources', 'array', [
#0
[
('', 'string', '[Disk 1]'), Source for the backup
],
#1
[
('', 'string', 'D:\\'), Source for the backup
],
###
]),
('.Meta.BackupSources^IsContainer', 'string', 'vector'),
('.Meta.BackupSourcesType', 'dword', 2),
('.Meta.FinishTime', 'sqword', 1518505335),
('.Meta.InstanceID', 'guid', '503AECF4-EBB7-FB7D-E8F0-413F1CB28ABE'),
('.Meta.MachineName', 'string', 'esx_win7_x64_uefi'),
('.Meta.PlanID', 'guid', '763DC576-FE45-4E99-9009-4435499F6BAF'),
('.Meta.PlanName', 'string', 'Disks/volumes to DedupLocation2'),
('.Meta.StartTime', 'sqword', 1518505299), Timestamp in Unix time format - Start time of the activity of the alert
('.Meta.Time', 'sqword', 1518505336),
('.Meta.Warning', 'error', ('''
Error 0xbd08b1: The virtual machine may be backed up without using Changed Block Tracking (CBT) because the machine has snapshots. For the details, see https://kb.vmware.com/s/article/1020128
| To avoid this warning, either disable CBT in the backup options or delete the snapshots.
| line: 0x28314c961de7d5ab
| file: e:\99\enterprise\migration\impl\manager_vmbackup.cpp:2236
| function: `anonymous-namespace'::VMStateChecker::WarnCbtMayNotBeUsed
| $module: disk_bundle_vsa64_9010
''', Text of the alert
'AbEIvQCr1ecdlkwxKFRoZSB2aXJ0dWFsIG1hY2hpbmUgbWF5IGJlIGJhY2tlZCB1cCB3aXRob3V0IHVzaW5nIENoYW5nZWQgQmxvY2sgVHJhY2tpbmcgKENCVCkgYmVjYXVzZSB0aGUgbWFjaGluZSBoYXMgc25hcHNob3RzLiBGb3IgdGhlIGRldGFpbHMsIHNlZSBodHRwczovL2tiLnZtd2FyZS5jb20vcy9hcnRpY2xlLzEwMjAxMjgKVG8gYXZvaWQgdGhpcyB3YXJuaW5nLCBlaXRoZXIgZGlzYWJsZSBDQlQgaW4gdGhlIGJhY2t1cCBvcHRpb25zIG9yIGRlbGV0ZSB0aGUgc25hcHNob3RzLgAkbW9kdWxlAEFkaXNrX2J1bmRsZV92c2E2NF85MDEwACRmaWxlAEFlOlw5OVxlbnRlcnByaXNlXG1pZ3JhdGlvblxpbXBsXG1hbmFnZXJfdm1iYWNrdXAuY3BwACRmdW5jAEFgYW5vbnltb3VzLW5hbWVzcGFjZSc6OlZNU3RhdGVDaGVja2VyOjpXYXJuQ2J0TWF5Tm90QmVVc2VkACRsaW5lAE68CAAAAAAAAAA=')), Base64 encoding of the text of the alert
('.Severity', 'dword', 1), The severity of the alert: 1=warning, 2=error, 3=critical
('.SourceTimeStamp', 'sqword', 367422),
('.Tenant.ID', 'string', '00000000-0000-0000-0000-000000000000'),
('.Tenant.Locator', 'string', '/00000000-0000-0000-0000-000000000000/'),
('.Type', 'string', 'ActivityFinishedWithWarnings'),
('^Is', 'string', 'Alerts::Object'),
('^Source', 'string', '5FA56246-5A99-4163-8481-0206BC2D40D5'),
]
=========
I'm though not sure what you mean under "which datatypes are supported". Please clarify if above description is not enough.
Thank you.
- Log in to post comments

Hi
Many thanks for your detailed answer! The things are getting more and more clear now.
One further question: can you please provide a list of all possible values of the attribute “Type” ('ActivityFinishedWithWarnings' in your example above) and a mapping to the human readable messages actually displayed in the web GUI (including which attributes of the alert are used for substitution in the messages)?
Thanks
Martin
- Log in to post comments

Hi Martin,
(sorry for the delayed responce).
The "Type" ('ActivityFinishedWithWarnings') attribute text is always defined by "('.Severity', 'dword', 1)" value - warning/error/critical, so the "Severity" field should be used to check the type of the alert. The human-readable texts are included into the outputs within ('.Meta.Warning', 'error', (''... value as described in my example above, though there is no such thing as attribute of the alert which can be mapped to human-readable text - the only available types of the alerts are "warning/error/critical" values.
Thank you.
- Log in to post comments

Hi Vasily,
the base64 encoded human-readable text is not always contained in the data structure of the alert and if there is such a message, it is not the same message as displayed in the web GUI but another much more detailed message (I assume a message describing the internal error of the system which actually caused the alert).
Let me try to explain my concern with an example:
Data structure of an alert returned by the script:
[ ('.DmlTimeStamp', 'sqword', 2544), ('.ID', 'guid', '90A5819A-B8A1-9503-8C09-2635D287D089'), ('.ID^PrimaryKey', 'nil', None), ('.ID^Type', 'string', 'Alerts::Object'), ('.Meta.DaysPassed', 'dword', 96), ('.Meta.InstanceID', 'guid', '29D5EA10-9D5E-494B-B315-D6438B5149B5'), ('.Meta.MachineName', 'string', 'sgd1.mty1.coam.kapschcarrier.com'), ('.Meta.PlanID', 'nil', None), ('.Meta.Time', 'sqword', 1521421224), ('.Severity', 'dword', 3), ('.Tenant.ID', 'string', '00000000-0000-0000-0000-000000000000'), ('.Tenant.Locator', 'string', '/00000000-0000-0000-0000-000000000000/'), ('.Type', 'string', 'MachineOffline30'), ('^Is', 'string', 'Alerts::Object'), ]
This alert is of the severity 3 (critical) but the data structure actually contains no meta tag with an error message.
The corresponding alert listed in the GUI is:
“Machine is offline for more than 30 days”
“There has been no connection with machine 'sgd1.mty1.coam.kapschcarrier.com' for 96 days. Backups of this machine are stopped. Please restore the connection with the machine to resume backups.”
The Type 'MachineOffline30' maps to the header of the alert and there must be some kind of a mapping of this type to a message describing the alert in more detail, but with some kind of placeholders which are replaced by the actual values of the meta data of the alert. Something like
“There has been no connection with machine '${MachineName}' for ${DaysPassed} days. Backups of this machine are stopped. Please restore the connection with the machine to resume backups.”
If I am right, I need a mapping of all possible types of alerts to the alert header and detail messages.
I need this to create the same human readable messages in our system as displayed in the web GUI of the AMS.
Best regards
Martin
- Log in to post comments

Hi Martin,
I'm checking with our developers on whether it's possible to get the list of the alert types - this might take some time, so I'll update the thread once I get more details. The human readable text is translated only on web server depending on the language selected in web console interface, so there are multiple translations of the text - I'll be looking for English ones.
Thank you.
- Log in to post comments

Hi Martin,
Please find attached a package which contains the alerts short text + ID + corresponding matching text for all languages. Let me know if there is anything missed there.
Thank you.
Attachment | Size |
---|---|
445707-145433.ZIP | 65.8 KB |
- Log in to post comments

Hi Vasily,
many thanks for this information. This was exactly what I was looking for!
I have one question concerning the language specific text files containing the actual titles and messages: as I expected, the messages contain some kind of placeholders, which are substituted by the values of the fields of the actual alert. I assume, this are the Meta.* fields of the alert for which I’m able to find the corresponding values in most of my examples.
But for example, the description of the BackupFailed alert is just defined as "{{Error.cause}}". From where can I get the actual error message. It is not contained in the alert. The value of the '.Meta.Error' field is completely different compared to the value displayed in the GUI.
Br
Martin
- Log in to post comments

Hi Martin,
Can you please post some example of the alert output you see and which text is missing (mismatches the UI) in it? Such example would really help me to properly understand what's missing/mismatched.
Thank you.
- Log in to post comments

Hi Vasily,
Please find attached the output of the script and the screenshot of the corresponding alert in the web GUI for an example of an alert of the type 'BackupFailed'. I cannot find the description of the alert 'None of the items selected for backup were found.' displayed in the GUI.
Br
Martin
Attachment | Size |
---|---|
445788-145479.txt | 7.41 KB |
445788-145480.png | 110.13 KB |
- Log in to post comments

Hi Martin,
The "None of the items selected for backup were found." is the generic cumulative header of the alert, while the text within the alerts script outputs contains the actual details (the real error). I'll check how this header is generated with our developers and will update the thread, but still you should rely on the '.Meta.Error' section of the script outputs when analyzing the alert - it contains the real error.
Thank you.
- Log in to post comments

Hi Martin,
I have confirmed with our developers that "None of the items selected for backup were found." is a cumulative text of the alert, which can be the same for different errors (different errors of the same type), so it won't be proper to rely on this text while analyzing the alert because it may hide different errors underneath. Also this text may be updated between different builds of Acronis Backup 12.5, so there are high chances that it would change in future. In other words the proper way would be to rely on error message stack posted in the alert script outputs instead of referring to the cumulative text shown on the web console GUI.
Thank you.
- Log in to post comments

Hi Vasiy,
in order to make a template to monitor Acronis backups for our nms system. Is possible for you, to share a script that enumerates the backup plans and it's properties ?
Thanks
Josep
- Log in to post comments

Hi Josep,
For customizable reports it makes sense to contact our support team for assistance. There are no ready-to-use scripts which I can provide at the moment, so it will require separate research I'm afraid (the best way is to work with our support team on this request).
Thank you.
- Log in to post comments

ok, some API than we can call like the one in the activities script that you shared ?
- Log in to post comments

Hello Vasily,
not sure you still there, I went through the thread and created a few scripts. But it seems not very reliable as some of the calls via URL gives me 'none' in values.
Machine name: None Backup plan name: None Policy name: None Start time: 2020-12-09T01:24:07Z Finish time: 2020-12-09T01:24:07Z CompletionResult: ok
I use 12.5 and need to run a script after the backups finish to report status of failed backups.
is there any progress in the API that can be utilized ? Eventually windows service monitoring the activity and creating alert ?
Vasily Semyonov wrote:Hi Josep,
For customizable reports it makes sense to contact our support team for assistance. There are no ready-to-use scripts which I can provide at the moment, so it will require separate research I'm afraid (the best way is to work with our support team on this request).
Thank you.
- Log in to post comments

Hello Martin,
thank you for posting on Acronis forums!
I recommend following Vasily's advice and contact Acronis Support Team and request help for customizing your scripts.
- Log in to post comments

Michael Windsor wrote:Hi,
Do you know which Format is this Output from your script? This would be interesting for our development to parse the Output correctly.
Thanks
Michael Windsor
Michael,
I'm playing with that and got something what I need. The following script works for me somehow. I was interested mostly on failed backup tasks which are completed. Means if there is re-try in the acronis, then system tries to start backup like 3 times until it finally show error and finish the task.
I have it for 10 days back right now, it can be changed as you need. I'm mostly interested to run script daily and check last 24hrs.
Let me know if this works for your setup. I use Windows server for AMC.
Script is not clean, it is just test/play script.
# Script start
import requests
import dateutil.parser
from datetime import datetime, timedelta
# We can't filter out activities by direct 'finish_time' filter in url, because it is not supported.
format = "%d/%m/%Y %H:%M:%S"
no = 0
r = requests.get('http:// localhost:30677/api/task_manager/v1/activities?state=completed&t…-253DCF6E17FB&order=completed_at.desc&limit=2000')
if r.status_code != requests.codes.ok:
print(r.text)
else:
activities = r.json()['items']
last_hour = datetime.utcnow() - timedelta(days=10) # The "hours" parameter defines the period for tracking activities
for activity in activities:
finish_time = dateutil.parser.parse(activity.get('finishTime')).replace(tzinfo=None)
if finish_time<last_hour:
continue
if activity.get('status')!='error':
continue
if activity.get('state')!='completed':
continue
StartT=activity.get('startTime')
FinT=activity.get('finishTime')
print(no,';',activity.get('agentName'),';',activity.get('details', {}).get('BackupPlanName'),';',activity.get('policyName'),';',StartT.replace("T", " "),';',FinT.replace("T", " "),';', activity.get('status'), end='\n')
no = no + 1
# Script end
- Log in to post comments

Dear Support Specialists,
Can you please give me advice if the Acronis Cyber Protect 15 can be monitored on this way or is there any new introduced for NBI to monitor on an nms?
Thank you in advance,
Gyorgy
- Log in to post comments

Dear Gyorgy Hepka,
Thank you for posting can you please specify what product version are you using exactly?
- Log in to post comments

Daria Sorokina wrote:Dear Gyorgy Hepka,
Thank you for posting can you please specify what product version are you using exactly?
We are using the Cyber Backup.
- Log in to post comments

Hello Gyorgy,
I believe the question meant what type of licence do you have (backup, advanced). You also mentioned both cyber protect and cyber backup, but these are separate editions. Which one do you have?
-- Peter
- Log in to post comments

Do you know which Format is this Output from your script? This would be interesting for our development to parse the Output correctly.
- Log in to post comments

I left that activity as it didn't make any sense and the effort is huge.
The easier is to let Acronis do that work - run a standard report on a daily basis with details into a CSV file and then parse CSV file on shared drive. You can schedule that as you need and then just run a simple script to parse CSV and even use API to your ticketing system. That is what I'm working on now.
- Log in to post comments