-
Notifications
You must be signed in to change notification settings - Fork 0
Recipes
Task-oriented examples. See Command reference for the full set of arguments.
One file per object, so a diff against the previous backup is readable:
osm -t prod dashboard export --to-file backup/dashboards
osm -t prod visualization export --to-file backup/visualizations
osm -t prod search export --to-file backup/searchesOr everything at once, as a single ndjson stream:
osm -t prod saved-object export > backup/all.ndjsonosm -t prod dashboard export --to-file backup
osm -t staging -w 9gt3vk dashboard import 'backup/*.ndjson'Quote the wildcard: osm expands it itself, so a pattern matching hundreds of
files works regardless of the shell's argument limits.
Edit the policy, then apply the edit to indices already running the old revision:
osm -t prod ism policy set-transition logs-policy hot delete --min-index-age 90d
osm -t prod ism change-policy 'logs-*' logs-policy
osm -t prod ism policy version 'logs-*'osm -t prod ism policy create keep_forever --pattern 'logs-archive-*'
osm -t prod ism change-policy 'logs-archive-*' keep_foreverThe policy has one state with no actions, so enrolled indices are managed but never modified or deleted.
osm ism status --failed
osm ism retry '.ds-logs-app-000001'If the failing step is a delete on a data stream's write index, roll the stream over first:
osm ism rollover logs-app
osm ism retry '.ds-logs-app-000001'osm ism list --all # including unmanaged indices
osm ism policy version --include-orphans # exits 2 if anything needs re-enrolling
osm index-template list # which templates carry a policy_id
osm data-stream list # write index and template per streamosm index field-caps 'p2-prod-metrics-*' --conflicts
osm index field-caps 'p2-prod-metrics-*' --unknown # rendered as '?' in Dashboardsosm -t staging dashboard validate || exit 1See Dashboard validation for what each finding means.
Any unrecognised first word is sent to the cluster as a REST path, with
cluster, cat and nodes expanded to _cluster, _cat and _nodes:
osm _cluster/health
osm cat indices
osm -t prod cat shards
osm nodes stats
osm _cat/allocation?vThe global flags still apply, so -t selects the target as usual.
Maintained in docs/wiki/
and published by the wiki workflow. Edits made here are overwritten.