Socket
Book a DemoInstallSign in
Socket

es-cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-cli

Elasticsearch CLI for querying your logs

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
12
100%
Maintainers
1
Weekly downloads
 
Created
Source

es-cli

Elastic search CLI for nodejs.

Installation

$ npm install -g es-cli

Usage


  Usage: es [options] [query]

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -u, --url <url>      elastic search url
    -i, --index <name>   index name
    -t, --type <name>    index type
    -s, --sort <fields>  sort fields [timestamp:desc]
    -n, --max <n>        max number of results [10]


Setup

Since manually specifying --url is annoying, you may want to alias this executable:

alias logs='es -u <es-url> --index logs --type log'

Allowing you to simply run:

$ logs level:error AND hostname:api6-1

Example

Check out the last 10 errors:

$ es -u <es-url> level:error

Check out the last 1000 events for the users luna and tobi:

$ es -u <es-url> -n 1000 user:luna OR user:tobi

License

MIT

Keywords

es

FAQs

Package last updated on 29 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts