欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

ELK+syslog+nginx訪問日志收集+分詞處理-創(chuàng)新互聯(lián)

一、nginx訪問日志配置:

創(chuàng)新互聯(lián)專注于企業(yè)成都全網(wǎng)營銷推廣、網(wǎng)站重做改版、當(dāng)陽網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5技術(shù)商城網(wǎng)站開發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)營銷網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為當(dāng)陽等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

1、日志格式配置:

log_format json '{"@timestamp":"$time_iso8601",'

          '"host":"$server_addr",'

          '"clientip":"$remote_addr",'

          '"size":$body_bytes_sent,'

          '"xff":"$http_x_forwarded_for",'

          '"upstreamhost":"$upstream_addr",'

          '"status":"$status",'

          '"responsetime":$request_time,'

          '"upstreamtime":"$upstream_response_time",'

          '"http_host":"$host",'

          '"url":"$uri"}';

2、訪問日志配置:

access_log  syslog:server=xx.xx.xx.xx:5140 json;

二、logstash配置

input {

   syslog{

      port => "5140"

     }

}

filter {

   json {

     source =>"message"

     remove_field => ["message"]

     }

}

output {

     elasticsearch { hosts => ['xx.xx.xx.xx:9200','xx.xx.xx.xx:9200']

             index => 'nginx_rfd-%{+YYYY.MM.dd.HH}'

             template => "/usr/local/logstash/nginx.json"

             template_name => "nginx_*"

             template_overwrite => true

            }

}

注意index名稱要包含到template_name里

三、自定義mappings

cat /usr/local/logstash/nginx.json

{

  "template": "nginx_*",

  "order":1,

  "settings": { "index.refresh_interval" : "60s" },

  "mappings": {

    "_default_": {

      "_all" : { "enabled" : false },

      "properties": {

        "@timestamp" : { "type" : "date" },

        "@version" : { "type" : "integer", "index" : "not_analyzed" },

        "url": {

          "type": "string",

          "index": "not_analyzed"

        },

        "host": {

          "type": "ip",

          "index": "not_analyzed"

        },

        "clientip": {

          "type": "ip",

          "index": "not_analyzed"

        },

        "size": {

          "type": "integer"

        },

        "xff": {

          "type": "string",

          "index": "not_analyzed"

        },

        "upstreamhost": {

          "type": "string",

          "index": "not_analyzed"

        },

        "http_host": {

          "type": "string",

          "index": "not_analyzed"

        },

        "status": {

          "type": "integer"

        },

        "responseTime": {

          "type": "string",

          "index": "not_analyzed"

        },

        "upstreamtime": {

          "type": "string",

          "index": "not_analyzed"

        }

      }

    }

  }

}

四、生成統(tǒng)計(jì)圖形

ELK+syslog+nginx訪問日志收集+分詞處理

五、參考文檔

https://elasticsearch.cn/article/154

http://blog.csdn.net/choelea/article/details/53320140

http://www.cnblogs.com/hanyifeng/p/5860731.html

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

網(wǎng)頁標(biāo)題:ELK+syslog+nginx訪問日志收集+分詞處理-創(chuàng)新互聯(lián)
文章來源:http://www.chinadenli.net/article32/doccpc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供域名注冊網(wǎng)站制作企業(yè)網(wǎng)站制作手機(jī)網(wǎng)站建設(shè)小程序開發(fā)用戶體驗(yàn)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

營銷型網(wǎng)站建設(shè)