Skip to main content

log send to remote

Project description

logging

Install

[root@localhost ~]# pip3 install netkiller-logging

[root@localhost ~]# whereis rlog 
rlog: /usr/local/bin/rlog

[root@localhost ~]# rlog 
Usage: rlog [options] filename

Options:
-h, --help            show this help message and exit
-H localhost, --host=localhost
						push log to remote host
-p 1214, --port=1214  port
--sleep=0.05          with -s, sleep  for  approximately S  seconds between
						iterations
-d, --daemon          run as daemon
-f, --full            Full text
--stdin               cat file | prog ...
-e /tmp/rlog.log, --errlog=/tmp/rlog.log
						error log
--postion             save postion of log file

Homepage: http://netkiller.github.io	Author: Neo <netkiller@msn.com>

Source

$ git clone https://github.com/netkiller/logging.git
$ cd logging
$ python3 setup.py sdist
$ python3 setup.py install

cp init.d/ulog /etc/init.d/
chkconfig --add ulog
chkconfig ulog on

Example

$ rlog
Usage: rlog [options] filename

Options:
  -h, --help            show this help message and exit
  -H localhost, --host=localhost
						push log to remote host
  -p 1214, --port=1214  port
  --sleep=0.1           with -s, sleep  for  approximately S  seconds between
						iterations
  -d, --daemon          run as daemon
  -f, --full            Full text
  --stdin               cat file | prog ...

  Homepage: http://netkiller.github.io	Author: Neo <netkiller@msn.com>

Send logs

$ rlog /var/log/nginx/access.log
b'192.168.6.20 - - [11/Dec/2014:15:51:24 +0800] "GET /home/about.html HTTP/1.1" 200 7802 "http://192.168.6.2/home/download.epub.html" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"\n'
b'192.168.6.20 - - [11/Dec/2014:15:51:24 +0800] "GET /stylesheet.css HTTP/1.1" 304 0 "http://192.168.6.2/home/about.html" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"\n'

# Send log to 192.168.2.1
$ rlog -H192.168.2.1 -p1214 /var/log/nginx/access.log	

# Full text log to 192.168.2.1
$ rlog -H192.168.2.1 -p1214 -f /var/log/nginx/access.log	

# Daemon mode
$ rlog -H192.168.2.1 -p1214 -d /var/log/nginx/access.log

# Stdin
$ cat /var/log/nginx/access.log | rlog -H 127.0.0.1 --stdin

Logs collection

$ collection 
Usage: collection [options] module

Options:
  -h, --help            show this help message and exit
  -p 1214, --port=1214  port
  -l /tmp/test.log, --logfile=/tmp/test.log
						log file
  --list                show module message
  -d, --daemon          run as daemon

  Homepage: http://netkiller.github.io	Author: Neo <netkiller@msn.com>

# show log from port 1214
$ collection -p 1214

# Save log to file from port 1214
$ collection -p 1214 -l /tmp/test.log

Audit log

Audit log tools.

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

netkiller-logging-0.0.5.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

netkiller_logging-0.0.5-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file netkiller-logging-0.0.5.tar.gz.

File metadata

  • Download URL: netkiller-logging-0.0.5.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.4

File hashes

Hashes for netkiller-logging-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a089df7a6a9458ca118742150008afddfcbd1b4463b02894dfeccdb9410972af
MD5 992ea10aafda4760e4bcebaa4bb9ccd0
BLAKE2b-256 d24037c2ac932cc193ee44b34bce4251a96e2f6bdc9b6060bdf88aca3784ad01

See more details on using hashes here.

File details

Details for the file netkiller_logging-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: netkiller_logging-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.4

File hashes

Hashes for netkiller_logging-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3d66db5ea1fb8252fffacf0941d80a9235c77fd748df73406035c2ac08083989
MD5 a8d7fc42fb5d54585e791873af14a3da
BLAKE2b-256 b160930d9d3e8971de816d56ca54858b5265d1226175181095ddc197bc396192

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