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 hashes)

Uploaded Source

Built Distribution

synology_abfb_log_parser-0.3.0-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

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