Get your logs from Logentries on the comandline
Project description
Note: I am no longer using Logentries. If you would like to take over this project to maintain it that would be great! Please email me at me@adamj.eu.
Stream your logs from Logentries on the commandline. Provides the logentries command which makes it easy to call their Download API and pipe it around.
Setting up
Install it:
$ pip install logentries-cli
Find your Logentries account key. At time of writing, this can be found at Accounts->Profile and appears when you press the “Show” button:
(Optional) store your account key in the environment variable LOGENTRIES_ACCOUNT_KEY. You could set this up in e.g. your bashrc. Your other option is to always pass it to logentries with --account-key.
Filter your logs! Run with the syntax:
$ logentries <logset> <logname> [-f filter] [-s start] [-e end]
Verbose help for the options is provided with logentries -h.
Examples
$ logentries web nginx
With only the required arguments (logset and log) filled in, the last 20 minutes of messages from that log are downloaded. They are streamed so they play nicely with other commandline utilities.
$ logentries web nginx -f code=500
Passing a Logentries filter means that fewer messages are downloaded and you can analyze faster.
$ logentries web nginx -f 'code=500' -s '1am' -e '5 minutes ago'
A wide variety of date/time formats are supported for specifying the start and end of the time period to fetch messages for, thanks to the awesome parsedatetime and dateutil.
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
Built Distribution
File details
Details for the file logentries-cli-1.2.tar.gz
.
File metadata
- Download URL: logentries-cli-1.2.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980a1e861039eb00741fefe51f9691bd5fbe14d5e52d5358458197454ed2b974 |
|
MD5 | bfdd145f3f601f72d2e0f9f521159f0d |
|
BLAKE2b-256 | cf296b04adfa72e765fb924f00e0ec8b70c3ca2ed92c6c98c9796a8080891c72 |
File details
Details for the file logentries_cli-1.2-cp34-cp34m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: logentries_cli-1.2-cp34-cp34m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 5.2 kB
- Tags: CPython 3.4m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df67dc52df7d02d0b52164dc69994b4b17c16c2cd2e0e78161a4ca06205d7342 |
|
MD5 | 32325729a74cd55d6596c1b2180b5499 |
|
BLAKE2b-256 | cbe01ae4ac578170cf59fce22bc9a02536e0a382a9f5ae2d49bf018b470a89e6 |