# Environment variables post v1.38

**URL:** <https://community.influxdata.com/t/environment-variables-post-v1-38/58726>\
**Category:** Telegraf\
**Created:** [September 16, 2026, 9:57am UTC](https://community.influxdata.com/t/environment-variables-post-v1-38/58726 "2026-09-16T09:57:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastianthorn](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sebastianthorn](https://community.influxdata.com/u/sebastianthorn)\
**Post date:** [September 16, 2026, 9:57am UTC](https://community.influxdata.com/t/environment-variables-post-v1-38/58726/1 "2026-09-16T09:57:20Z")

</div>

Hello,

We are upgrading from v1.36 to v1.40. This includes the “Strict handling of environment variables”

I’m facing trouble using bool and lists environment variables in the configuration-file after this change.

In the “`inputs.x509_cert`”-input there is an option for `exclude_root_certs` that is a bool, but I’m not able to make it work.

```bash
# cat -n /etc/telegraf/telegraf.conf | grep CERT_MONITOR_INPUTS_X509_CERT_EXCLUDE_ROOT_CERTS -C5
    69
    70 #
    71 # Monitor for the proxy
    72 [[inputs.x509_cert]]
    73 sources = ["${CERT_MONITOR_INPUTS_X509_CERT_SOURCES}"]
    74 exclude_root_certs = ${CERT_MONITOR_INPUTS_X509_CERT_EXCLUDE_ROOT_CERTS}
    75 timeout = "2s"
    76 server_name = "${CERT_MONITOR_INPUTS_X509_CERT_SERVER_NAME}"

```

```auto
E! loading config file /etc/telegraf/telegraf.conf failed: error parsing data: line 74: invalid TOML syntax

```

```bash
# env | grep CERT_MONITOR_INPUTS_X509_CERT_EXCLUDE_ROOT_CERTS
CERT_MONITOR_INPUTS_X509_CERT_EXCLUDE_ROOT_CERTS=false

```

I also had trouble with the list on line 73, but I just made it a string in the variable.

[Telegraf Environment Variable Handling | InfluxData](https://www.influxdata.com/blog/telegraf-config-envvars/) This only covers the “Why?” and strings.

Is there any examples of how to get non strings to work with this change?

---

<div class="post-metadata">

**Author:** ![sebastianthorn](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sebastianthorn](https://community.influxdata.com/u/sebastianthorn)\
**Post date:** [September 17, 2026, 6:36am UTC](https://community.influxdata.com/t/environment-variables-post-v1-38/58726/2 "2026-09-17T06:36:14Z")

</div>

The same goes for int.

```auto
E! loading config file /etc/telegraf/telegraf.conf failed: error parsing data: line 77: invalid TOML syntax

# cat -n /etc/telegraf/telegraf.conf
77 metric_version = ${PROMETHEUS_MONITOR_METRIC_VERSION}

# env | grep PROMETHEUS_MONITOR_METRIC_VERSION
PROMETHEUS_MONITOR_METRIC_VERSION=1

```
