【发布时间】:2018-03-24 21:48:51
【问题描述】:
我的问题已经被问到,但我没有成功解决我的问题。
我无法将我的数据从 Gatling 实时发送到 InfluxDB。
我使用的是 Windows 10。 Gatling 版本:2.3.0(最后一个)。 InfluxDB版本:1.3.5(最后是1.3.6)。
我的 gatling.conf:
data {
writers = [console, file, graphite] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file, graphite, jdbc)
console {
#light = false # When set to true, displays a light version without detailed request stats
}
file {
#bufferSize = 8192 # FileDataWriter's internal data buffer size, in bytes
}
leak {
#noActivityTimeout = 30 # Period, in seconds, for which Gatling may have no activity before considering a leak may be happening
}
graphite {
#light = false # only send the all* stats
host = "127.0.0.1" # The host where the Carbon server is located
port = "2003" # The port to which the Carbon server listens to (2003 is default for plaintext, 2004 is default for pickle)
protocol = "tcp" # The protocol used to send data to Carbon (currently supported : "tcp", "udp")
rootPathPrefix = "gatling" # The common prefix of all metrics sent to Graphite
#bufferSize = 8192 # GraphiteDataWriter's internal data buffer size, in bytes
#writeInterval = 1 # GraphiteDataWriter's write interval, in seconds
}
}
我的 influxdb.conf:
[http]
# Determines whether HTTP endpoint is enabled.
enabled = true
# The bind address used by the HTTP service.
bind-address = "127.0.0.1:8086"
###
### [[graphite]]
###
### Controls one or many listeners for Graphite data.
###
[[graphite]]
# Determines whether the graphite endpoint is enabled.
enabled = true
database = "gatlingdb"
# retention-policy = ""
bind-address = ":2003"
protocol = "tcp"
# consistency-level = "one"
templates = [
"gatling.*.*.*.*.measurement.simulation.request.status.field"
]
我的 gatlingdb 数据库是在 InfluxDB 上创建的,它保持为空。
当我尝试时:
C:\InfluxDB-1.3.5-1>influx -host 127.0.0.1
我已连接到 InfluxDB
>USE gatlingdb
我已连接到我的数据库。那么:
>SHOW SERIES
和
>SELECT * FROM gatling
不要返回任何东西。它是空的。
注意:我输入“FROM gatling”是因为我把它放在了我的 gatling.conf 中:rootPathPrefix = "gatling"
我没有下载 Graphite,但我看到 InfluxDB 接受了 Graphite 协议。我假设我可以将数据从 Gatling 发送到 InfluxDB。我当然错过了什么。
我成功地将 InfluxDB 连接到 Grafana 并显示来自其他数据库的数据。我只是错过了 Gatling 和 InfluxDB 之间的联系。
提前感谢您的帮助,我绝对需要它!
安东尼
【问题讨论】: