Skip to main content

Reads RabbitMQ, reads Graylog+ElasticSearch JSON dumps.

Writes daily/hourly logs files to OpenStack Swift.

Encrypts data on the fly using qpress (.qz1) and GnuPG.

Why? Organised long term storage of logs.

Output file format

Time is duplicated in the file, as the datetime is taken from the JSON object. The compression will take care of excess size:

2020-01-25T00:00:12.217000Z: {"some": "json", "dict": "..."}
2020-01-25T00:00:12.496000Z: {"another": "json", "object": "..."}
...

Target file names will look like:

example-swift-container-2020/example.rabbit.queue/2020/05/31/
  example.rabbit-queue_2020-05-25T00:00:00Z+3600-0x72272_keyid.qz1.gpg

Which means:

  • the target container is example-swift-container-2020;

  • the source queue is example.rabbit.queue;

  • the first message is after 2020-05-25, at 00:00:00 (UTC);

  • the last message is before that time +3600 (i.e. one hour later);

  • there are no late message (-0);

  • the file contains 72272 lines (records).

  • keyid may describe which node this was produced on, and a short identifier which symmetric gpg key was used.

So, if you’re looking for old records, you can:

  • find all files in the right period (also check nearby files with -N-times);

  • fetch, decrypt and decompress the files;

  • scan the lines by the consistently formatted timestamps.

TODO

  • Add commands, so we can do ‘ls’ and ‘get’ and ‘post’ on the archived files. (Use argparse.)

  • Add sample ini-file.

  • Fix suffix (split node-X and keyname).

  • Add Immutable middleware to Swift so we can make it harder to accidentally delete stored logs.

  • Don’t forget about chmod 600 in swiftbunny.ini and chmod 700 on /var/spool/swiftbunny.

Metadata

Release files for swiftbunny 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swiftbunny 1.1
File Size Uploaded
swiftbunny-1.1.tar.gz 30.4 kB Details

Release files / swiftbunny-1.1.tar.gz

Download URL swiftbunny-1.1.tar.gz
Size 30.4 kB
Tags Source
SHA-256 checksum
How to use checksums
849f9fc77e9dc109c07a1a0f7732650b6f6d3986e211920cd4cb65f781ca9ce3
BLAKE2b-256 checksum
How to use checksums
04904a3b015a73a771fc6eaf73f1b18543d006899050e457d2bf5fa17066c9d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/37.0.0 requests-toolbelt/0.8.0 tqdm/4.19.4 CPython/2.7.17

Release history Release notifications | RSS feed

This release

1.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page