Synology Active Backups for Business log parser
synology_abfb_log_parser parses the Synology Active Backups for Business logs on the agent allowing and provides a way to search the logs. The examples show how to send a TRMM alert for various log entries.
Events
Events have the following structure. Given this log entry:
Nov 25 22:12:34 [INFO] async-worker.cpp (56): Worker (0): get event '1: routine {"subaction": "heart_beat"}', start processing
The events returned will be like this:
events[0] = {
"datetime": "datestamp.datestamp class",
"timestamp": "Nov 25 22:12:34",
"priority": "INFO",
"method_name": "async-worker.cpp",
"method_num": "56",
"message": "Worker (0): get event '1: routine {\"subaction\": \"heart_beat\"}', start processing",
"json": {
"subaction": "heart_beat"
},
}
A simple script to print all ERRORs in the last 3 hours.
import datetime
import synology_abfb_log_parser
after = datetime.timedelta(**{"hours": 3})
find = {
'priority': 'ERROR',
}
synology = synology_abfb_log_parser.abfb_log_parser.ActiveBackupLogParser(
after=after,
)
synology.load()
found = synology.search(find=find)
print(found)
Release files for synology-abfb-log-parser 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| synology_abfb_log_parser-0.3.0.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| synology_abfb_log_parser-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.7 kB
Release files / synology_abfb_log_parser-0.3.0.tar.gz
| Download URL | synology_abfb_log_parser-0.3.0.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3b36cfe53b7d0abb8bd508f88a7ba687bb7d32c39639436fbb8153d037965ac
|
|
BLAKE2b-256 checksum How to use checksums |
69d6fdc3f8b15e21f4952034b5d53e9f1235c8bb3e8ca34c9d57bcacc836937c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.14
|
Release files / synology_abfb_log_parser-0.3.0-py3-none-any.whl
| Download URL | synology_abfb_log_parser-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3b819525243b5fd4181b4bcbb22a3951b6a752606a703064c47a01dd11fc37c
|
|
BLAKE2b-256 checksum How to use checksums |
ad43b3a41f4012c12e50f74d740ca666dfc77c5d241db8f5b2bd736b1844f299
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.14
|