Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create or redirect output to a file in rootnroll Telegraf playground #6

Open
TRSridhar opened this issue Oct 19, 2019 · 0 comments

Comments

@TRSridhar
Copy link

  1. Start a telegraf playground: https://rootnroll.com/d/telegraf/

  2. Edit /etc/telegraf/telegraf.conf to modify the config as follows:

Logging configuration:

Run telegraf with debug log messages.

debug = true

Run telegraf in quiet mode (error log messages only).

quiet = false

Specify the log file name. The empty string means to log to stderr.

logfile = "/etc/log.log"

  1. Run telegraf --test

2019-10-19T09:50:11Z I! Starting Telegraf 1.10.2
2019-10-19T09:50:11Z I! Using config file: /etc/telegraf/telegraf.conf
2019-10-19T09:50:11Z E! Unable to open /etc/log.log (open /etc/log.log: permission denied), using stderr

  1. Unable to even execute
    touch /etc/log.log

Need to do
sudo touch /etc/log.log to create the file

  1. Even after file is created, the log file does not get appended. Probably need a sudo append/write to make it work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant