it seems telegraf is not reading one of my conf files at all
there is no log regarding that conf file at all… not even error logs
never seen such a case where telegraf is not logging anything at all
can anyone please help?
it seems telegraf is not reading one of my conf files at all
there is no log regarding that conf file at all… not even error logs
never seen such a case where telegraf is not logging anything at all
can anyone please help?
Never had this issue.
maybe sharing something more would help, like fie structure, executed command etc
so the file is being read using input.tail
the files updates every one minute
File has the following structure
c1,c2,c3,c4
The telegraf conf file is as follows
[[inputs.tail]]
files = [“out_file.csv”]
from_beginning = false
data_format = “csv”
csv_header_row_count = 1
csv_tag_columns = [“c4”]
csv_delimiter = “,”
csv_trim_space = true
csv_column_names=[“c1”,“c2”,“c3”,“c4”]
name_override = “out_file”
Hello @neo1702 ,
Have you tried setting debug = true
in you telegraf agent?
Can you also try setting from beginning to true just to see if it can read from that file?
Finally, can you try
# Run a single telegraf collection, outputting metrics to stdout:
telegraf --config telegraf.conf --test
yes i have tried these already…
debug file doesn’t show any log accept for tail added and removed messages…
and setting from beginning to true also doesn’t change anything…
and when i tried to output the metrics to stdout i got below message:
2021-02-04T19:41:51Z W!: [agent] skipping plugin [[inputs.tail]]: service inputs not supported in --test mode
Hi @neo1702 , do you have the line that defines ‘logtarget’ set as anything in your telegraf.conf? it might be helpful if you are able to post your entire config file here. On what platform are you running telegraf and what are you running it through?
@David_Bennett
i don’t have any line defining logtarget in my config file.
i will have to discuss with my team if i can share the config file.
i am running telegraf on a ubuntu server.
i am sorry i am not able to understand what “running it through” means… can you please explain?
That’s helpful, thanks. Just to clarify, your telegraf is neither logging anything nor successfully processing any data?
yes, but for just this instance… rest all tail plugins are writing data without any error.
even in this case… just one metrics is not being written.
Interesting. I tried your config and it seems to work for me, one note is that since from_beginning is set to false, it seems like no data may be read until the file has lines added to it, if that’s applicable. Otherwise, it might be helpful to check for the key differences between the instance’s config that isn’t working and one of the ones that is working for you.
To add, in cases when i had to check why my config wouldn’t generate data it wouldn’t necessarily show why with telegraf --test --config somename.conf
- however, adding in --debug
would show pretty verbose output on the shell, like this: telegraf --debug --test --conf somename.conf
W!: [agent] skipping plugin [[inputs.tail]]: service inputs not supported in --test mode
test not working with tail.
As mentioned before use the debug option:
telegraf --config telegraf.conf --debug
You could also enable logging to a file in the telegraf.conf file:
# Configuration for telegraf agent
[agent]
debug = true
logtarget = "file"
logfile = "telegraf.log"
test@test1:~/test/test.d$ telegraf --debug --test --config someone.conf
2021-03-05T18:27:52Z I! Starting Telegraf 1.11.2
2021-03-05T18:27:52Z W!: [agent] skipping plugin [[inputs.tail]]: service inputs not supported in --test mode
this is all it prints
telegraf simply skips one entire column
the same setup works in another server
Your Telegraf version is quite old…
if telegraf version would have been the problem then it shouldn’t have worked at all.
but this very setup works in other servers