zoukankan      html  css  js  c++  java
  • nginx json 格式输出

    log_format logstash_json '{ "@timestamp": "$time_local", '
                             '"@fields": { '
                             '"remote_addr": "$remote_addr", '
                             '"remote_user": "$remote_user", '
                             '"body_bytes_sent": "$body_bytes_sent", '
                             '"request_time": "$request_time", '
                             '"status": "$status", '
                             '"request": "$request", '
                             '"request_method": "$request_method", '
                             '"http_referrer": "$http_referer", '
                             '"body_bytes_sent":"$body_bytes_sent", '
                             '"http_x_forwarded_for": "$http_x_forwarded_for", '
                             '"http_user_agent": "$http_user_agent" } }';

    指定记录日志格式:


    access_log  /data/logs/nginx/www.jb51.net.access.log  logstash_json;
     
     
    input {
        file {
            path => "/var/log/nginx/access.log_json""
            codec => "json"
        }
    }
  • 相关阅读:
    Keras入门(一)之基础篇
    Keras.layers各种层介绍
    python 深度学习
    git 与 tfs 源代码迁移工具
    使用RazorGenerator和预编译MVC引擎将Razor视图编译成DLL
    python资源
    .net Core 资源
    【ElasticSearch】win10 安装elasticSearch 6.6.1
    代码注释主要有哪几种
    html和css基础知识
  • 原文地址:https://www.cnblogs.com/fengjian2016/p/5905396.html
Copyright © 2011-2022 走看看