# How to load multiple conf files

**URL:** <https://community.influxdata.com/t/how-to-load-multiple-conf-files/16978>\
**Category:** Telegraf\
**Tags:** telegraf\
**Created:** [November 29, 2020, 12:56pm UTC](https://community.influxdata.com/t/how-to-load-multiple-conf-files/16978 "2020-11-29T12:56:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![adhaktode](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/adhaktode/32/6064_2.png) [@adhaktode](https://community.influxdata.com/u/adhaktode)\
**Post date:** [November 29, 2020, 12:56pm UTC](https://community.influxdata.com/t/how-to-load-multiple-conf-files/16978/1 "2020-11-29T12:56:57Z")

</div>

I am looking for loading multiple custom plugin files from directory /etc/telegraf/telegraf.d. But seems after following all the steps for influx2.x not able to get any dashboard in grafana related to custome endpoints. There is no error while executing the telegraf command  
sudo telegraf --config-directory /etc/telegraf/telegraf.d &  
[2] 5869  
ashokd@nextgenmonitoring:/etc/telegraf$ 2020-11-29T12:57:30Z I! Starting Telegraf 1.16.2  
2020-11-29T12:57:30Z I! Using config file: /etc/telegraf/telegraf.conf  
2020-11-29T12:57:30Z I! Loaded inputs: exec (2x)  
2020-11-29T12:57:30Z I! Loaded aggregators:  
2020-11-29T12:57:30Z I! Loaded processors:  
2020-11-29T12:57:30Z I! Loaded outputs: influxdb\_v2  
2020-11-29T12:57:30Z I! Tags enabled: host=nextgenmonitoring  
2020-11-29T12:57:30Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:“nextgenmonitoring”, Flush Interval:10s

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [December 15, 2020, 7:50pm UTC](https://community.influxdata.com/t/how-to-load-multiple-conf-files/16978/2 "2020-12-15T19:50:48Z")

</div>

Hello @adhaktode,  
Can you please share your telegraf config file?

---

<div class="post-metadata">

**Author:** ![adhaktode](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/adhaktode/32/6064_2.png) [@adhaktode](https://community.influxdata.com/u/adhaktode)\
**Post date:** [December 16, 2020, 10:22am UTC](https://community.influxdata.com/t/how-to-load-multiple-conf-files/16978/3 "2020-12-16T10:22:50Z")

</div>

Here is all config dump

nextgenmonitoring:~$ influx config list  
Active Name URL Org  
default [http://172.24.3.240:8086](http://172.24.3.240:8086) Optum

[[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](http://127.0.0.1:8086)

urls = [“[http://172.24.3.240:8086](http://172.24.3.240:8086)”]

## Token for authentication.

token = “$INFLUX\_TOKEN”

## Organization is the name of the organization you wish to write to; must exist.

organization = “Optum”

## Destination bucket to write into.

bucket = “telegraf”  
##Debug Mode

# debug=true

nextgenmonitoring:/etc/telegraf/telegraf.d$ ls -al  
total 36  
drwxr-xr-x 2 root root 4096 Dec 7 14:25 .  
drwxr-xr-x 3 root root 4096 Dec 7 09:21 ..  
-rwxr-xr-x 1 root root 442 Dec 7 14:09 ACI\_APIC.conf  
-rwxr-xr-x 1 root root 607 Dec 7 14:13 ACI\_Faults.conf  
-rwxr-xr-x 1 root root 667 Dec 7 14:16 ACI\_NodeHealth.conf  
-rwxr-xr-x 1 root root 694 Dec 7 13:58 ACI\_SystemHealth.conf  
-rwxr-xr-x 1 root root 535 Dec 7 14:25 ACI\_TenantHealth.conf  
-rwxr-xr-x 1 root root 1391 Nov 29 13:06 apic\_querysig.sh  
-rwxr-xr-x 1 root root 504 Nov 29 12:20 LAB\_L3Out\_103\_Eth1-8.conf

I am trying to get these conf files working. Below is one conf file.

nextgenmonitoring:/etc/telegraf/telegraf.d$ cat LAB\_L3Out\_103\_Eth1-8.conf  
[[inputs.exec]]  
name\_override = “ACI\_interface”  
commands = [“sh /etc/telegraf/apic\_querysig.sh 10.11.166.177 "/api/node/mo/topology/pod-1/node-103/sys/phys-[eth1/8].json?query-target=children&target-subtree-class=ethpmPhysIf" telegraf telegraf.key”]  
timeout = “10s”  
data\_format = “json”  
json\_query = “imdata”  
tag\_keys = [“ethpmPhysIf\_attributes\_dn”]  
json\_string\_fields = [“\*accessVlan”, “\*operMode”, “\*operSpeed”, “\*operSt”, “\*usage”]  
[inputs.exec.tags]  
apic = “10.11.166.177”

May be its something I am missing very basic!

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [December 16, 2020, 4:01pm UTC](https://community.influxdata.com/t/how-to-load-multiple-conf-files/16978/4 "2020-12-16T16:01:36Z")

</div>

Hello @adhaktode,  
Since you’re using the exec plugin it’s hard to tell.  
Have you tried using the `test` command?  
`./telegraf -config telegraf.conf -test `  
I recommend giving it a go or writing your data to stdout with:

```auto
[[outputs.file]]
  ## Files to write to, "stdout" is a specially handled file.
  files = ["stdout"]

  ## Data format to output.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
  data_format = "influx"

```

To see if your line protocol is correct. If it isn’t then you know how you need adjust your script.

---

<div class="post-metadata">

**Author:** ![adhaktode](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/adhaktode/32/6064_2.png) [@adhaktode](https://community.influxdata.com/u/adhaktode)\
**Post date:** [December 16, 2020, 4:25pm UTC](https://community.influxdata.com/t/how-to-load-multiple-conf-files/16978/5 "2020-12-16T16:25:43Z")

</div>

Test config gives some hope, here is the test results. WIll give it a try with stdout if this does not help in your opinion!  
nextgenmonitoring:~$ /usr/bin/telegraf --config /etc/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d --test  
2020-12-16T16:23:42Z I! Starting Telegraf 1.16.2

> ACI\_interface,apic=10.11.166.177,ethpmPhysIf\_attributes\_dn=topology/pod-1/node-103/sys/phys-[eth1/8]/phys,host=nextgenmonitoring ethpmPhysIf\_attributes\_accessVlan=“vlan-1”,ethpmPhysIf\_attributes\_operMode=“trunk”,ethpmPhysIf\_attributes\_operSpeed=“10G”,ethpmPhysIf\_attributes\_operSt=“up”,ethpmPhysIf\_attributes\_usage=“epg” 1608135823000000000  
> nextgenmonitoring:~$

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [December 16, 2020, 4:46pm UTC](https://community.influxdata.com/t/how-to-load-multiple-conf-files/16978/6 "2020-12-16T16:46:28Z")

</div>

Hello @adhaktode,  
It looks like `nextgenmonitoring:~$` at the end of your line protocol is unexpected. Also I notice you don’t have any fields. You need a field to write to influxdb.  
You line protocol should look like:  
`measurement,tagkey1=tagvalue1,tagkey2=tagvalue2 field=10.0 1608135823000000000`  
I really recommend refreshing on some influxdb basics if you’re unfamiliar with line protocol and data schema design.

> **[Best practices for writing data to InfluxDB | InfluxDB OSS 2.6 Documentation](https://docs.influxdata.com/influxdb/v2.0/write-data/best-practices/#influxdb-schema-design)**
>
> Learn about the recommendations and best practices for writing data to InfluxDB.

> **[InfluxDB schema design | InfluxDB OSS 2.6 Documentation](https://docs.influxdata.com/influxdb/v2.0/write-data/best-practices/schema-design/)**
>
> Design your schema for simpler and more performant queries.

> **[Line protocol | InfluxDB OSS 2.6 Documentation](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/)**
>
> InfluxDB uses line protocol to write data points. It is a text-based format that provides the measurement, tag set, field set, and timestamp of a data point.
