grep command for New Relic Logs
This package provides a command nrgrep which is grep-like command for New Relic Logs.
New Relic can store plenty of logs and we can query it really fast on the very nice UI on the web site, but some of developers still prefer to use command line interface to query logs than modern UIs. This command helps such kind of people.
Install
pip install newrelic-grep
Prereqiusits
Set environment variables to access New Relic API:
NR_API_KEY USER API key
NR_ACCOUNT_ID Account ID of New Relic User
Usage
# nrgrep [--since DATETIME] [--until DATETIME] <KeyWord to search>
Exapmple
nrgrep --since 20230301140000 --until 20230301150000 'Failed to write'
Options
--since
Start time to be queried.
Format is YYYYmmddHHMMSS.
You can omit right part if you want.
2023030114 will be 20230301140000
Default is 3 days ago.
--until
End time to be queried.
Format is as same as --since
-a Show attibute before log message. You can use this option multiple times.
Ex.
nrgrep -a hostname -a logtype 'Failed to write'
-q
Query to attributes. Format is Attribute Name:Value.
You can use this option multiple times.
Ex.
ngrep -q hostname:myhost -q service=api 'Failed to write'
-d Show queries to be sent.
Metadata
Release files for newrelic-grep 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| newrelic_grep-1.0.2.tar.gz | 4.2 kB | Without provenance | Details for newrelic_grep-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| newrelic_grep-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for newrelic_grep-1.0.2-py3-none-any.whl |
Total release size: 9.4 kB
Release files / newrelic_grep-1.0.2.tar.gz
| Download URL | newrelic_grep-1.0.2.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45e85127073cc50fbd2f25246e1c0c0c645791926e3d45009963b804ada04f6c
|
|
BLAKE2b-256 checksum How to use checksums |
7d521c1fa3b45f261353b6cbee7c20315436080ca85419136f0a6f824d1c65c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.9.13 Linux/3.10.0
|
Release files / newrelic_grep-1.0.2-py3-none-any.whl
| Download URL | newrelic_grep-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d2e2d3661138004b7eb4740091f078fdca3dc676bf9bf328edaa709349cd4a1
|
|
BLAKE2b-256 checksum How to use checksums |
bad001382a7dd2e898a093a91105acaca65ed666534fc4b4fa41f344098bed6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.9.13 Linux/3.10.0
|
Security for newrelic-grep 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.