• geoip


    [elk@Vsftp logstash]$ cat t1.conf 
    input {
       stdin {
         }
     }
    
    filter {
      geoip {
      source =>"message"
      add_field =>["[geoip][aa]","%{[geoip][location]}"]
     }
    }
    output {
       stdout {
       codec =>rubydebug
       }
    }
    
    
    [elk@Vsftp logstash]$ logstash -f t1.conf 
    Settings: Default pipeline workers: 4
    Pipeline main started
    202.101.172.35
    {
           "message" => "202.101.172.35",
          "@version" => "1",
        "@timestamp" => "2017-01-11T01:42:59.457Z",
              "host" => "Vsftp",
             "geoip" => {
                        "ip" => "202.101.172.35",
             "country_code2" => "CN",
             "country_code3" => "CHN",
              "country_name" => "China",
            "continent_code" => "AS",
                  "latitude" => 35.0,
                 "longitude" => 105.0,
                  "location" => [
                [0] 105.0,
                [1] 35.0
            ],
                        "aa" => "105.0,35.0"
        }
    }
    
    
    
    [elk@Vsftp logstash]$ cat t1.conf 
    input {
       stdin {
         }
     }
    
    filter {
      geoip {
      source =>"message"
      add_field =>["[scan][aa]","%{[geoip][location]}"]
     }
    }
    output {
       stdout {
       codec =>rubydebug
       }
    }
    
    [elk@Vsftp logstash]$ 
    [elk@Vsftp logstash]$ logstash -f t1.conf 
    Settings: Default pipeline workers: 4
    Pipeline main started
    202.101.172.35
    {
           "message" => "202.101.172.35",
          "@version" => "1",
        "@timestamp" => "2017-01-11T01:45:14.001Z",
              "host" => "Vsftp",
             "geoip" => {
                        "ip" => "202.101.172.35",
             "country_code2" => "CN",
             "country_code3" => "CHN",
              "country_name" => "China",
            "continent_code" => "AS",
                  "latitude" => 35.0,
                 "longitude" => 105.0,
                  "location" => [
                [0] 105.0,
                [1] 35.0
            ]
        },
              "scan" => {
            "aa" => "105.0,35.0"
        }
    }
    
    
    
    [elk@Vsftp logstash]$ cat t1.conf 
    input {
       stdin {
         }
     }
    
    filter {
      geoip {
      source =>"message"
      add_field =>["[scan][aa]","%{[geoip][location]}"]
     }
    }
    output {
       stdout {
       codec =>rubydebug
       }
    }
    [elk@Vsftp logstash]$ cat t1.conf ^C
    [elk@Vsftp logstash]$ vim t1.conf 
    [elk@Vsftp logstash]$ cat t1.conf 
    input {
       stdin {
         }
     }
    
    filter {
      geoip {
      source =>"message"
      add_field =>["[scan][aa]","%{[geoip][location][0]}"]
     }
    }
    output {
       stdout {
       codec =>rubydebug
       }
    }
    
    [elk@Vsftp logstash]$ logstash -f t1.conf 
    Settings: Default pipeline workers: 4
    Pipeline main started
    202.101.172.35
    {
           "message" => "202.101.172.35",
          "@version" => "1",
        "@timestamp" => "2017-01-11T01:48:40.316Z",
              "host" => "Vsftp",
             "geoip" => {
                        "ip" => "202.101.172.35",
             "country_code2" => "CN",
             "country_code3" => "CHN",
              "country_name" => "China",
            "continent_code" => "AS",
                  "latitude" => 35.0,
                 "longitude" => 105.0,
                  "location" => [
                [0] 105.0,
                [1] 35.0
            ]
        },
              "scan" => {
            "aa" => 105.0
        }
    }

  • 相关阅读:
    eventkeyboardmouse
    代理 IP
    网关 192.168.2.1 114.114.114.114 dns查询
    http ssl
    SSDP 抓包
    抓包登录信息提交
    危险的input 微博的过去
    firstChild.nodeValue
    浏览器控制台
    haproxy 中的http请求和https请求
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349932.html
Copyright © 2020-2023  润新知