Save 37% off PRO during our Black Friday Sale! »

eskeeperを使ったファイル定義によるindex管理

4d78b749c315e21a956053dcbf0508a9?s=47 po3rin
October 20, 2021

 eskeeperを使ったファイル定義によるindex管理

eskeeperで便利にindex&aliasを管理しよう
https://github.com/po3rin/eskeeper

4d78b749c315e21a956053dcbf0508a9?s=128

po3rin

October 20, 2021
Tweet

Transcript

  1. Indices management by file definition using eskeeper #elasticsearchjp

  2. தଜ߂෢ ΤϜεϦʔͷ"*ɾػցֶशνʔϜͰݕࡧج൫ पΓΛ୲౰͍ͯ͠Δɻ(P͕޷͖ɻ ֤छΞΧ΢ϯτQPSJOͰ΍ͬͯ·͢ɻ )*SPNV/BLBNVSB

  3. ΤϜεϦʔͰ͸&MBTUJDTFBSDIΛར༻͍ͯ͠Δ͕ɺੵۃతʹ ݕࡧվળ͍ͯ͠ΔͷͰɺJOEFYͷมߋ͕සൟʹൃੜ͠ɺ؅ཧ ͮ͠Β͍ঢ়گͩͬͨɻ ՝୊ *446&

  4. ݕࡧج൫νʔϜͰ͸JOEFYͷ৽ن࡞੒BMJBT੾Γସ͑Ͱ NBQQJOHͷมߋ౳ʹରԠ͍ͯ͠ΔŇ৽͍͠JOEFYʹରͯ͠ ࠶౓σʔλ౤ೖΛߦ͏ ӡ༻ 01&3"5*0/ OFXTW OFXTW /FXTBMJBT 3FRVFTU 0MEJOEFY

    /FXJOEFY 4XJUDIJOEFY *OTFSUNBTUFSEBUB
  5. ӡ༻ 01&3"5*0/ ,JDLKPC %FQMPZ+PC खಈΩοΫͳϝϯςφϯε+PC CBTI ͷ਺ʑ DSFBUFJOEFYDSFBUFBMJBTTXJUDIJOEFY

  6. ՝୊ *446& ࠓɺBMJBTʹඥ͍ͮͯΔJOEFYͷόʔδϣϯͬͯԿ͚ͩͬʁʁ JOEFYೖΕସ͑ͷͨͼʹεΫϦϓτʹൃੜ͢Δ%J ff ɺίϛοτ લόʔδϣϯͷJOEFY͕DMPTF͞Εͯͳ͍ʂ ؒҧͬͨNBQQJOHͰJOEFY࡞ͬͯ͠·ͬͨʂʂ ઃఆมߋͷϨϏϡʔΛ௨͍ͨ͠

  7. *B$ͱ͸ΠϯϑϥΛએݴతʹ؅ཧ͢ΔࣄͰιϑτ΢ΣΞ։ൃϓϩηεΛΠ ϯϑϥͷΦʔτϝʔγϣϯʹੜ͔͢Ξϓϩʔνɻ͜ΕΛ্ख͘Ӭଓϛυϧ ΢ΣΞͰ͋Δ&MBTUJDTFBSDIʹద༻Ͱ͖ͳ͍͔ ɾهड़తͳΞϓϩʔνʹΑΔႈ౳ੑ୲อ ɾఆٛϑΝΠϧʹΑΔόʔδϣϯ؅ཧ ɾܧଓςετγεςϜɺϓϩηε *B$ *OGSBTUSVDUVSFBTDPEF

  8. ႈ౳ੑΛอͪͳ͕ΒఆٛϑΝΠϧͰ &MBTUJDTFBSDI*OEFYBMJBTΛએݴత ʹ؅ཧͯ͘͠ΕΔΛ࡞ͬͨ FTLFFQFS &MBTUJDTFBSDI*OEFYLFFQFS

  9. ͜ͷΑ͏ʹఆٛϑΝΠϧͰ&MBTUJDTFBSDIͷ ঢ়ଶΛએݴͰ͖ΔɻӬଓϨΠϠʔͳͷͰૢ ࡞͸XSJUFPOMZʹࠓ͸ߜ͍ͬͯΔɻͭ·Γ ݱࡏͷ࣮૷͸׬શͳ*B$Λଥڠ͢ΔࣄͰσʔ λΛޡͬͯফ͢ϦεΫΛආ͚͍ͯΔɻ FTLFFQFS &MBTUJDTFBSDI*OEFYLFFQFS

  10. ΦϥΠϦʔͷʰ*OGSBTUSVDUVSFBT$PEFʱ ͷதͰ*B$πʔϧ͕࣋ͭ΂͖ػೳʹ͍ͭͯͷه ड़͕͋Δɻ͔͜͜Β͸͜ͷຊΛࢀߟʹ FTLFFQFSͰ΋ҙࣝͨ͠*B$πʔϧ࡞੒ͷϓϥ ΫςΟεΛ঺հ͍ͯ͘͠ *B$Λҙࣝͨ͠$-*ͷ࡞๏ *B$BXBSF$-*#FTU1SBDUJDF

  11. ཁ݅ઃఆͷ֎ࡏԽ ൓෮Մೳੑͷ୲อɻ:BNMͰ͋Ε͹ɺ͋ ΒΏΔط੒πʔϧͰಡΈॻ͖Ͱ͖Δɻ

  12. ཁ݅ແਓ࣮ߦͷαϙʔτ ແਓ࣮ߦ͸ίϚϯυͱͯࣗ͠ಈͰ࣮ߦͰ͖Δ͚ͩͰ͸ෆे෼ɻਓ͕ؒؔ༩͠ ͳͯ͘΋ߴ͍৴པੑͰ࣮ߦͰ͖Δ͜ͱ͕ॏཁɻͦ͜ͰԼهͷཁૉ͕ඞཁɻ ɾႈ౳ੑ ɾࣄલνΣοΫ ɾࣄޙνΣοΫ ɾ໨ʹݟ͑ΔܗͰͷࣦഊ ɾύϥϝʔλԽ

  13. ཁ݅ແਓ࣮ߦͷαϙʔτ FTLFFQFSͰ͸جຊతͳႈ౳ੑɺࣄલ νΣοΫɺࣄޙνΣοΫɺ໨ʹݟ͑Δܗ Ͱͷࣦഊͱ͍͏ཁ݅Λ࣮૷͍ͯ͠Δɻ͜ ΕʹΑΓʮΦʔτϝʔγϣϯڪා঱ʯΛ ݮΒ͢ɻ

  14. FTLFFQFSͰ͸Լهͷεςʔδʹ෼ׂ͞ΕΔ ઃఆϑΝΠϧͷόϦσʔγϣϯ ඥͮ͘NBQQJOH fi MF͸ଘࡏ͢Δ͔ ඞਢϑΟʔϧυ͸ຬͨ͞Ε͍ͯΔ͔ ࣄલνΣοΫ JOEFY͕࣮ࡍʹ࡞ΕΔ͔ Ұ࣌తͳJOEFYΛ࣮ࡍʹ࡞੒ 

    BMJBTͱʹඥͮ͘JOEFY͸ଘࡏ͢Δͷ͔ ࣮ߦεςʔδ ࣮ࡍʹఆٛϑΝΠϧͷঢ়ଶΛಉظͤ͞Δ ࣄޙνΣοΫ ఆٛϑΝΠϧʹ͋ΔJOEFY΍BMJBT͕࡞ΒΕ͔ͨ
  15. SFJOEFYͷαϙʔτ FTLFFQFSͰ͸SFJOEFYΛαϙʔτɻ جຊతͳSFJOEFYΦϓγϣϯΛࢦఆͰ͖ Δɻ͜ΕͰJOEFY࡞੒ͷޙʹSFJOEFYΛ ૸ΒͤΔ͜ͱ͕Ͱ͖Δɻ

  16. Ϣʔεέʔε

  17. ϢʔεέʔεNBQQJOHมߋ NBQQJOHͷ"OBMZ[FSͷઃఆΛมߋ͢Δͱ͖ͳͲ͸طଘNBQQJOHΛಈతʹมߋͰ͖ͳ͍ͷͰɺJOEFYΛ࡞ ੒ͯ͠ɺσʔλΛ΋͏Ұ౓ೖΕ௚͢ඞཁ͕͋ΔɻͦͷࡍʹFTLFFQFSΛ࢖͑͹ίϚϯυൃ

  18. ϢʔεέʔεJOEFY࡞੒ࡁΈ&MBTUJDTFBSDI%PDLFS fi MFͷੜ੒ ΤϜεϦʔͰ͸FF༻ͷJOEFYੜ੒ࡁΈ%PDLFS fi MFΛ༻ҙ͍ͯ͠ΔɻϩʔΧϧͷಈ࡞֬ೝͰ΋ར༻Ͱ͖Δɻ

  19. Ϣʔεέʔε6OJU5FTU࣌ͷ*OEFY࡞੒ FTLFFQFS͸(Pͷύοέʔδͱͯ͠࢖͑ΔܗͰఏڙ͍ͯ͠ΔͷͰɺςετ࣌ʹJOEFYΛੜ੒Մೳɻྫ͑͹ FTSFJOEFYFSͰ͸FTLFFQFSΛ࢖ͬͨςετΛ࣮૷͍ͯ͠Δɻ 
 IUUQTHJUIVCDPNQPSJOFTSFJOEFYFSCMPCNBJONBJO@UFTUHP

  20. ݁Ռ $06$-64*0/ JOEFY؅ཧ༻ͷLT+PCɺγΣϧεΫϦϓτͳͲΛେ૟আ͠ ͯɺϦϙδτϦ͔ΒϑΝΠϧΛ࡟আͨ͠ɻ 
 
 ໿೥ؒFTLFFQFSΛӡ༻ͯ͠େ෼҆ఆͨ͠ͷͰɺ͜Ε͔Β ΋FTLFFQFSΛҭ͍͖ͯͯ·͢ɻ

  21. ՝୊ *446& ݱঢ়JOEFY࡟আΛαϙʔτ͍ͯ͠ͳ͍ͷͰɺෆཁͳJOEFY͸ఆظతʹखಈͰফ͢ඞཁ͕͋ Δɻ5FSSBGPSNͷUGTUBUFతͳϑΝΠϧΛอଘͰ͖ΔΑ͏ʹ͢Ε͹ྑͦ͞͏ɻߏ૝த 
 
 FTLFFQFSͷSFJOEFY͸ઃఆΛ࠷దԽ͠ͳ͍ͷͰɺ͋·ΓύϑΥʔϚϯε͕ྑ͘ͳ͍ SFJOEFYऴྃΛݕ஌Ͱ͖ͳ͍ɻ 1SFDIFDLTUBHF͕஗͍ɻݱঢ়JOEFY࡞੒࡟আ͕૸ΔͷͰɺͳΜͱ͔NBQQJOH WBMJEBUPSΛ૊ΈࠐΊͳ͍΋ͷ͔

  22. Indices management by file definition using eskeeper #elasticsearchjp