小屋創作

日誌2017-08-30 23:48

畢業論文暫存用,關於ELK

作者:夜名

WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs to console
08:22:26.778 [LogStash::Runner] ERROR logstash.agent - Cannot load an invalid configuration {:reason=>"translation missing: en.logstash.agent.configuration.invalid_plugin_register"}


/home/fcs/test/*.csv

input {
  redis {
    #host => "192.168.56.134:6379" # INDEXER_HOSTNAME
    data_type => "list"
    key => "logstash"
    # key = "wifi"
    # key = "182717945870"
    codec => json
    batch_count => 100        # how many messages to fetch at once
  }

}

output {
   elasticsearch {hosts => "192.168.56.134" }
   stdout { codec=> rubydebug }
}


sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/csv.conf

redis-cli -h 192.168.56.134


input {
  file {
    path => "/home/fcs/test/*.csv"
    start_position => beginning
    # to read from the beginning of file
    # sincedb_path => "/dev/null"
    type => "m05a"
  }
}

filter{
  if [type] == "m05a"{
    csv {
      columns => ["URL", "Product_Name", "ItemNo", "Price", "country"]
    }

    date {
      timezone => "Asia/Taipei"
      target => "@timestamp"
    }
    mutate{
      convert => ["Price", "integer"]
    }
  }
}

output {
  if [type] == "m05a"{
    elasticsearch {
      hosts => "192.168.56.134:9200"
      index => "logstash-%{type}-%{+YYYYMMdd}"
      document_type => "%{type}"
    }
  }
}


http://192.168.56.134:9200/
http://192.168.56.134:5601

http://www.ebay.com/itm/MV01-Pre-Columbia-Inca-Antique-Nazca-Small-Polychrome-Pottery-pot-vase-/352153509349?hash=item51fdfc1de5:g:k4kAAOSwnJVZmj9b,"MV01 Pre-Columbia Inca Antique Nazca Small Polychrome Pottery pot vase",352153509349,45267,Japan
http://www.ebay.com/itm/Authentic-Mayan-Pre-Columbian-Chac-Bowl-/282627351482?hash=item41cde723ba:g:ebwAAOSwrRlZoz8k,"Authentic Mayan Pre Columbian Chac Bowl",282627351482,39231,United States
http://www.ebay.com/itm/ANTIQUE-KACHINA-KATSINA-ZUNI-circa-1940-1950-/222627010061?hash=item33d59a960d:g:N54AAOSwXz9ZlfLs,"ANTIQUE KACHINA KATSINA ZUNI circa 1940/1950",222627010061,39077,France
http://www.ebay.com/itm/Taino-Caribbean-Indians-Shaman-s-Vomit-Stick-circa-1300-1500-/152680511867?hash=item238c77b97b:g:5ZYAAOSwGJlZNirA,"Taino (Caribbean Indians) Shaman’s Vomit Stick…….circa (1300 - 1500)",152680511867,72427,Canada
http://www.ebay.com/itm/round-oak-A-18-finial-/253123017546?hash=item3aef4ebb4a:g:kZ4AAOSw3GFZn2SX,"round oak A 18 finial",253123017546,10592,United States






架构图


proxy流程:

0

2

LINE 分享

相關創作

2024/01/04 九州6日遊

泰國五日遊(預計

2023/12 伊豆5日遊(預計)

留言

開啟 APP

face基於日前微軟官方表示 Internet Explorer 不再支援新的網路標準,可能無法使用新的應用程式來呈現網站內容,在瀏覽器支援度及網站安全性的雙重考量下,為了讓巴友們有更好的使用體驗,巴哈姆特即將於 2019年9月2日 停止支援 Internet Explorer 瀏覽器的頁面呈現和功能。
屆時建議您使用下述瀏覽器來瀏覽巴哈姆特:
。Google Chrome(推薦)
。Mozilla Firefox
。Microsoft Edge(Windows10以上的作業系統版本才可使用)

face我們了解您不想看到廣告的心情⋯ 若您願意支持巴哈姆特永續經營,請將 gamer.com.tw 加入廣告阻擋工具的白名單中,謝謝 !【教學】