背景:
本来只是想在将Jmeter的测试结果写入InfluxDB, 但发现从InfluxDB V1.3后开始, 已经不支持Web Admin interface, 才发现InfluxData 搞了一个整体产品栈,名字叫做TICK
- Telegraf
- InfluxDB
- Chronograf
- Kapacitor
前提:
有一台Linux Server (Redhat 6), IP为:172.20.184.157, 可以通过sudo 安装软件包
安装
1. 先下载
https://dl.influxdata.com/influxdb/releases/influxdb-1.3.5.x86_64.rpm
https://dl.influxdata.com/telegraf/releases/telegraf-1.4.0-1.x86_64.rpm
https://dl.influxdata.com/chronograf/releases/chronograf-1.3.8.1.x86_64.rpm
https://dl.influxdata.com/kapacitor/releases/kapacitor-1.3.1.x86_64.rpm
2. 将这些安装包通过winSCP 复制到Linux 文件夹下(例如:/home/MSDomain1/bzhou/)
3. 切换身份到root账号, 命令行为:“sudo su -”
4. 依次安装,命令行如下:
yum localinstall /home/MSDOMAIN1/bzhou/influxdb-1.3.5.x86_64.rpm
yum localinstall /home/MSDOMAIN1/bzhou/kapacitor-1.3.1.x86_64.rpm
yum localinstall /home/MSDOMAIN1/bzhou/telegraf-1.4.0-1.x86_64.rpm
yum localinstall /home/MSDOMAIN1/bzhou/chronograf-1.3.8.1.x86_64.rpm
5. 编辑influxdb.conf, 命令行为:“vi /etc/influxdb/influxdb.conf”
[http]
# Determines whether HTTP endpoint is enabled.
enabled = true
# The bind address used by the HTTP service.
bind-address = ":8086"
[[graphite]]
# Determines whether the graphite endpoint is enabled.
enabled = true
database = "jmeter"
# retention-policy = ""
bind-address = ":2003"
protocol = "tcp"
consistency-level = "one"
保存后,退出,重新启动服务,命令依次为:
service influxdb restart
service kapacitor restart
service telegraf restart
service chronograf restart
6. 打开chronograf 控制台, http://172.20.184.157:8888/, 查看TICK 安装情况,并设定数据源
7. 创建Jmeter数据库
8. 在Jmeter 项目中加入Backend Listen, 并指向TICK
关于BackendListen 相关知识,请参见
https://docs.influxdata.com/influxdb/v1.1/query_language/database_management/
http://jmeter.apache.org/usermanual/component_reference.html#Backend_Listener