Error running agent: Error: no inputs found, did you provide a valid config file

Hello There,

my use case is to have multiple input files to handled by telegraf,

what I have done is so far, added few input files under /etc/telegraf/telegraf.d/ and created telegraf.conf file with below parameters under /etc/telegraf/telegraf.conf

this is how my telegraf.conf looks like

[XXXX@frXXXX config]# cat telegraf.conf

#Custom configuration for Infra  Monitoring*

**urls = [""]**
**database = "telegraf"**
**timeout = "15s"**

but I am getting below error ,

2022-05-13T15:47:54Z I! Using config file: /etc/telegraf/telegraf.conf
2022-05-13T15:47:54Z E! [telegraf] Error running agent: Error: no inputs found, did you provide a valid config file?

can someone help me what I am doing wrong here, I am new to telegraf.


Hey @sameer_khamkar,

how do you start telegraf? Please make sure that all your config files are found, i.e. you should start with

telegraf --config /etc/telegraf/telegraf.conf --config-dir /etc/telegraf/telegraf.d

and all your config files in /etc/telegraf/telegraf.d should have .conf as file extension (otherwise they are not found by telegraf).

If that does not help, please post the log file with --debug enabled.

Best regards,

Hello @srebhan ,

I have not named all the inputs as .conf I will test by creating those, also I am starting telegraf with script in docker container as suggested in telegraf github.

I will test and let you know,

thank you for your time and support.


1 Like


below thing I have performed still getting same issue

created input files with extension .conf and placed under /etc/telegraf/telegraf.d
kept empty telegraf.conf file under /etc/telegraf/

still issue occurs notr sure why, can you help me to resolve this.


How do you start telegraf?

You need at least one input plugin and one output plugin in your telegraf config, otherwise what should this config do without an input or without an output?

Hello @srebhan & @Franky1

I resolved by keeping empty telegraf.conf file under /etc/telegraf/ and created input and output conf files under /etc/telegraf/telegraf.d

and I am staring telegraf with below command,

telegraf --config /etc/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d

thank you for your support & time, you gave me hint which helped.