Sending data to telegraf using graphite protocol


I am new to Influxdb and would appreciate any tips or suggestions.

I am currently working on upgrading a system that is using InfluxdDB 1.7 to 2.6. I was able to migrate the data and convert the databases to buckets as well as be able to communicate with a Grafana dashboard. However, I can’t seem to get the data ingestion to work properly.

The 1.7 influxdb used graphite to receive data. It has a simple configuration like this:

  # Determines whether the graphite endpoint is enabled.
  enabled = true
  database = "database_name"
  retention-policy = ""
  bind-address = ":2003"
  protocol = "tcp"
  consistency-level = "one"

After the upgrade, I understand that the way to communicate with the database has changed and to use telegraf.

I am still unsure how to set up telegraf to receive data in the same way influx 1.7 did.

I tried creating a telegraf configuration using http_listener_v2. I changed the configuration to listen on port 2003 and changed the default path to use / instead of /telegraf.

  ## Address and port to host HTTP listener on
  service_address = ":2003"

  ## Paths to listen to.
  paths = ["/"]

  ## Data format to consume.
  data_format = "graphite"

I also set the agent debug flag to true to see any event that comes.

When I run the system that sends data to the influx, I am not seeing any data being received. I am not sure how to configure telegraf to be able to receive data without abandoning graphite protocol.

Are there any suggestions or ideas on how to configure telegraf to receive the data?

Hey @amalik can you please show the ingestion pipeline as I did not yet get what your producer/sensors are and which protocol they do speak. What I got is

producer -- graphite --> Telegraf -- influx line protocol --> InfluxDB

Is this correct?

If so you probably want to use the socket_listener input plugin with the graphite parser (data_format = "graphite"). On the output side you should use the influxdb_v2 output plugin.


That assumption is correct, the producer is an instance on jmeter on another server. I tried using the socket_listener plugin and it worked like a charm. I can see my data being ingested into influxdb.

Much appreciated :smile:

1 Like