esinfo

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

esinfo

Go Report Card

example branch parameter

When running large elasticsearch clusters it can be difficult to know what indexes you have in the cluster without manually searching through index management or using dev tools and scrolling. esinfo queries elasticsearch for all indexes in the cluster and outputs them in a nice format (csv, json, yaml).

Installation

git clone https://github.com/tehbooom/esinfo.git
cd esinfo
make build

Or download the latest binary here for your OS

Options

Flag Description Default
endpoint url to elasticsearch API localhost:9200
username username to authenticate elastic
password password for user changeme
cacert path to certificate authority file
unsafe option to verify ssl true
format output format for esinfo csv

Usage

esinfo looks for a config file at esinfo.yaml in the directory you are currently at or your $HOME directory

Here is an example file

Optionally you can set any flag at the commandline which overrules anything in your config file

esinfo [command] [flags]

Examples

$ esinfo test
{
  "name" : "instance-0000000001",
  "cluster_name" : "ee0073bc7ffc44a8b62454c1a73f508e",
  "cluster_uuid" : "F37aL59HQZm41W4BBDWrbg",
  "version" : {
    "number" : "8.8.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "c01029875a091076ed42cdb3a41c10b1a9a5a20f",
    "build_date" : "2023-05-23T17:16:07.179039820Z",
    "build_snapshot" : false,
    "lucene_version" : "9.6.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

Connection successful!
$ esinfo run
CSV file located at /home/alec/go/src/github.com/tehbooom/esinfo/indices.csv
$ esinfo run -f json -p "supersecretpassword" -u elastic -e "https://es-1:9200"
JSON file located at /home/alec/go/src/github.com/tehbooom/esinfo/indices.json

Man Page

When running large elasticsearch clusters it can be difficult to know what indexes you have in the cluster without manually 
        searching through index management or using dev tools and scrolling. Esinfo queries elasticsearch for all indexes in the cluster and 
        outputs them in a nice format(csv, json, yaml).

Usage:
  esinfo [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  run         Queries the elasticsearch cluster for all indices and datastreams and outputs them.
  test        A brief description of your command

Flags:
      --cacert string     Certificate Authority for cluster
      --config string     config file (default is esinfo.yaml)
  -e, --endpoint string   Address to elasticsearch (default "localhost:9200")
  -f, --format string     Output type for file (default "csv")
  -h, --help              help for esinfo
  -p, --password string   Password for elasticsearch (default "changeme")
  -U, --unsafe            Ignore certificate errors
  -u, --username string   Username for elasticsearch (default "elastic")

Use "esinfo [command] --help" for more information about a command.

Documentation

Overview

Copyright © 2023 Alec Carpenter @tehbooom

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL