| Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
db:elasticsearch [2026/01/20 09:07] tomas [REST API] |
db:elasticsearch [2026/01/20 09:12] (current) tomas [REST API] |
| === Konfigurace, stav === | === Konfigurace, stav === |
| ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/_cluster/settings?include_defaults=true&flat_settings=true%%'' ... vypíše konfiguraci\\ | ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/_cluster/settings?include_defaults=true&flat_settings=true%%'' ... vypíše konfiguraci\\ |
| ''curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_cluster/state'' ... Ukáže stav a informaci o clusteru\\ | ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_cluster/state%%'' ... Ukáže stav a informaci o clusteru\\ |
| ''curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_cluster/allocation/explain | jq .'' ... ukáže informace o alokaci\\ | ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_cluster/allocation/explain | jq .%%'' ... ukáže informace o alokaci\\ |
| ''curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_cluster/health'' ... ukáže informace o zdraví clusteru\\ | ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_cluster/health%%'' ... ukáže informace o zdraví clusteru\\ |
| |
| |
| === Indexy === | === Indexy === |
| ''curl -s -u $ELUSR:$ELPWD https://$ELSRV/_alias'' ... vylistuje indexy a jejich aliasy\\ | ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/_alias%%'' ... vylistuje indexy a jejich aliasy\\ |
| ''curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_settings'' ... ukáže nastavení indexu INDEX\\ | ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_settings%%'' ... ukáže nastavení indexu INDEX\\ |
| ''curl -s -u $ELUSR:$ELPWD https://$ELSRV/_cat/indices?v'' ... seznam indexů, jejich stav a velikost\\ | ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/_cat/indices?v%%'' ... seznam indexů, jejich stav a velikost\\ |
| ''curl -s -u $ELUSR:$ELPWD -X PUT -H 'Content-Type: application/json' -d '{ "index": { "blocks.read_only" : true } }' https://$ELSRV/INDEX/_settings"'' ... nastaví index na read-only\\ | ''%%curl -s -u $ELUSR:$ELPWD -X PUT -H 'Content-Type: application/json' -d '{ "index": { "blocks.read_only" : true } }' https://$ELSRV/INDEX/_settings"%%'' ... nastaví index na read-only\\ |
| ''curl -s -u $ELUSR:$ELPWD -X POST https://$ELSRV/INDEX/_clone/KOPIE"'' ... naklonuje index INDEX do KOPIE\\ | ''%%curl -s -u $ELUSR:$ELPWD -X POST https://$ELSRV/INDEX/_clone/KOPIE%%'' ... naklonuje index INDEX do KOPIE\\ |
| |
| === Snapshoty === | === Snapshoty === |
| ''curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_slm/policy | jq .'' ... ukáže snapshot policy\\ | ''%%curl -s -u $ELUSR:$ELPWD https://$ELSRV/INDEX/_slm/policy | jq .%%'' ... ukáže snapshot policy\\ |
| ''curl -s -u $ELUSR:$ELPWD -X POST https://$ELSRV/INDEX/_slm/policy/POLICY/_execute | jq .'' ... provede snapshot pro policy POLICY\\ | ''%%curl -s -u $ELUSR:$ELPWD -X POST https://$ELSRV/INDEX/_slm/policy/POLICY/_execute | jq .%%'' ... provede snapshot pro policy POLICY\\ |
| |