如何将Gatling性能结果推送到EC2 Grafana/XDB实例

如何将Gatling性能结果推送到EC2 Grafana/XDB实例,grafana,influxdb,gatling,Grafana,Influxdb,Gatling,我已经旋转了一个t2.micro Ubuntu 18.04 EC2实例,在这个EC2实例中,我手动安装了Grafana和XDB。 Grafana和InfluxDB都已成功安装,没有错误,但现在我所期望的是在我的计算机上运行Gatling测试 windows本地,结果应该实时推送到XDB,最终推送到Grafana 下面是我对Gatling.conf设置的摘录 data { writers = [console, file, graphite] # The list of DataWri

我已经旋转了一个t2.micro Ubuntu 18.04 EC2实例,在这个EC2实例中,我手动安装了Grafana和XDB。 Grafana和InfluxDB都已成功安装,没有错误,但现在我所期望的是在我的计算机上运行Gatling测试 windows本地,结果应该实时推送到XDB,最终推送到Grafana

下面是我对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
  #writePeriod = 5              # Write interval, in seconds
   }

 graphite {
  light = false              # only send the all* stats
  host = "http://ec2-54-67-97-86.us-west-1.compute.amazonaws.com"         # 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
}
问题是,当我从本地运行Gatling测试时,在inflow实例中看不到任何数据

ubuntu@ip-172-31-9-16:~$ influx -host ec2-54-67-97-86.us-west-1.compute.amazonaws.com                                                    Connected to http://ec2-54-67-97-86.us-west-1.compute.amazonaws.com:8086 version 1.7.7
InfluxDB shell version: 1.7.7
> show databases
name: databases
name
----
_internal
gatling
graphite
> use graphite
Using database graphite
> show series
key
---
X-Grafana-Org-Id:

有人能帮我调试一下吗?这就是为什么influx数据库没有收到数据的原因。我建议你检查influx中的graphite监听器

为此,打开
influxdb.conf
并找到
[[graphite]]

对于默认设置,它应该如下所示:

[[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",
       "gatling.*.users.*.*measurement.simulation.measurement.request.field"
  ]
更多信息请点击此处: