amazon-ec2 - 在 InfluxDB v2 中接收 Gatling 结果
问题描述
我在 EC2 实例上有一个基本的 Gatling 脚本,我想从中将结果推送到 Influx 数据库实例中。我可以成功运行 Gatling 脚本并且 Influx 也在运行。
我的加特林配置如下:
data {
writers = [console, graphite] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file, graphite)
console {
#light = false # When set to true, displays a light version without detailed request stats
#writePeriod = 5 # Write interval, in seconds
}
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 = "ec2-35-181-26-79.eu-west-3.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 # Internal data buffer size, in bytes
writePeriod = 1 # Write period, in seconds
}
对于 Influx,我使用以下配置设置了 Telegraf
[[outputs.influxdb_v2]]
## The URLs of the InfluxDB cluster nodes.
##
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
## urls exp: http://127.0.0.1:8086
urls = ["http://ec2-35-181-26-79.eu-west-3.compute.amazonaws.com:8086"]
## Token for authentication.
token = "$INFLUX_TOKEN"
## Organization is the name of the organization you wish to write to; must exist.
organization = "Test"
## Destination bucket to write into.
bucket = "Test"
[[inputs.socket_listener]]
## URL to listen on
service_address = "tcp://:2003"
data_format = "graphite"
## Content encoding for message payloads, can be set to "gzip" to or
## "identity" to apply no encoding.
# content_encoding = "identity"
templates = [
"gatling.*.*.*.* measurement.simulation.request.status.field",
"gatling.*.users.*.* measurement.simulation.measurement.request.field"
]
在 Telegraf(使用此配置)和 Influx 运行的情况下,我看不到任何数据推送到“测试”存储桶中。此外,我没有得到任何可以帮助我调试的错误。
任何帮助将非常感激。谢谢。
解决方案
推荐阅读
- r - RStudio中的折叠表达式####、#----和#====有什么区别?
- python - 使用电脑前置摄像头进行人脸识别,如何使其更快?
- c# - 如果总和不匹配,则将子数组清零
- swagger - OpenAPI 3.0 是否允许引用服务器变量?
- java - Collection扩展了Iterable,但是为什么Collection声明了Iterable Function(和Iterable一样)
- apache-kafka - Kafka Connect 接收精确一次语义的一般方法是什么?
- css - 相对于在 firefox 和 chrome 上工作的父级的大小调整
- apache-spark - 使用 Apache Commons Lang3 SerializationUtils.deserialize 时出现 java.lang.ClassNotFoundException
- flutter - 使用“is”的 Dart 2.1.0 智能转换不起作用
- python - How to properly install Python and Django