Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

os-manager

osm - a CLI for OpenSearch clusters and OpenSearch Dashboards: saved objects, index state management, and raw REST access.

Install

pip install -e .

Configure

~/.os-manager/config.json lists targets. Each names an OpenSearch REST endpoint and an OpenSearch Dashboards endpoint, and shares credentials between them. The first target is the default; -t NAME selects another.

{
  "targets": [
    {
      "name": "local",
      "cluster":    { "protocol": "http", "host": "localhost:9200" },
      "dashboards": { "protocol": "http", "host": "localhost:5601" }
    }
  ]
}
osm target list

Use

osm _cluster/health                          # unrecognised commands go to the REST API
osm cat indices
osm dashboard list                           # saved objects
osm dashboard validate                       # check dashboards against the cluster
osm ism status --failed                      # policies that are stuck
osm -t prod dashboard export --to-file backup

osm --help lists the commands, and osm <command> [subcommand] --help gives the arguments of each.

Documentation

Full documentation is in the wiki:

The wiki is published from docs/wiki/ by the wiki workflow; edit the files there, not the wiki itself. Command-Reference is generated from the CLI's own argument definitions by tools/gen_command_reference.py, so it cannot drift from the code:

python tools/gen_command_reference.py --stdout | less

Exit codes

Code Meaning
0 Success
1 Request failed, or dashboard validate found errors, or ism status --failed found failures
2 ism policy version found drifted, un-enrolled, or orphaned indices

Releases

Packages

Used by

Contributors

Languages