dargslan-log-parser
Linux Log File Parser & Analyzer — Parse and analyze syslog, auth.log, nginx access/error logs, and Apache logs. Detect failed SSH logins, error patterns, and security events.
Installation
pip install dargslan-log-parser
Quick Start
from dargslan_log_parser import LogParser
parser = LogParser()
# Parse auth.log for failed SSH logins
failed = parser.parse_auth_log("/var/log/auth.log")
for entry in failed:
print(f"{entry['timestamp']} - Failed login from {entry['ip']} as {entry['user']}")
# Parse nginx access log
entries = parser.parse_nginx_access("/var/log/nginx/access.log")
errors = [e for e in entries if e["status"] >= 400]
# Search any log for patterns
matches = parser.search("/var/log/syslog", pattern="error|warning|critical", case_insensitive=True)
# Summary report
report = parser.summary("/var/log/auth.log", log_type="auth")
print(f"Failed logins: {report['failed_logins']}")
print(f"Top attackers: {report['top_ips']}")
CLI Usage
# Analyze auth log
dargslan-logs auth /var/log/auth.log
# Parse nginx access log
dargslan-logs nginx /var/log/nginx/access.log --errors-only
# Search any log
dargslan-logs search /var/log/syslog -p "error|fail" -i
# Summary
dargslan-logs summary /var/log/auth.log --type auth
More Resources
- Linux & DevOps eBooks — 210+ professional eBooks
- Free Cheat Sheets — Quick reference PDFs
- Blog & Tutorials — In-depth guides
License
MIT — Made by Dargslan
Metadata
Release files for dargslan-log-parser 1.0.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 | |
|---|---|---|---|
| dargslan_log_parser-1.0.0.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dargslan_log_parser-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / dargslan_log_parser-1.0.0.tar.gz
| Download URL | dargslan_log_parser-1.0.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ee3171410a610d78223fa7d819775e2946435320db462a62207aa2ffbbeec79
|
|
BLAKE2b-256 checksum How to use checksums |
240edad0c668cbd585803855d54975f332f6f8e0fd537dca0190aca453d1cb46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / dargslan_log_parser-1.0.0-py3-none-any.whl
| Download URL | dargslan_log_parser-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92530f3a0b3c3e31343703748228c6a5782c73c998a9d91a4c26971c7a466e56
|
|
BLAKE2b-256 checksum How to use checksums |
838e8ca692d61948e78c1e0b47d589a1361ba0a3ca63842b015de4b39d448a6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|