Skip to content

scblur869/oscli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oscli

opensearch command-line tool

simple app in golang to give easy access to opensearch api calls from command line based on your iam role in AWS

Requirements:

  • must have aws cli installed and configured with permissions to opensearch in AWS
  • opensearch endpoint URI exposed and known
  • go build requires access to the internet to download packages

Deployment: clone this repository

git clone {.git url}
go build
./oscli
usage:

admin
	 ls-role-mapping | ls-tenants | ls-security
configure
	 { allows for aws profile and elastic host url }
role-mapping
	 new -name=role_name -user=opensearch_user -backend-role=kibana_user -host={nil or host match}
indice
	 delete -name=indexName
template
	 view -name=templateName
role
	 new -name=test_role -clusterperms=indices_monitor,cluster_ops -index="movies-*" -indexperm=read -tenant=sales,marketing -tenantperms=kibana_all_read
cat
	 cluster-info | stats | nodes | templates | indices | shards | health | disk | recovery | master | count | field_data | alias
help: { list this message :-) }

example

some-user@ww2r32342de: ./oscli configure
AWS Cli Profile [default]:
opensearch Host [https://my-opensearch-host-url.us-east-1.es.amazonaws.com]:
config file written..
some-user@ww2r32342de:
some-user@ww2r32342de: ./oscli configure
AWS Cli Profile [default]: us-east-1-dev
opensearch Host [https://my-opensearch-host-url.us-east-1.es.amazonaws.com]: http://my-dev-cluster.us-east-1.es.amazonaws.com
config file written..
some-user@ww2r32342de:
./oscli admin ls-role-mapping

Releases

No releases published

Packages

No packages published