logstash 中配置GeoIP解析地理信息
logstash中配置的GeoIP的数据库解析ip了,这里是用了开源的ip数据源,用来分析客户端的ip归属地。官网在这里:MAXMIND
下载GeoLiteCity数据库
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz tar -zxvf GeoLite2-City.tar.gz cp GeoLite2-City.mmdb /data/logstash/ # /data/logstash 是 logstash的安装目录
修改配置文件(自己定义的config/logstash.conf)
在 filter中添加
geoip {
source => "http_x_forwarded_for" # 取自nginx中的客户端ip
target => "geoip"
database => "/data/logstash/GeoLite2-City.mmdb"
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ]
}
mutate {
convert => [ "[geoip][coordinates]", "float" ]
}
在kibana中展示的效果

logstash 中配置GeoIP解析地理信息的更多相关文章
- 源码跟读,Spring是如何解析和加载xml中配置的beans
Spring版本基于: 跟踪代码源码基于: https://github.com/deng-cc/KeepLearning commit id:c009ce47bd19e1faf9e07f12086c ...
- 微服务之Nacos配置中心源码解析(二)
Nacos配置中心源码解析 源码入口 ConfigFactory.createConfigService ConfigService configService = NacosFactory.crea ...
- 电机噪声之谐波分析(内附simulink中FFT分析的相关参数配置与解析)
电机噪声之谐波分析(内附simulink中FFT分析的相关参数配置与解析) 目录 电机噪声之谐波分析(内附simulink中FFT分析的相关参数配置与解析) 写在前面 正文 电机噪声 谐波的产生 什么 ...
- IDEA中配置maven 全解析教程(Day_08)
每一个你讨厌的现在,都有一个不够努力的曾经. 一.选择一个maven的版本下载 本文中 maven 下载链接:(apache-maven-3.5.2.rar) https://files-cdn.cn ...
- logstash安装配置
vim /usr/local/logstash/etc/hello_search.conf 输入下面: input { stdin { type => "human" }} ...
- Logstash中如何处理到ElasticSearch的数据映射
Logstash作为一个数据处理管道,提供了丰富的插件,能够从不同数据源获取用户数据,进行处理后发送给各种各样的后台.这中间,最关键的就是要对数据的类型就行定义或映射. 本文讨论的 ELK 版本为 5 ...
- [微信小程序] 微信小程序获取用户定位信息并加载对应城市信息,wx.getLocation,腾讯地图小程序api,微信小程序经纬度逆解析地理信息
因为需要在小程序加个定位并加载对应城市信息 然而小程序自带api目前只能获取经纬度不能逆解析,虽然自己解析方式,但是同时也要调用地图,难道用户每次进小程序还要强行打开地图选择地址才定位吗?多麻烦也不利 ...
- Logstash 安装配置使用
一.Windows下安装运行 官网下载,下载与elasticSearch同一个版本,zip格式.Logstash占用内存较大,我在使用的时候cpu一般都是冲到90% 1.CMD直接运行 创建一个基本的 ...
- 配置SMarty解析
在 common/main.php中配置 View 组件 'view' => [ 'renderers' => [ 'tpl' => [ 'class' => 'yii\sma ...
随机推荐
- Amazon - removed your selling privileges and placed a temporary hold on any funds - 1
Hello, We are writing to let you know that we have removed your selling privileges and placed a temp ...
- 1.hive介绍及安装配置
1.Hive介绍 数据库OLTP 在线事务处理 数据仓库OLAP 在线分析处理 延迟高 类sql方式(HQL) 使用sql方式,用来读写,管理位于分布式存储系统上的大型数据集的数据仓库技术 hive是 ...
- js操作对象属性值为字符串
今天在项目开发中遇到一个没遇到过的问题,这个问题是需要对比两个对象a和b,a是一个只有一个属性的对象,b是一个含有多个属性对象,如果b中包含和a一模一样的属性名和值,则把这个一样的属性和值从b中删除了 ...
- OpenCV学习笔记——图像平滑处理
1.blur 归一化滤波器Blurs an image using the normalized box filter.C++: void blur(InputArray src, OutputArr ...
- centos7环境下mysql安装
1.去官网下载合适的yum源安装包 https://dev.mysql.com/downloads/repo/yum/ 2.yum 本地安装 命令:yum localinstall mysql57-c ...
- 福大软工1816:Beta(2/7)
Beta 冲刺 (2/7) 队名:第三视角 组长博客链接 本次作业链接 团队部分 团队燃尽图 工作情况汇报 张扬(组长) 过去两天完成了哪些任务 文字/口头描述 为utils_wxpy.py添加注释 ...
- DescriptionAttribute Class
指定属性或事件的描述. [Description("The image associated with the control"),Category("Appearanc ...
- Redis的sentinel机制(sentinel节点IP为:192.168.23.10) “哨兵”
万一主节点打击,主从模型将会停止工作,为了解决这个问题,Redis提供了一个sentinel(哨兵),以此来实现主从切换的功能,一旦主节点宕机了,sentinel将会在从节点中挑一个作为主节点.与zo ...
- 多线程PV
#include <STDIO.H> #include <windows.h> //#include "stdafx.h" #include <pro ...
- An In-Depth Look at the HBase Architecture--转载
原文地址:https://www.mapr.com/blog/in-depth-look-hbase-architecture In this blog post, I’ll give you an ...