Zane C. Bowers-Hadley

NAME

essearcher - A utility for using templates for searching elasticsearch.

SYNOPSIS

essearcher [-e <elastic>] [-s <search>] [-g <options>] [-o <options>] ...

essearcher [-m <name>] [-e <elastic>] ...

essearcher -n -w <warn> -c <critical> ...

FLAGS

-s <search>

The search template to use.

-g <getopts>

The getopts config to use.

-o <output>

Thee output template to use.

-m <module>

Set all of the above to the same. Any of the above being set will override this.

-e <elastic>

The elasticsearch config to use.

-p

If -S is given, then it will attempt to pretty print the JSON.

This will involve parsing it and then turning it back into JSON.

So it will spit out ugly JSON is malformed JSON is fed into it.

-S

Print the search out after filling it in and exit.

-R

Run the search and print it via Data::Dumper.

-i

Invert the results.

-n <check>

Operate as a nagios style check.

In check mode, -w and -c both most be specified. The value of -n is used to determine the equality to use when evaluating -w and -c. The table is as below.

gt > gte >= lt < lte <=

The order is as below.

$hits $check $warn/critical

-w <warn>

Number of hits to throw a warning at.

-c <crit>

Number of hits to throw a critical at.

-h

Print the help.

--help

Print the help.

ENVIROMENTAL VARIABLES

NO_COLOR

If this is set, it disables color output.

NOTE

This script has dynamic command line options. The ones shown above are just the defaults.

For others see the help documentation via --help or check the pod of the module you are using.