1

I have a basic Gatling script on EC2 instance from which I want to push the results into an Influx database instance. I can successfully run a Gatling script and Influx is also running.

My Gatling configuration is the following:

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
    }

And for Influx, I've setup a Telegraf with the following configuration

 [[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"
 ]

With both Telegraf (with this configuration) and Influx running, I don't see any data pushed into the 'Test' bucket. Moreover I don't get any errors that could help me debugging.

Any help would be much appreciated. Thanks.

ChennoFly
  • 25
  • 3
  • Did you open port on aws instance? For debug I recommend setup influxdb and telegraf locally. Then you can migrate to aws. – Amerousful Apr 13 '21 at 09:46
  • I have all ports opened up for testing purposes. I have the same problem locally unfortunately. I've used other metrics (cpu, ram, etc.) to confirm that telegraf is indeed working and outputting to Influx. It's the link between Gatling (and Graphite) to Telegraf where I'm completely lost. – ChennoFly Apr 13 '21 at 21:53

0 Answers0