OSearchTableView is a command-line tool written in Go for fetching and displaying data from OpenSearch indices in a tabular format.
- Fetch data from OpenSearch indices.
- Display fetched data in rows and tables.
- Uses concurrency through goroutines to fetch large datasets efficiently.
- Configurable options including URL, user authentication, index name, and more.
-
Download the binary with wget:
wget https://github.com/JCoupalK/OSearchTableView/releases/download/1.0/ostableview_linux_amd64_1.0.tar.gz
-
Unpack it with tar
tar -xf ostableview_linux_amd64_1.0.tar.gz
-
Move it to your /usr/local/bin/ (Optional):
sudo mv ostableview /usr/local/bin/ostableview
-
Ensure you have Go installed on your system. You can download Go from here.
-
Clone the repository:
git clone https://github.com/JCoupalK/OSearchTableView
-
Navigate to the cloned directory:
cd OSearchTableView
-
Build the tool:
go build -o ostableview .
Usage: ostableview [options]
General options:
-u, --url OpenSearch URL
-U, --user OpenSearch user
-p, --password OpenSearch password
-i, --index Index name
-s, --size Size limit for the number of rows to fetch (Default is 10, Maximum is 10000)
-c, --config Config file path (replaces above arguments)
# locally hosted opensearch with 100 rows queried.
./ostableview -u http://localhost:9200 -U demo-user -p demo-password -i demo_index -s 100
# print output to file called results.txt
./ostableview -u http://localhost:9200 -U demo-user -p demo-password -i demo_index -s 100 > results.txt
# configuration file specified
./ostableview -c path/to/config.json
Example of config.json:
{
"url": "http://localhost:9200",
"user": "demo-user",
"password": "demo-password",
"index_name": "demo_index",
"size": 100
}
Contributions are welcome. If you find a bug or have a feature request, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.