Convert Linux logs to OCSF schema
Project description
logs_to_ocsf
Install
pip install logs_to_ocsf
How to use
Add sample data and run.
from logs_to_ocsf.convert_messages import *
c = Convert()
test_dir = "data/sample_logs"
test_files = ["messages.txt", "cron.txt", "secure.txt"]
for a_file in test_files:
a_json = c.log_to_ocsf(test_dir + "/" + a_file)
print(f"\nJSON in OCSF Schema from file {a_file} has this many records:")
print("-----------------------------------------------------------")
print(len(a_json))
print("-----------------------------------------------------------")
JSON in OCSF Schema from file messages.txt has this many records:
-----------------------------------------------------------
37
-----------------------------------------------------------
JSON in OCSF Schema from file cron.txt has this many records:
-----------------------------------------------------------
40
-----------------------------------------------------------
JSON in OCSF Schema from file secure.txt has this many records:
-----------------------------------------------------------
40
-----------------------------------------------------------
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
logs_to_ocsf-0.0.7.tar.gz
(8.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logs_to_ocsf-0.0.7.tar.gz.
File metadata
- Download URL: logs_to_ocsf-0.0.7.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
312617c628e0f3857f9718c54cdc20ecd10fca7c39782068afbb4108f62d3f6e
|
|
| MD5 |
1d0bf34828c35c88841ded4a89e49f03
|
|
| BLAKE2b-256 |
193b7de0b1432c6e05e19af7b2983ce6461ad16cda608dc88234a6f0ae57923c
|
File details
Details for the file logs_to_ocsf-0.0.7-py3-none-any.whl.
File metadata
- Download URL: logs_to_ocsf-0.0.7-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9588d5251c9c3e44c5e0d96c71e1bc9741a7e2a25921e8c3950639d01c84872e
|
|
| MD5 |
8aa799026b9bee385f2b0c33614a1085
|
|
| BLAKE2b-256 |
4bd01c02daa461643336844362cdb50c3f3588bf6776238c512b0c044393d6db
|