我的問題已經提出,但我沒有成功解決我的問題。如何從Gatling編寫InfluxDB?
我沒有成功將我的數據從Gatling實時發送到InfluxDB。
我在Windows 10上。 Gatling版本:2.3.0(最後一個)。 InfortDB版本: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.conf:rootPathPrefix =「加特林」
我沒有下載石墨,但我看到InfluxDB接受石墨協議。我假設我可以將數據從Gatling發送到InfluxDB。我當然錯過了什麼。
我成功地將InfluxDB連接到Grafana,並顯示來自其他數據庫的數據。我錯過了Gatling和InfluxDB之間的聯繫。
在此先感謝您的幫助,我絕對需要它!
安東尼