# Telegraf configmap issue

**URL:** <https://community.influxdata.com/t/telegraf-configmap-issue/30151>\
**Category:** Telegraf\
**Tags:** influxdb\
**Created:** [May 31, 2023, 1:28pm UTC](https://community.influxdata.com/t/telegraf-configmap-issue/30151 "2023-05-31T13:28:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RakshaHR](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@RakshaHR](https://community.influxdata.com/u/RakshaHR)\
**Post date:** [May 31, 2023, 1:28pm UTC](https://community.influxdata.com/t/telegraf-configmap-issue/30151/1 "2023-05-31T13:28:23Z")

</div>

Hi,  
I am unable to use token filed in telegraf configmap. I am getting below error  
E! error loading config file /etc/telegraf/telegraf.conf: plugin outputs.influxdb: line 1: configuration specified the fields [“token”], but they weren’t used

I am using influxdb latest image and telegraf latest image  
My configmap looks like this

apiVersion: v1  
kind: ConfigMap  
metadata:  
name: telegraf-config  
namespace: influxdb  
data:  
telegraf.conf: |+  
[[outputs.influxdb]]  
urls = [“$INFLUXDB\_URL”]  
database = “$INFLUXDB\_DB”  
username = “$INFLUXDB\_USER”  
password = “$INFLUXDB\_USER\_PASSWORD”  
token = “$INFLUX\_TOKEN”

```
[[inputs.statsd]]
  max_tcp_connections = 250
  tcp_keep_alive = false
  service_address = ":8125"
  delete_gauges = true
  delete_counters = true
  delete_sets = true
  delete_timings = true
  metric_separator = "."
  allowed_pending_messages = 10000
  percentile_limit = 1000
  parse_data_dog_tags = true
  read_buffer_size = 65535

```

Please suggest here

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [May 31, 2023, 2:00pm UTC](https://community.influxdata.com/t/telegraf-configmap-issue/30151/2 "2023-05-31T14:00:58Z")

</div>

> [@RakshaHR](#):
>
> ```toml
> [[outputs.influxdb]]
> urls = [“$INFLUXDB_URL”]
> database = “$INFLUXDB_DB”
> username = “$INFLUXDB_USER”
> password = “$INFLUXDB_USER_PASSWORD”
> token = “$INFLUX_TOKEN”
> 
> ```

You are using the `influxdb` output, which does not use a token as a part of its settings. Please see the [influxdb output README](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/influxdb). A token is generally used with influxdb\_v2.
