Skip to main content

Synology Active Backup for Business log parser

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synology_abfb_log_parser-0.3.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file synology_abfb_log_parser-0.3.0.tar.gz.

File metadata

File hashes

Hashes for synology_abfb_log_parser-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f3b36cfe53b7d0abb8bd508f88a7ba687bb7d32c39639436fbb8153d037965ac
MD5 51077f8a8258512f2a3f55a3d525d6e1
BLAKE2b-256 69d6fdc3f8b15e21f4952034b5d53e9f1235c8bb3e8ca34c9d57bcacc836937c

See more details on using hashes here.

File details

Details for the file synology_abfb_log_parser-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for synology_abfb_log_parser-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3b819525243b5fd4181b4bcbb22a3951b6a752606a703064c47a01dd11fc37c
MD5 a4fba313893f4ed651772f0f47e970e5
BLAKE2b-256 ad43b3a41f4012c12e50f74d740ca666dfc77c5d241db8f5b2bd736b1844f299

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page