Skip to content

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

@TRSridhar

Description

@TRSridhar
  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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions