elasticsearch howeaver

------------------------------- elasticsearch

download zip

elasticsearch.yml:

# allow CORS requests from https://tauri.localhost

http.cors.enabled: true

http.cors.allow-origin: "https://tauri.localhost"


# and if your cluster uses authorization:

http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization


action.auto_create_index: .monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*



roles.yml:

# The default roles file is empty as the preferred method of defining roles is

# through the API/UI. File based roles are useful in error scenarios when the

# API based roles may not be available.

admins:

  cluster:

    - all

  indices:

    - names:

        - "*"

      privileges:

        - all

devs:

  cluster:

    - manage

  indices:

    - names:

        - "*"

      privileges:

        - write

        - delete

        - create_index

-------------------------------

-------------------------------


-------------------------------

kibana 

zip

run

-------------------------------

-------------------------------


-------------------------------logstash

zip


csv:

145 deu Ich sag's ja nur! MUIRIEL 2010-10-14 14:43:54 2010-10-14 14:43:54

146 deu Wahrscheinlich war es das, was ihre Entscheidung beeinflusst hat. MUIRIEL 2010-10-14 14:43:54 2010-10-14 14:44:06

147 deu Ich habe mich immer gefragt, wie es wäre, Geschwister zu haben. MUIRIEL 2010-10-14 14:43:54 2010-10-14 14:44:19


config/import_csv.conf

input {

    file {

        path => "C:/app/logstash-8.5.3/sentences_detailed.csv" !!!!!!!!! on windows exactly forward slashes!!!!!

        start_position => beginning

        

}

}

filter {

    csv {

columns => ["id","lang","text","user_name","ts_add","ts_update"]

separator => " " tab symbol - not \t but just click tab symbol on a keyboard

        }


mutate {convert => ["id", "integer"]}


}

output {

elasticsearch {

  hosts => ["https://localhost:9200"]

  index => "sentences_detailed"

  ilm_enabled => false

  ssl => true

  ssl_certificate_verification => false

  user => "elastic"

  password => "2N-MgyiQApBRI9Eh3Bfn"

}

    stdout {}

}

-------------------------------

-------------------------------


execution:

elasticsearch 

    reset password elasticsearch-reset-password.bat for user elastic get password

kibana

C:\app\logstash-8.5.3>.\bin\logstash -f .\config\import_csv.conf


reimport:

kibana open in unsecured browser chrome

"C:\Program Files\Google\Chrome\Application\chrome.exe" --user-data-dir=C:\Users\User\chromeTemp --disable-web-security

: http://localhost:5601/app/dev_tools#/console

delete index: DELETE sentences_detailed

GET sentences_detailed

C:\app\logstash-8.5.3\data\plugins\inputs\file !!!!delete file - this is the log of imported files!

import:

C:\app\logstash-8.5.3>.\bin\logstash -f .\config\import_csv.conf

src: https://www.dataneb.com/post/loading-csv-data-into-elasticsearch-with-logstash

https://localhost:9200/ elasticsearch check in browser



для logstash 7.*

input {

    file {

        path => "C:/Users/Ya/Downloads/sentences_detailed/sentences_detailed.csv"

        start_position => beginning

        

}

}

filter {

    csv {

columns => ["id","lang","text","user_name","ts_add","ts_update"]

separator => " "

        }


mutate {convert => ["id", "integer"]}


}

output {

elasticsearch {

  hosts => ["http://localhost:9200"]

  index => "tatoeba_sentences_detailed"

}

    stdout {}

}

Комментарии

Популярные сообщения из этого блога

kafka конспект однако

Дэвид Рок: Ваш мозг на работе - Разговоры в Гугле

Отслеживание Процесса загрузки с PHP и JavaScript