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

Log file doesn't exist. #1243

Closed
neocox opened this issue May 23, 2016 · 3 comments · Fixed by #1245
Closed

Log file doesn't exist. #1243

neocox opened this issue May 23, 2016 · 3 comments · Fixed by #1245
Labels
bug unexpected problem or unintended behavior

Comments

@neocox
Copy link

neocox commented May 23, 2016

Bug report

The log file is not created even if debug = true in agent section.

System info:

# telegraf --version
Telegraf - version 0.13.0
# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

Steps to reproduce:

  1. Starts telegraf with debug=true in agent section.
  2. Check log file at /var/log/telegraf/

Expected behavior:

Log file exists and has contents. This is based on rpm binary installation and by default must have it's own log file enabled.

Actual behavior:

Not log file exists.

Additional info:

Checked user and directory permissions:

# ps aux | grep telegraf
telegraf  1420  0.1  1.8 310212 19260 ?        Ssl  07:56   0:01 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
ll -d /var/log/telegraf
drwxr-xr-x. 2 telegraf telegraf 4096 May 11 22:54 /var/log/telegraf

Lsof didn't show any log file:

# lsof -p 1420
COMMAND   PID     USER   FD      TYPE             DEVICE SIZE/OFF   NODE NAME
telegraf 1420 telegraf  cwd       DIR              253,1     4096      2 /
telegraf 1420 telegraf  rtd       DIR              253,1     4096      2 /
telegraf 1420 telegraf  txt       REG              253,1 33438580  20717 /usr/bin/telegraf
telegraf 1420 telegraf  mem       REG              253,1  2112384   4970 /usr/lib64/libc-2.17.so
telegraf 1420 telegraf  mem       REG              253,1   142304   4999 /usr/lib64/libpthread-2.17.so
telegraf 1420 telegraf  mem       REG              253,1   164440   4957 /usr/lib64/ld-2.17.so
telegraf 1420 telegraf    0r      CHR                1,3      0t0   4674 /dev/null
telegraf 1420 telegraf    1u     unix 0xffff88003aff9680      0t0 825105 socket
telegraf 1420 telegraf    2u     unix 0xffff88003aff9680      0t0 825105 socket
telegraf 1420 telegraf    3r      CHR                1,9      0t0   4679 /dev/urandom
telegraf 1420 telegraf    5u  a_inode                0,9        0   4670 [eventpoll]
telegraf 1420 telegraf    7u     IPv4             825248      0t0    TCP XXXXX:57048->XXXXX:d-s-n (ESTABLISHED)
telegraf 1420 telegraf    9r      REG               0,18     1920  11387 /run/utmp
@sparrc sparrc added the bug unexpected problem or unintended behavior label May 23, 2016
@AliGouta
Copy link

+1, Actually running Telegraf on Redhat-7 (I think it should be the same for centOs). We do not see the log files (stdout and stderr) in /var/log/telegraf. Instead, We see them in /var/log/messages and journalctl... I think that the logs should never go to /var/log/messages but instead in the log directory such as kapacitor.

@sparrc
Copy link
Contributor

sparrc commented May 23, 2016

same issue as #872,

although I would say it's probably time that we start logging to /var/log. Consensus seems to be that people don't love journalctl...

@areski
Copy link

areski commented Mar 8, 2017

This has been reverted 5913f7c to align to InfluxDB 1.0 logging policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants